#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*/ help(char **);
int /*<<< orphan*/ sleep(int /*<<< orphan*/);
int main(int argc, char **argv) {
  if (argc < 2) {
    help((char **)&argv[0]);
    return 0;
  }
  if (argc >= 2) {
    if (*argv[1] == '-') {
      help((char **)&argv[0]);
      return 0;
    }
    sleep(atoi(argv[1]));
  }
  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)
jge    1165 <main+0x35>
mov    -0x10(%rbp),%rdi
call   1030 <help@plt>
movl   $0x0,-0x4(%rbp)
jmp    11b3 <main+0x83>
cmpl   $0x2,-0x8(%rbp)
jl     11ac <main+0x7c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1198 <main+0x68>
mov    -0x10(%rbp),%rdi
call   1030 <help@plt>
movl   $0x0,-0x4(%rbp)
jmp    11b3 <main+0x83>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <sleep@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    113f <main+0xf>
mov    0x8(%rsi),%rdi
cmpb   $0x2d,(%rdi)
jne    1149 <main+0x19>
mov    %rsi,%rdi
call   1030 <help@plt>
jmp    1155 <main+0x25>
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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, 2
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = call i32 @help(i8** %10)
store i32 0, i32* %3
br label %33
12: ; preds = %2
%13 = load i32, i32* %4
%14 = icmp sge i32 %13, 2
br i1 %14, label %15, label %32
15: ; preds = %12
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 45
br i1 %21, label %22, label %26
22: ; preds = %15
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 0
%25 = call i32 @help(i8** %24)
store i32 0, i32* %3
br label %33
26: ; preds = %15
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32 @atoi(i8* %29)
%31 = call i32 @sleep(i32 %30)
br label %32
32: ; preds = %26, %12
store i32 0, i32* %3
br label %33
33: ; preds = %32, %22, %8
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @help(i8** %1)
br label %16
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 45
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = tail call i32 @help(i8** %1)
br label %16
13: ; preds = %6
%14 = tail call i32 @atoi(i8* %8)
%15 = tail call i32 @sleep(i32 %14)
br label %16
16: ; preds = %13, %11, %4
ret i32 0
}