#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*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int i;
  int a[] = {0, 0};
  for (i = 0; i < 2; i++)
    scanf("%d", a + i);
  printf("%d\n", a[0] || a[1]);
  return a[0] || a[1];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1c(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1190 <main+0x60>
lea    -0x1c(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe83(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115d <main+0x2d>
mov    $0x1,%al
cmpl   $0x0,-0x1c(%rbp)
mov    %al,-0x1d(%rbp)
jne    11a9 <main+0x79>
cmpl   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x1c(%rbp)
mov    %al,-0x1e(%rbp)
jne    11d6 <main+0xa6>
cmpl   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x1e(%rbp)
mov    -0x1e(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
lea    0xecb(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
xor    %esi,%esi
or     0xc(%rsp),%eax
setne  %sil
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%ecx
xor    %eax,%eax
or     0xc(%rsp),%ecx
setne  %al
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [2 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [2 x i32]* %7 to i8*
store i32 0, i32* %6
br label %9
9: ; preds = %18, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 2
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %16)
br label %18
18: ; preds = %12
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %9
21: ; preds = %9
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%23 = load i32, i32* %22
%24 = icmp ne i32 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %21
%26 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%27 = load i32, i32* %26
%28 = icmp ne i32 %27, 0
br label %29
29: ; preds = %25, %21
%30 = phi i1 [ true, %21 ], [ %28, %25 ]
%31 = zext i1 %30 to i32
%32 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%34 = load i32, i32* %33
%35 = icmp ne i32 %34, 0
br i1 %35, label %40, label %36
36: ; preds = %29
%37 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%38 = load i32, i32* %37
%39 = icmp ne i32 %38, 0
br label %40
40: ; preds = %36, %29
%41 = phi i1 [ true, %29 ], [ %39, %36 ]
%42 = zext i1 %41 to i32
ret i32 %42
}

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