# qhasm: int32 a # qhasm: stack32 arg1 # qhasm: stack32 arg2 # qhasm: stack32 arg3 # qhasm: stack32 arg4 # qhasm: input arg1 # qhasm: input arg2 # qhasm: input arg3 # qhasm: input arg4 # qhasm: int32 eax # qhasm: int32 ebx # qhasm: int32 esi # qhasm: int32 edi # qhasm: int32 ebp # qhasm: caller eax # qhasm: caller ebx # qhasm: caller esi # qhasm: caller edi # qhasm: caller ebp # qhasm: int32 k # qhasm: int32 kbits # qhasm: int32 iv # qhasm: int32 i # qhasm: int32 x # qhasm: int32 m # qhasm: int32 out # qhasm: stack32 bytes_backup # qhasm: int32 bytes # qhasm: stack32 eax_stack # qhasm: stack32 ebx_stack # qhasm: stack32 esi_stack # qhasm: stack32 edi_stack # qhasm: stack32 ebp_stack # qhasm: int6464 diag0 # qhasm: int6464 diag1 # qhasm: int6464 diag2 # qhasm: int6464 diag3 # qhasm: int6464 a0 # qhasm: int6464 a1 # qhasm: int6464 a2 # qhasm: int6464 a3 # qhasm: int6464 a4 # qhasm: int6464 a5 # qhasm: int6464 a6 # qhasm: int6464 a7 # qhasm: int6464 b0 # qhasm: int6464 b1 # qhasm: int6464 b2 # qhasm: int6464 b3 # qhasm: int6464 b4 # qhasm: int6464 b5 # qhasm: int6464 b6 # qhasm: int6464 b7 # qhasm: int32 in0 # qhasm: int32 in1 # qhasm: int32 in2 # qhasm: int32 in3 # qhasm: int32 in4 # qhasm: int32 in5 # qhasm: int32 in6 # qhasm: int32 in7 # qhasm: int32 in8 # qhasm: int32 in9 # qhasm: int32 in10 # qhasm: int32 in11 # qhasm: int32 in12 # qhasm: int32 in13 # qhasm: int32 in14 # qhasm: int32 in15 # qhasm: stack512 tmp # qhasm: stack32 ctarget # qhasm: enter ECRYPT_keystream_bytes .text .p2align 5 .globl _ECRYPT_keystream_bytes .globl ECRYPT_keystream_bytes _ECRYPT_keystream_bytes: ECRYPT_keystream_bytes: mov %esp,%eax and $31,%eax add $96,%eax sub %eax,%esp # qhasm: eax_stack = eax # asm 1: movl eax_stack=stack32#1 # asm 2: movl eax_stack=0(%esp) movl %eax,0(%esp) # qhasm: ebx_stack = ebx # asm 1: movl ebx_stack=stack32#2 # asm 2: movl ebx_stack=4(%esp) movl %ebx,4(%esp) # qhasm: esi_stack = esi # asm 1: movl esi_stack=stack32#3 # asm 2: movl esi_stack=8(%esp) movl %esi,8(%esp) # qhasm: edi_stack = edi # asm 1: movl edi_stack=stack32#4 # asm 2: movl edi_stack=12(%esp) movl %edi,12(%esp) # qhasm: ebp_stack = ebp # asm 1: movl ebp_stack=stack32#5 # asm 2: movl ebp_stack=16(%esp) movl %ebp,16(%esp) # qhasm: x = arg1 # asm 1: movl x=int32#3 # asm 2: movl x=%edx movl 4(%esp,%eax),%edx # qhasm: m = arg2 # asm 1: movl m=int32#5 # asm 2: movl m=%esi movl 8(%esp,%eax),%esi # qhasm: out = m # asm 1: mov out=int32#6 # asm 2: mov out=%edi mov %esi,%edi # qhasm: bytes = arg3 # asm 1: movl bytes=int32#4 # asm 2: movl bytes=%ebx movl 12(%esp,%eax),%ebx # qhasm: unsigned>? bytes - 0 # asm 1: cmp $0, jbe ._done # qhasm: a = 0 # asm 1: mov $0,>a=int32#1 # asm 2: mov $0,>a=%eax mov $0,%eax # qhasm: i = bytes # asm 1: mov i=int32#2 # asm 2: mov i=%ecx mov %ebx,%ecx # qhasm: while (i) { *out++ = a; --i } rep stosb # qhasm: out -= bytes # asm 1: subl eax_stack=stack32#1 # asm 2: movl eax_stack=0(%esp) movl %eax,0(%esp) # qhasm: ebx_stack = ebx # asm 1: movl ebx_stack=stack32#2 # asm 2: movl ebx_stack=4(%esp) movl %ebx,4(%esp) # qhasm: esi_stack = esi # asm 1: movl esi_stack=stack32#3 # asm 2: movl esi_stack=8(%esp) movl %esi,8(%esp) # qhasm: edi_stack = edi # asm 1: movl edi_stack=stack32#4 # asm 2: movl edi_stack=12(%esp) movl %edi,12(%esp) # qhasm: ebp_stack = ebp # asm 1: movl ebp_stack=stack32#5 # asm 2: movl ebp_stack=16(%esp) movl %ebp,16(%esp) # qhasm: x = arg1 # asm 1: movl x=int32#3 # asm 2: movl x=%edx movl 4(%esp,%eax),%edx # qhasm: m = arg2 # asm 1: movl m=int32#5 # asm 2: movl m=%esi movl 8(%esp,%eax),%esi # qhasm: out = arg3 # asm 1: movl out=int32#6 # asm 2: movl out=%edi movl 12(%esp,%eax),%edi # qhasm: bytes = arg4 # asm 1: movl bytes=int32#4 # asm 2: movl bytes=%ebx movl 16(%esp,%eax),%ebx # qhasm: unsigned>? bytes - 0 # asm 1: cmp $0, jbe ._done # comment:fp stack unchanged by jump # qhasm: goto start jmp ._start # qhasm: enter ECRYPT_encrypt_bytes .text .p2align 5 .globl _ECRYPT_encrypt_bytes .globl ECRYPT_encrypt_bytes _ECRYPT_encrypt_bytes: ECRYPT_encrypt_bytes: mov %esp,%eax and $31,%eax add $96,%eax sub %eax,%esp # qhasm: eax_stack = eax # asm 1: movl eax_stack=stack32#1 # asm 2: movl eax_stack=0(%esp) movl %eax,0(%esp) # qhasm: ebx_stack = ebx # asm 1: movl ebx_stack=stack32#2 # asm 2: movl ebx_stack=4(%esp) movl %ebx,4(%esp) # qhasm: esi_stack = esi # asm 1: movl esi_stack=stack32#3 # asm 2: movl esi_stack=8(%esp) movl %esi,8(%esp) # qhasm: edi_stack = edi # asm 1: movl edi_stack=stack32#4 # asm 2: movl edi_stack=12(%esp) movl %edi,12(%esp) # qhasm: ebp_stack = ebp # asm 1: movl ebp_stack=stack32#5 # asm 2: movl ebp_stack=16(%esp) movl %ebp,16(%esp) # qhasm: x = arg1 # asm 1: movl x=int32#3 # asm 2: movl x=%edx movl 4(%esp,%eax),%edx # qhasm: m = arg2 # asm 1: movl m=int32#5 # asm 2: movl m=%esi movl 8(%esp,%eax),%esi # qhasm: out = arg3 # asm 1: movl out=int32#6 # asm 2: movl out=%edi movl 12(%esp,%eax),%edi # qhasm: bytes = arg4 # asm 1: movl bytes=int32#4 # asm 2: movl bytes=%ebx movl 16(%esp,%eax),%ebx # qhasm: unsigned>? bytes - 0 # asm 1: cmp $0, jbe ._done # comment:fp stack unchanged by fallthrough # qhasm: start: ._start: # qhasm: bytesatleast1: ._bytesatleast1: # qhasm: unsignedctarget=stack32#6 # asm 2: movl ctarget=20(%esp) movl %edi,20(%esp) # qhasm: out = &tmp # asm 1: leal out=int32#6 # asm 2: leal out=%edi leal 32(%esp),%edi # qhasm: i = bytes # asm 1: mov i=int32#2 # asm 2: mov i=%ecx mov %ebx,%ecx # qhasm: while (i) { *out++ = *m++; --i } rep movsb # qhasm: out = &tmp # asm 1: leal out=int32#6 # asm 2: leal out=%edi leal 32(%esp),%edi # qhasm: m = &tmp # asm 1: leal m=int32#5 # asm 2: leal m=%esi leal 32(%esp),%esi # comment:fp stack unchanged by fallthrough # qhasm: nocopy: ._nocopy: # qhasm: bytes_backup = bytes # asm 1: movl bytes_backup=stack32#7 # asm 2: movl bytes_backup=24(%esp) movl %ebx,24(%esp) # qhasm: diag0 = *(int128 *) (x + 0) # asm 1: movdqa 0(diag0=int6464#1 # asm 2: movdqa 0(diag0=%xmm0 movdqa 0(%edx),%xmm0 # qhasm: diag1 = *(int128 *) (x + 16) # asm 1: movdqa 16(diag1=int6464#2 # asm 2: movdqa 16(diag1=%xmm1 movdqa 16(%edx),%xmm1 # qhasm: diag2 = *(int128 *) (x + 32) # asm 1: movdqa 32(diag2=int6464#3 # asm 2: movdqa 32(diag2=%xmm2 movdqa 32(%edx),%xmm2 # qhasm: diag3 = *(int128 *) (x + 48) # asm 1: movdqa 48(diag3=int6464#4 # asm 2: movdqa 48(diag3=%xmm3 movdqa 48(%edx),%xmm3 # qhasm: a0 = diag1 <<< 0 # asm 1: pshufd $0xe4,a0=int6464#5 # asm 2: pshufd $0xe4,a0=%xmm4 pshufd $0xe4,%xmm1,%xmm4 # qhasm: b0 = 0 # asm 1: pxor >b0=int6464#6,>b0=int6464#6 # asm 2: pxor >b0=%xmm5,>b0=%xmm5 pxor %xmm5,%xmm5 # qhasm: i = 20 # asm 1: mov $20,>i=int32#1 # asm 2: mov $20,>i=%eax mov $20,%eax # qhasm: mainloop: ._mainloop: # qhasm: uint32323232 a0 += diag0 # asm 1: paddd a1=int6464#7 # asm 2: pshufd $0xe4,a1=%xmm6 pshufd $0xe4,%xmm0,%xmm6 # qhasm: uint32323232 b0 += a0 # asm 1: paddd b1=int6464#8,>b1=int6464#8 # asm 2: pxor >b1=%xmm7,>b1=%xmm7 pxor %xmm7,%xmm7 # qhasm: uint32323232 b0 >>= 25 # asm 1: psrld $25,a2=int6464#5 # asm 2: pshufd $0xe4,a2=%xmm4 pshufd $0xe4,%xmm3,%xmm4 # qhasm: uint32323232 b1 += a1 # asm 1: paddd b2=int6464#6,>b2=int6464#6 # asm 2: pxor >b2=%xmm5,>b2=%xmm5 pxor %xmm5,%xmm5 # qhasm: uint32323232 b1 >>= 23 # asm 1: psrld $23,a3=int6464#7 # asm 2: pshufd $0xe4,a3=%xmm6 pshufd $0xe4,%xmm2,%xmm6 # qhasm: uint32323232 b2 += a2 # asm 1: paddd b3=int6464#8,>b3=int6464#8 # asm 2: pxor >b3=%xmm7,>b3=%xmm7 pxor %xmm7,%xmm7 # qhasm: uint32323232 b2 >>= 19 # asm 1: psrld $19,a4=int6464#5 # asm 2: pshufd $0xe4,a4=%xmm4 pshufd $0xe4,%xmm3,%xmm4 # qhasm: uint32323232 b3 += a3 # asm 1: paddd b4=int6464#6,>b4=int6464#6 # asm 2: pxor >b4=%xmm5,>b4=%xmm5 pxor %xmm5,%xmm5 # qhasm: uint32323232 b3 >>= 14 # asm 1: psrld $14,a5=int6464#7 # asm 2: pshufd $0xe4,a5=%xmm6 pshufd $0xe4,%xmm0,%xmm6 # qhasm: uint32323232 b4 += a4 # asm 1: paddd b5=int6464#8,>b5=int6464#8 # asm 2: pxor >b5=%xmm7,>b5=%xmm7 pxor %xmm7,%xmm7 # qhasm: uint32323232 b4 >>= 25 # asm 1: psrld $25,a6=int6464#5 # asm 2: pshufd $0xe4,a6=%xmm4 pshufd $0xe4,%xmm1,%xmm4 # qhasm: uint32323232 b5 += a5 # asm 1: paddd b6=int6464#6,>b6=int6464#6 # asm 2: pxor >b6=%xmm5,>b6=%xmm5 pxor %xmm5,%xmm5 # qhasm: uint32323232 b5 >>= 23 # asm 1: psrld $23,a7=int6464#7 # asm 2: pshufd $0xe4,a7=%xmm6 pshufd $0xe4,%xmm2,%xmm6 # qhasm: uint32323232 b6 += a6 # asm 1: paddd b7=int6464#8,>b7=int6464#8 # asm 2: pxor >b7=%xmm7,>b7=%xmm7 pxor %xmm7,%xmm7 # qhasm: uint32323232 b6 >>= 19 # asm 1: psrld $19,a0=int6464#5 # asm 2: pshufd $0xe4,a0=%xmm4 pshufd $0xe4,%xmm1,%xmm4 # qhasm: uint32323232 b7 += a7 # asm 1: paddd b0=int6464#6,>b0=int6464#6 # asm 2: pxor >b0=%xmm5,>b0=%xmm5 pxor %xmm5,%xmm5 # qhasm: uint32323232 b7 >>= 14 # asm 1: psrld $14,a1=int6464#7 # asm 2: pshufd $0xe4,a1=%xmm6 pshufd $0xe4,%xmm0,%xmm6 # qhasm: uint32323232 b0 += a0 # asm 1: paddd b1=int6464#8,>b1=int6464#8 # asm 2: pxor >b1=%xmm7,>b1=%xmm7 pxor %xmm7,%xmm7 # qhasm: uint32323232 b0 >>= 25 # asm 1: psrld $25,a2=int6464#5 # asm 2: pshufd $0xe4,a2=%xmm4 pshufd $0xe4,%xmm3,%xmm4 # qhasm: uint32323232 b1 += a1 # asm 1: paddd b2=int6464#6,>b2=int6464#6 # asm 2: pxor >b2=%xmm5,>b2=%xmm5 pxor %xmm5,%xmm5 # qhasm: uint32323232 b1 >>= 23 # asm 1: psrld $23,a3=int6464#7 # asm 2: pshufd $0xe4,a3=%xmm6 pshufd $0xe4,%xmm2,%xmm6 # qhasm: uint32323232 b2 += a2 # asm 1: paddd b3=int6464#8,>b3=int6464#8 # asm 2: pxor >b3=%xmm7,>b3=%xmm7 pxor %xmm7,%xmm7 # qhasm: uint32323232 b2 >>= 19 # asm 1: psrld $19,a4=int6464#5 # asm 2: pshufd $0xe4,a4=%xmm4 pshufd $0xe4,%xmm3,%xmm4 # qhasm: uint32323232 b3 += a3 # asm 1: paddd b4=int6464#6,>b4=int6464#6 # asm 2: pxor >b4=%xmm5,>b4=%xmm5 pxor %xmm5,%xmm5 # qhasm: uint32323232 b3 >>= 14 # asm 1: psrld $14,a5=int6464#7 # asm 2: pshufd $0xe4,a5=%xmm6 pshufd $0xe4,%xmm0,%xmm6 # qhasm: uint32323232 b4 += a4 # asm 1: paddd b5=int6464#8,>b5=int6464#8 # asm 2: pxor >b5=%xmm7,>b5=%xmm7 pxor %xmm7,%xmm7 # qhasm: uint32323232 b4 >>= 25 # asm 1: psrld $25,a6=int6464#5 # asm 2: pshufd $0xe4,a6=%xmm4 pshufd $0xe4,%xmm1,%xmm4 # qhasm: uint32323232 b5 += a5 # asm 1: paddd b6=int6464#6,>b6=int6464#6 # asm 2: pxor >b6=%xmm5,>b6=%xmm5 pxor %xmm5,%xmm5 # qhasm: uint32323232 b5 >>= 23 # asm 1: psrld $23,a7=int6464#7 # asm 2: pshufd $0xe4,a7=%xmm6 pshufd $0xe4,%xmm2,%xmm6 # qhasm: uint32323232 b6 += a6 # asm 1: paddd b7=int6464#8,>b7=int6464#8 # asm 2: pxor >b7=%xmm7,>b7=%xmm7 pxor %xmm7,%xmm7 # qhasm: uint32323232 b6 >>= 19 # asm 1: psrld $19,? i -= 4 # asm 1: sub $4,a0=int6464#5 # asm 2: pshufd $0xe4,a0=%xmm4 pshufd $0xe4,%xmm1,%xmm4 # qhasm: uint32323232 b7 += a7 # asm 1: paddd b0=int6464#6,>b0=int6464#6 # asm 2: pxor >b0=%xmm5,>b0=%xmm5 pxor %xmm5,%xmm5 # qhasm: uint32323232 b7 >>= 14 # asm 1: psrld $14, ja ._mainloop # qhasm: uint32323232 diag0 += *(int128 *) (x + 0) # asm 1: paddd 0(in0=int32#1 # asm 2: movd in0=%eax movd %xmm0,%eax # qhasm: in12 = diag1 # asm 1: movd in12=int32#2 # asm 2: movd in12=%ecx movd %xmm1,%ecx # qhasm: in8 = diag2 # asm 1: movd in8=int32#4 # asm 2: movd in8=%ebx movd %xmm2,%ebx # qhasm: in4 = diag3 # asm 1: movd in4=int32#7 # asm 2: movd in4=%ebp movd %xmm3,%ebp # qhasm: diag0 <<<= 96 # asm 1: pshufd $0x39,in5=int32#1 # asm 2: movd in5=%eax movd %xmm0,%eax # qhasm: in1 = diag1 # asm 1: movd in1=int32#2 # asm 2: movd in1=%ecx movd %xmm1,%ecx # qhasm: in13 = diag2 # asm 1: movd in13=int32#4 # asm 2: movd in13=%ebx movd %xmm2,%ebx # qhasm: in9 = diag3 # asm 1: movd in9=int32#7 # asm 2: movd in9=%ebp movd %xmm3,%ebp # qhasm: diag0 <<<= 96 # asm 1: pshufd $0x39,in10=int32#1 # asm 2: movd in10=%eax movd %xmm0,%eax # qhasm: in6 = diag1 # asm 1: movd in6=int32#2 # asm 2: movd in6=%ecx movd %xmm1,%ecx # qhasm: in2 = diag2 # asm 1: movd in2=int32#4 # asm 2: movd in2=%ebx movd %xmm2,%ebx # qhasm: in14 = diag3 # asm 1: movd in14=int32#7 # asm 2: movd in14=%ebp movd %xmm3,%ebp # qhasm: diag0 <<<= 96 # asm 1: pshufd $0x39,in15=int32#1 # asm 2: movd in15=%eax movd %xmm0,%eax # qhasm: in11 = diag1 # asm 1: movd in11=int32#2 # asm 2: movd in11=%ecx movd %xmm1,%ecx # qhasm: in7 = diag2 # asm 1: movd in7=int32#4 # asm 2: movd in7=%ebx movd %xmm2,%ebx # qhasm: in3 = diag3 # asm 1: movd in3=int32#7 # asm 2: movd in3=%ebp movd %xmm3,%ebp # qhasm: in15 ^= *(uint32 *) (m + 60) # asm 1: xorl 60(bytes=int32#4 # asm 2: movl bytes=%ebx movl 24(%esp),%ebx # qhasm: in8 = *(uint32 *) (x + 32) # asm 1: movl 32(in8=int32#1 # asm 2: movl 32(in8=%eax movl 32(%edx),%eax # qhasm: in9 = *(uint32 *) (x + 52) # asm 1: movl 52(in9=int32#2 # asm 2: movl 52(in9=%ecx movl 52(%edx),%ecx # qhasm: carry? in8 += 1 # asm 1: add $1,? unsigned ja ._bytesatleast65 # comment:fp stack unchanged by jump # qhasm: goto bytesatleast64 if !unsigned< jae ._bytesatleast64 # qhasm: m = out # asm 1: mov m=int32#5 # asm 2: mov m=%esi mov %edi,%esi # qhasm: out = ctarget # asm 1: movl out=int32#6 # asm 2: movl out=%edi movl 20(%esp),%edi # qhasm: i = bytes # asm 1: mov i=int32#2 # asm 2: mov i=%ecx mov %ebx,%ecx # qhasm: while (i) { *out++ = *m++; --i } rep movsb # comment:fp stack unchanged by fallthrough # qhasm: bytesatleast64: ._bytesatleast64: # comment:fp stack unchanged by fallthrough # qhasm: done: ._done: # qhasm: eax = eax_stack # asm 1: movl eax=int32#1 # asm 2: movl eax=%eax movl 0(%esp),%eax # qhasm: ebx = ebx_stack # asm 1: movl ebx=int32#4 # asm 2: movl ebx=%ebx movl 4(%esp),%ebx # qhasm: esi = esi_stack # asm 1: movl esi=int32#5 # asm 2: movl esi=%esi movl 8(%esp),%esi # qhasm: edi = edi_stack # asm 1: movl edi=int32#6 # asm 2: movl edi=%edi movl 12(%esp),%edi # qhasm: ebp = ebp_stack # asm 1: movl ebp=int32#7 # asm 2: movl ebp=%ebp movl 16(%esp),%ebp # qhasm: leave add %eax,%esp ret # qhasm: bytesatleast65: ._bytesatleast65: # qhasm: bytes -= 64 # asm 1: sub $64,eax_stack=stack32#1 # asm 2: movl eax_stack=0(%esp) movl %eax,0(%esp) # qhasm: ebx_stack = ebx # asm 1: movl ebx_stack=stack32#2 # asm 2: movl ebx_stack=4(%esp) movl %ebx,4(%esp) # qhasm: esi_stack = esi # asm 1: movl esi_stack=stack32#3 # asm 2: movl esi_stack=8(%esp) movl %esi,8(%esp) # qhasm: edi_stack = edi # asm 1: movl edi_stack=stack32#4 # asm 2: movl edi_stack=12(%esp) movl %edi,12(%esp) # qhasm: ebp_stack = ebp # asm 1: movl ebp_stack=stack32#5 # asm 2: movl ebp_stack=16(%esp) movl %ebp,16(%esp) # qhasm: k = arg2 # asm 1: movl k=int32#2 # asm 2: movl k=%ecx movl 8(%esp,%eax),%ecx # qhasm: kbits = arg3 # asm 1: movl kbits=int32#3 # asm 2: movl kbits=%edx movl 12(%esp,%eax),%edx # qhasm: x = arg1 # asm 1: movl x=int32#1 # asm 2: movl x=%eax movl 4(%esp,%eax),%eax # qhasm: in1 = *(uint32 *) (k + 0) # asm 1: movl 0(in1=int32#4 # asm 2: movl 0(in1=%ebx movl 0(%ecx),%ebx # qhasm: in2 = *(uint32 *) (k + 4) # asm 1: movl 4(in2=int32#5 # asm 2: movl 4(in2=%esi movl 4(%ecx),%esi # qhasm: in3 = *(uint32 *) (k + 8) # asm 1: movl 8(in3=int32#6 # asm 2: movl 8(in3=%edi movl 8(%ecx),%edi # qhasm: in4 = *(uint32 *) (k + 12) # asm 1: movl 12(in4=int32#7 # asm 2: movl 12(in4=%ebp movl 12(%ecx),%ebp # qhasm: *(uint32 *) (x + 20) = in1 # asm 1: movl in11=int32#3 # asm 2: movl 16(in11=%edx movl 16(%ecx),%edx # qhasm: in12 = *(uint32 *) (k + 20) # asm 1: movl 20(in12=int32#4 # asm 2: movl 20(in12=%ebx movl 20(%ecx),%ebx # qhasm: in13 = *(uint32 *) (k + 24) # asm 1: movl 24(in13=int32#5 # asm 2: movl 24(in13=%esi movl 24(%ecx),%esi # qhasm: in14 = *(uint32 *) (k + 28) # asm 1: movl 28(in14=int32#2 # asm 2: movl 28(in14=%ecx movl 28(%ecx),%ecx # qhasm: *(uint32 *) (x + 28) = in11 # asm 1: movl in0=int32#2 # asm 2: mov $1634760805,>in0=%ecx mov $1634760805,%ecx # qhasm: in5 = 857760878 # asm 1: mov $857760878,>in5=int32#3 # asm 2: mov $857760878,>in5=%edx mov $857760878,%edx # qhasm: in10 = 2036477234 # asm 1: mov $2036477234,>in10=int32#4 # asm 2: mov $2036477234,>in10=%ebx mov $2036477234,%ebx # qhasm: in15 = 1797285236 # asm 1: mov $1797285236,>in15=int32#5 # asm 2: mov $1797285236,>in15=%esi mov $1797285236,%esi # qhasm: *(uint32 *) (x + 0) = in0 # asm 1: movl in11=int32#3 # asm 2: movl 0(in11=%edx movl 0(%ecx),%edx # qhasm: in12 = *(uint32 *) (k + 4) # asm 1: movl 4(in12=int32#4 # asm 2: movl 4(in12=%ebx movl 4(%ecx),%ebx # qhasm: in13 = *(uint32 *) (k + 8) # asm 1: movl 8(in13=int32#5 # asm 2: movl 8(in13=%esi movl 8(%ecx),%esi # qhasm: in14 = *(uint32 *) (k + 12) # asm 1: movl 12(in14=int32#2 # asm 2: movl 12(in14=%ecx movl 12(%ecx),%ecx # qhasm: *(uint32 *) (x + 28) = in11 # asm 1: movl in0=int32#2 # asm 2: mov $1634760805,>in0=%ecx mov $1634760805,%ecx # qhasm: in5 = 824206446 # asm 1: mov $824206446,>in5=int32#3 # asm 2: mov $824206446,>in5=%edx mov $824206446,%edx # qhasm: in10 = 2036477238 # asm 1: mov $2036477238,>in10=int32#4 # asm 2: mov $2036477238,>in10=%ebx mov $2036477238,%ebx # qhasm: in15 = 1797285236 # asm 1: mov $1797285236,>in15=int32#5 # asm 2: mov $1797285236,>in15=%esi mov $1797285236,%esi # qhasm: *(uint32 *) (x + 0) = in0 # asm 1: movl eax=int32#1 # asm 2: movl eax=%eax movl 0(%esp),%eax # qhasm: ebx = ebx_stack # asm 1: movl ebx=int32#4 # asm 2: movl ebx=%ebx movl 4(%esp),%ebx # qhasm: esi = esi_stack # asm 1: movl esi=int32#5 # asm 2: movl esi=%esi movl 8(%esp),%esi # qhasm: edi = edi_stack # asm 1: movl edi=int32#6 # asm 2: movl edi=%edi movl 12(%esp),%edi # qhasm: ebp = ebp_stack # asm 1: movl ebp=int32#7 # asm 2: movl ebp=%ebp movl 16(%esp),%ebp # qhasm: leave add %eax,%esp ret # qhasm: enter ECRYPT_ivsetup .text .p2align 5 .globl _ECRYPT_ivsetup .globl ECRYPT_ivsetup _ECRYPT_ivsetup: ECRYPT_ivsetup: mov %esp,%eax and $31,%eax add $96,%eax sub %eax,%esp # qhasm: eax_stack = eax # asm 1: movl eax_stack=stack32#1 # asm 2: movl eax_stack=0(%esp) movl %eax,0(%esp) # qhasm: ebx_stack = ebx # asm 1: movl ebx_stack=stack32#2 # asm 2: movl ebx_stack=4(%esp) movl %ebx,4(%esp) # qhasm: esi_stack = esi # asm 1: movl esi_stack=stack32#3 # asm 2: movl esi_stack=8(%esp) movl %esi,8(%esp) # qhasm: edi_stack = edi # asm 1: movl edi_stack=stack32#4 # asm 2: movl edi_stack=12(%esp) movl %edi,12(%esp) # qhasm: ebp_stack = ebp # asm 1: movl ebp_stack=stack32#5 # asm 2: movl ebp_stack=16(%esp) movl %ebp,16(%esp) # qhasm: iv = arg2 # asm 1: movl iv=int32#2 # asm 2: movl iv=%ecx movl 8(%esp,%eax),%ecx # qhasm: x = arg1 # asm 1: movl x=int32#1 # asm 2: movl x=%eax movl 4(%esp,%eax),%eax # qhasm: in6 = *(uint32 *) (iv + 0) # asm 1: movl 0(in6=int32#3 # asm 2: movl 0(in6=%edx movl 0(%ecx),%edx # qhasm: in7 = *(uint32 *) (iv + 4) # asm 1: movl 4(in7=int32#2 # asm 2: movl 4(in7=%ecx movl 4(%ecx),%ecx # qhasm: in8 = 0 # asm 1: mov $0,>in8=int32#4 # asm 2: mov $0,>in8=%ebx mov $0,%ebx # qhasm: in9 = 0 # asm 1: mov $0,>in9=int32#5 # asm 2: mov $0,>in9=%esi mov $0,%esi # qhasm: *(uint32 *) (x + 24) = in6 # asm 1: movl eax=int32#1 # asm 2: movl eax=%eax movl 0(%esp),%eax # qhasm: ebx = ebx_stack # asm 1: movl ebx=int32#4 # asm 2: movl ebx=%ebx movl 4(%esp),%ebx # qhasm: esi = esi_stack # asm 1: movl esi=int32#5 # asm 2: movl esi=%esi movl 8(%esp),%esi # qhasm: edi = edi_stack # asm 1: movl edi=int32#6 # asm 2: movl edi=%edi movl 12(%esp),%edi # qhasm: ebp = ebp_stack # asm 1: movl ebp=int32#7 # asm 2: movl ebp=%ebp movl 16(%esp),%ebp # qhasm: leave add %eax,%esp ret