#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 *);
int /*<<< orphan*/ doTest(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  if (argc < 4) {
    puts("Not enough args");
  } else if (argc > 4) {
    puts("Too much args");
  } else {
    doTest(argv[1], argv[2], atoi(argv[3]));
  }
  return 0;
}


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)
cmpl   $0x4,-0x8(%rbp)
jge    1161 <main+0x31>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
jmp    11b5 <main+0x85>
cmpl   $0x4,-0x8(%rbp)
jle    117c <main+0x4c>
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
jmp    11b0 <main+0x80>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <doTest@plt>
jmp    11b5 <main+0x85>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x3,%edi
jg     1142 <main+0x12>
lea    0xec0(%rip),%rdi
jmp    116e <main+0x3e>
cmp    $0x4,%edi
jne    1167 <main+0x37>
mov    0x8(%rsi),%rbx
mov    0x10(%rsi),%r14
mov    0x18(%rsi),%rdi
call   1050 <atoi@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <doTest@plt>
jmp    1173 <main+0x43>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Not enough args\00"
@.str.1 = [14 x i8] c"Too much args\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 slt i32 %6, 4
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %28
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 4
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %27
15: ; preds = %10
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 3
%24 = load i8*, i8** %23
%25 = call i32 @atoi(i8* %24)
%26 = call i32 @doTest(i8* %18, i8* %21, i32 %25)
br label %27
27: ; preds = %15, %13
br label %28
28: ; preds = %27, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Not enough args\00"
@.str.1 = [14 x i8] c"Too much args\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 4
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %19
6: ; preds = %2
%7 = icmp eq i32 %0, 4
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %19
10: ; preds = %6
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8*, i8** %1, i64 3
%16 = load i8*, i8** %15
%17 = tail call i32 @atoi(i8* %16)
%18 = tail call i32 @doTest(i8* %12, i8* %14, i32 %17)
br label %19
19: ; preds = %8, %10, %4
ret i32 0
}