section .bss
a11 resd 1
a12 resd 1
a21 resd 1
a22 resd 1
b1 resd 1
b2 resd 1
x resd 1
y resd 1
section .data
fmt_in db "%u %u %u %u %u %u", 0
fmt_out db "%u %u", 10, 0
section .text
global main
extern scanf
extern printf
main:
push ebp
mov ebp, esp
push b2
push b1
push a22
push a21
push a12
push a11
push fmt_in
call scanf
add esp, 28
mov eax, [a11]
mov ebx, [a22]
and eax, ebx
mov ecx, [a12]
mov edx, [a21]
and ecx, edx
xor eax, ecx
mov edi, eax
mov eax, [b1]
mov ebx, [a22]
and eax, ebx
mov ecx, [b2]
mov edx, [a12]
and ecx, edx
xor eax, ecx
mov esi, eax
mov eax, [a11]
mov ebx, [b2]
and eax, ebx
mov ecx, [a21]
mov edx, [b1]
and ecx, edx
xor eax, ecx
mov ebp, eax
mov eax, [a11]
or eax, [a21]
mov ebx, [a12]
or ebx, [a22]
mov ecx, [b1]
or ecx, [b2]
mov edx, eax
and edx, ecx
mov [x+4], edx
not eax
and eax, ebx
and eax, ecx
mov [y+4], eax
mov eax, edi
mov ebx, eax
not ebx
mov ecx, esi
and ecx, eax
mov edx, [x+4]
and edx, ebx
or ecx, edx
mov [x], ecx
mov ecx, ebp
and ecx, eax
mov edx, [y+4]
and edx, ebx
or ecx, edx
mov [y], ecx
push dword [y]
push dword [x]
push fmt_out
call printf
add esp, 12
mov esp, ebp
pop ebp
xor eax, eax
ret