#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int checkArguments(int argc, char **argv, char **game) {
  if (argc != 2) {
    fprintf(stderr, "normalize-game: There should be one argument\n");
    return EXIT_FAILURE;
  }
  *game = *(argv + 1);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<checkArguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1153 <checkArguments+0x43>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <checkArguments+0x5e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkArguments>:
push   %rax
cmp    $0x2,%edi
jne    1126 <checkArguments+0x16>
mov    0x8(%rsi),%rax
mov    %rax,(%rdx)
mov    0x2eac(%rip),%rax
jmp    1142 <checkArguments+0x32>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [46 x i8] c"normalize-game: There should be one argument\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @checkArguments(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
store i32 %13, i32* %4
br label %20
14: ; preds = %3
%15 = load i8**, i8*** %6
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = load i8**, i8*** %7
store i8* %17, i8** %18
%19 = load i32, i32* @EXIT_SUCCESS
store i32 %19, i32* %4
br label %20
20: ; preds = %14, %10
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [46 x i8] c"normalize-game: There should be one argument\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @checkArguments(i32 %0, i8** nocapture %1, i8** nocapture writeonly %2) {
%4 = icmp eq i32 %0, 2
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %3
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
store i8* %10, i8** %2
br label %11
11: ; preds = %8, %5
%12 = phi i32* [ @EXIT_FAILURE, %5 ], [ @EXIT_SUCCESS, %8 ]
%13 = load i32, i32* %12
ret i32 %13
}