#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 *);
scalar_t__ strcmp(char *, char *);
int checkArguments(int argc, char **argv) {
  if (argc != 3) {
    printf("Wrong number of arguments ");
    printf("<-c> <column name>\n");
    return 1;
  } else if (argc == 2 && strcmp(argv[1], "-h") == 0) {
    printf("<-c> <column name>\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<checkArguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     115d <checkArguments+0x3d>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    119d <checkArguments+0x7d>
cmpl   $0x2,-0x8(%rbp)
jne    1191 <checkArguments+0x71>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1191 <checkArguments+0x71>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    1196 <checkArguments+0x76>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkArguments>:
xor    %eax,%eax
cmp    $0x3,%edi
je     1149 <checkArguments+0x29>
push   %rax
lea    0xed1(%rip),%rdi
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Wrong number of arguments \00"
@.str.1 = [20 x i8] c"<-c> <column name>\0A\00"
@.str.2 = [3 x i8] c"-h\00"
define i32 @checkArguments(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 3
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %24
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %22
14: ; preds = %11
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %14
%21 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %20, %14, %11
br label %23
23: ; preds = %22
store i32 0, i32* %3
br label %24
24: ; preds = %23, %8
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [27 x i8] c"Wrong number of arguments \00"
@str = [19 x i8] c"<-c> <column name>\00"
define i32 @checkArguments(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ 1, %4 ], [ 0, %2 ]
ret i32 %8
}