#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*/ atoi(char *);
scalar_t__ is_number(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ start_main_loop(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  if (argc == 2 && is_number(argv[1])) {
    start_main_loop(atoi(argv[1]));
    return 0;
  }
  printf("Wrong argument.\nrancer number_of_draws\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1197 <main+0x57>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <is_number@plt>
cmp    $0x0,%rax
je     1197 <main+0x57>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,%edi
call   1050 <start_main_loop@plt>
movl   $0x0,-0x4(%rbp)
jmp    11aa <main+0x6a>
lea    0xe62(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jne    1169 <main+0x29>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1030 <is_number@plt>
test   %rax,%rax
je     1169 <main+0x29>
mov    0x8(%rbx),%rdi
call   1060 <atoi@plt>
mov    %eax,%edi
call   1050 <start_main_loop@plt>
jmp    1175 <main+0x35>
lea    0xe90(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Wrong argument.\0Arancer number_of_draws\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %20
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @is_number(i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %8
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
%19 = call i32 @start_main_loop(i32 %18)
store i32 0, i32* %3
br label %22
20: ; preds = %8, %2
%21 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %22
22: ; preds = %20, %14
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
@str = [39 x i8] c"Wrong argument.\0Arancer number_of_draws\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @is_number(i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = load i8*, i8** %5
%11 = tail call i32 @atoi(i8* %10)
%12 = tail call i32 @start_main_loop(i32 %11)
br label %15
13: ; preds = %4, %2
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
br label %15
15: ; preds = %13, %9
ret i32 0
}