#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ game(int, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  while (1) {
    int s0, r0, s1, r1;
    scanf("%d %d %d %d", &s0, &r0, &s1, &r1);
    if (!s0 && !r0 && !s1 && !r1)
      break;
    game(s0, r0, s1, r1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1178 <main+0x58>
cmpl   $0x0,-0xc(%rbp)
jne    1178 <main+0x58>
cmpl   $0x0,-0x10(%rbp)
jne    1178 <main+0x58>
cmpl   $0x0,-0x14(%rbp)
jne    1178 <main+0x58>
jmp    118e <main+0x6e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <game@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecc(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0x4(%rsp),%r13
mov    %rsp,%rbx
jmp    1155 <main+0x35>
nopl   0x0(%rax,%rax,1)
call   1040 <game@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
call   1030 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
test   %edi,%edi
jne    1150 <main+0x30>
test   %esi,%esi
jne    1150 <main+0x30>
test   %edx,%edx
jne    1150 <main+0x30>
test   %ecx,%ecx
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d %d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
br label %6
6: ; preds = %0, %20
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5)
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 0
br i1 %9, label %20, label %10
10: ; preds = %6
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
br i1 %12, label %20, label %13
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 0
br i1 %15, label %20, label %16
16: ; preds = %13
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %16
br label %26
20: ; preds = %16, %13, %10, %6
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = call i32 @game(i32 %21, i32 %22, i32 %23, i32 %24)
br label %6
26: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
br label %9
9: ; preds = %22, %0
%10 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%11 = load i32, i32* %1
%12 = icmp ne i32 %11, 0
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
%15 = select i1 %12, i1 true, i1 %14
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 0
%18 = select i1 %15, i1 true, i1 %17
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 0
%21 = select i1 %18, i1 true, i1 %20
br i1 %21, label %22, label %24
22: ; preds = %9
%23 = call i32 @game(i32 %11, i32 %13, i32 %16, i32 %19)
br label %9
24: ; preds = %9
ret i32 0
}