#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 atoi(char *);
int test(int, int);
int main(int argc, char **argv) {
  int ret = 0;
  if (argc >= 3)
    ret |= test(atoi(argv[1]), atoi(argv[2]));
  else {
    ret |= test(10000, 1);
    ret |= test(200000, 2);
    ret |= test(2000000, 3);
    ret |= test(2132310, 4);
    ret |= test(1202730, 7);
    ret |= test(1184710, 8);
    ret |= test(272710, 12);
    ret |= test(14170, 32);
    ret |= test(4170, 320);
  }
  return ret;
}


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)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x8(%rbp)
jl     1179 <main+0x59>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <atoi@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1236 <main+0x116>
mov    $0x2710,%edi
mov    $0x1,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x30d40,%edi
mov    $0x2,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x1e8480,%edi
mov    $0x3,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x208956,%edi
mov    $0x4,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x125a2a,%edi
mov    $0x7,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x1213c6,%edi
mov    $0x8,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x42946,%edi
mov    $0xc,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x375a,%edi
mov    $0x20,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x104a,%edi
mov    $0x140,%esi
call   1040 <test@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x3,%edi
jl     1156 <main+0x36>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1030 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1030 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <test@plt>
mov    $0x2710,%edi
mov    $0x1,%esi
call   1040 <test@plt>
mov    %eax,%ebx
mov    $0x30d40,%edi
mov    $0x2,%esi
call   1040 <test@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    $0x1e8480,%edi
mov    $0x3,%esi
call   1040 <test@plt>
mov    %eax,%r14d
mov    $0x208956,%edi
mov    $0x4,%esi
call   1040 <test@plt>
mov    %eax,%r15d
or     %r14d,%r15d
or     %ebp,%r15d
mov    $0x125a2a,%edi
mov    $0x7,%esi
call   1040 <test@plt>
mov    %eax,%r14d
mov    $0x1213c6,%edi
mov    $0x8,%esi
call   1040 <test@plt>
mov    %eax,%ebp
or     %r14d,%ebp
mov    $0x42946,%edi
mov    $0xc,%esi
call   1040 <test@plt>
mov    %eax,%ebx
or     %ebp,%ebx
or     %r15d,%ebx
mov    $0x375a,%edi
mov    $0x20,%esi
call   1040 <test@plt>
mov    %eax,%ebp
mov    $0x104a,%edi
mov    $0x140,%esi
call   1040 <test@plt>
or     %ebp,%eax
or     %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 3
br i1 %8, label %9, label %21
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
%18 = call i32 @test(i32 %13, i32 %17)
%19 = load i32, i32* %6
%20 = or i32 %19, %18
store i32 %20, i32* %6
br label %49
21: ; preds = %2
%22 = call i32 @test(i32 10000, i32 1)
%23 = load i32, i32* %6
%24 = or i32 %23, %22
store i32 %24, i32* %6
%25 = call i32 @test(i32 200000, i32 2)
%26 = load i32, i32* %6
%27 = or i32 %26, %25
store i32 %27, i32* %6
%28 = call i32 @test(i32 2000000, i32 3)
%29 = load i32, i32* %6
%30 = or i32 %29, %28
store i32 %30, i32* %6
%31 = call i32 @test(i32 2132310, i32 4)
%32 = load i32, i32* %6
%33 = or i32 %32, %31
store i32 %33, i32* %6
%34 = call i32 @test(i32 1202730, i32 7)
%35 = load i32, i32* %6
%36 = or i32 %35, %34
store i32 %36, i32* %6
%37 = call i32 @test(i32 1184710, i32 8)
%38 = load i32, i32* %6
%39 = or i32 %38, %37
store i32 %39, i32* %6
%40 = call i32 @test(i32 272710, i32 12)
%41 = load i32, i32* %6
%42 = or i32 %41, %40
store i32 %42, i32* %6
%43 = call i32 @test(i32 14170, i32 32)
%44 = load i32, i32* %6
%45 = or i32 %44, %43
store i32 %45, i32* %6
%46 = call i32 @test(i32 4170, i32 320)
%47 = load i32, i32* %6
%48 = or i32 %47, %46
store i32 %48, i32* %6
br label %49
49: ; preds = %21, %9
%50 = load i32, i32* %6
ret i32 %50
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = tail call i32 @test(i32 %7, i32 %10)
br label %30
12: ; preds = %2
%13 = tail call i32 @test(i32 10000, i32 1)
%14 = tail call i32 @test(i32 200000, i32 2)
%15 = or i32 %14, %13
%16 = tail call i32 @test(i32 2000000, i32 3)
%17 = or i32 %15, %16
%18 = tail call i32 @test(i32 2132310, i32 4)
%19 = or i32 %17, %18
%20 = tail call i32 @test(i32 1202730, i32 7)
%21 = or i32 %19, %20
%22 = tail call i32 @test(i32 1184710, i32 8)
%23 = or i32 %21, %22
%24 = tail call i32 @test(i32 272710, i32 12)
%25 = or i32 %23, %24
%26 = tail call i32 @test(i32 14170, i32 32)
%27 = or i32 %25, %26
%28 = tail call i32 @test(i32 4170, i32 320)
%29 = or i32 %27, %28
br label %30
30: ; preds = %12, %4
%31 = phi i32 [ %11, %4 ], [ %29, %12 ]
ret i32 %31
}