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