#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 *, ...);
int main(int argc, char **argv) {
  if (argc == 1)
    printf("You have no argument. You suck.\n");
  else if (argc > 1 && argc < 4) {
    printf("Here is your arguments:\n");
    int i;
    for (i = 1; i < argc; ++i)
      printf("\t%s\n", argv[i]);
  } else
    printf("You have too many arguments. You suck.\n");
  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   $0x1,-0x8(%rbp)
jne    1143 <main+0x33>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b8 <main+0xa8>
cmpl   $0x1,-0x8(%rbp)
jle    11a5 <main+0x95>
cmpl   $0x4,-0x8(%rbp)
jge    11a5 <main+0x95>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11a0 <main+0x90>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116c <main+0x5c>
jmp    11b3 <main+0xa3>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b8 <main+0xa8>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x1,%edi
jne    1135 <main+0x15>
lea    0xf11(%rip),%rdi
jmp    1180 <main+0x60>
mov    %edi,%ebp
mov    %edi,%eax
and    $0xfffffffe,%eax
cmp    $0x2,%eax
jne    1179 <main+0x59>
mov    %rsi,%r15
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%ebp
mov    $0x1,%ebx
lea    0xea2(%rip),%r14
xchg   %ax,%ax
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1160 <main+0x40>
jmp    1185 <main+0x65>
lea    0xe85(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"You have no argument. You suck.\0A\00"
@.str.1 = [25 x i8] c"Here is your arguments:\0A\00"
@.str.2 = [5 x i8] c"\09%s\0A\00"
@.str.3 = [40 x i8] c"You have too many arguments. You suck.\0A\00"
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
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %37
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp sgt i32 %12, 1
br i1 %13, label %14, label %34
14: ; preds = %11
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 4
br i1 %16, label %17, label %34
17: ; preds = %14
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %6
br label %19
19: ; preds = %30, %17
%20 = load i32, i32* %6
%21 = load i32, i32* %4
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %33
23: ; preds = %19
%24 = load i8**, i8*** %5
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %28)
br label %30
30: ; preds = %23
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %19
33: ; preds = %19
br label %36
34: ; preds = %14, %11
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %34, %33
br label %37
37: ; preds = %36, %9
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [5 x i8] c"\09%s\0A\00"
@str = [39 x i8] c"You have too many arguments. You suck.\00"
@str.4 = [24 x i8] c"Here is your arguments:\00"
@str.5 = [32 x i8] c"You have no argument. You suck.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = and i32 %0, -2
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0))
%9 = zext i32 %0 to i64
br label %10
10: ; preds = %7, %10
%11 = phi i64 [ 1, %7 ], [ %15, %10 ]
%12 = getelementptr inbounds i8*, i8** %1, i64 %11
%13 = load i8*, i8** %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%15 = add nuw nsw i64 %11, 1
%16 = icmp eq i64 %15, %9
br i1 %16, label %20, label %10
17: ; preds = %4, %2
%18 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @str.5, i64 0, i64 0), %2 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0), %4 ]
%19 = tail call i32 @puts(i8* dereferenceable(1) %18)
br label %20
20: ; preds = %10, %17
ret i32 0
}