1 /* PR middle-end/55150 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target fpic } */
4 /* { dg-options "-Os -g -fPIC" } */
6 typedef unsigned char DES_cblock
[8];
7 typedef struct DES_ks
{
10 void DES_ede3_cbcm_encrypt (const unsigned char *in
, unsigned char *out
, long length
, DES_key_schedule
* ks1
, DES_key_schedule
* ks2
, DES_key_schedule
* ks3
, DES_cblock
* ivec1
, DES_cblock
* ivec2
, int enc
) {
11 register unsigned long tout0
, tout1
, xor0
, xor1
, m0
, m1
;
12 register long l
= length
;
14 unsigned char *iv1
, *iv2
;
18 (m0
= ((unsigned long) (*((iv1
)++))), m0
|= ((unsigned long) (*((iv1
)++))) << 8L, m0
|= ((unsigned long) (*((iv1
)++))) << 16L, m0
|= ((unsigned long) (*((iv1
)++))) << 24L);
19 (m1
= ((unsigned long) (*((iv1
)++))), m1
|= ((unsigned long) (*((iv1
)++))) << 8L, m1
|= ((unsigned long) (*((iv1
)++))) << 16L, m1
|= ((unsigned long) (*((iv1
)++))) << 24L);
20 (tout0
= ((unsigned long) (*((iv2
)++))), tout0
|= ((unsigned long) (*((iv2
)++))) << 8L, tout0
|= ((unsigned long) (*((iv2
)++))) << 16L, tout0
|= ((unsigned long) (*((iv2
)++))) << 24L);
24 DES_encrypt1 (tin
, ks3
, 1);
25 DES_encrypt1 (tin
, ks1
, 1);
27 (*((iv1
)++) = (unsigned char) (((m0
)) & 0xff), *((iv1
)++) = (unsigned char) (((m0
) >> 8L) & 0xff), *((iv1
)++) = (unsigned char) (((m0
) >> 16L) & 0xff), *((iv1
)++) = (unsigned char) (((m0
) >> 24L) & 0xff));
28 (*((iv1
)++) = (unsigned char) (((m1
)) & 0xff), *((iv1
)++) = (unsigned char) (((m1
) >> 8L) & 0xff), *((iv1
)++) = (unsigned char) (((m1
) >> 16L) & 0xff), *((iv1
)++) = (unsigned char) (((m1
) >> 24L) & 0xff));
29 (*((iv2
)++) = (unsigned char) (((tout0
)) & 0xff), *((iv2
)++) = (unsigned char) (((tout0
) >> 8L) & 0xff), *((iv2
)++) = (unsigned char) (((tout0
) >> 16L) & 0xff), *((iv2
)++) = (unsigned char) (((tout0
) >> 24L) & 0xff));
32 (m0
= ((unsigned long) (*((iv1
)++))), m0
|= ((unsigned long) (*((iv1
)++))) << 8L, m0
|= ((unsigned long) (*((iv1
)++))) << 16L, m0
|= ((unsigned long) (*((iv1
)++))) << 24L);
33 (xor1
= ((unsigned long) (*((iv2
)++))), xor1
|= ((unsigned long) (*((iv2
)++))) << 8L, xor1
|= ((unsigned long) (*((iv2
)++))) << 16L, xor1
|= ((unsigned long) (*((iv2
)++))) << 24L);
37 DES_encrypt1 (tin
, ks3
, 1);
41 case 7: *(--(out
)) = (unsigned char) (((tout1
) >> 16L) & 0xff);
42 case 6: *(--(out
)) = (unsigned char) (((tout1
) >> 8L) & 0xff);
43 case 5: *(--(out
)) = (unsigned char) (((tout1
)) & 0xff);
44 case 4: *(--(out
)) = (unsigned char) (((tout0
) >> 24L) & 0xff);
45 case 1: *(--(out
)) = (unsigned char) (((tout0
)) & 0xff);
50 (*((iv1
)++) = (unsigned char) (((m0
)) & 0xff), *((iv1
)++) = (unsigned char) (((m0
) >> 8L) & 0xff), *((iv1
)++) = (unsigned char) (((m0
) >> 16L) & 0xff), *((iv1
)++) = (unsigned char) (((m0
) >> 24L) & 0xff));
51 (*((iv2
)++) = (unsigned char) (((xor0
)) & 0xff), *((iv2
)++) = (unsigned char) (((xor0
) >> 8L) & 0xff), *((iv2
)++) = (unsigned char) (((xor0
) >> 16L) & 0xff), *((iv2
)++) = (unsigned char) (((xor0
) >> 24L) & 0xff));
52 (*((iv2
)++) = (unsigned char) (((xor1
)) & 0xff), *((iv2
)++) = (unsigned char) (((xor1
) >> 8L) & 0xff), *((iv2
)++) = (unsigned char) (((xor1
) >> 16L) & 0xff), *((iv2
)++) = (unsigned char) (((xor1
) >> 24L) & 0xff));