#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 run_command(int, char **);
int /*<<< orphan*/ show_presentation();
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    show_presentation();
    return 0;
  }
  int i;
  for (i = 1; i < argc; i++) {
    if (!strcmp("--help", argv[i])) {
      show_presentation();
      return 0;
    }
  }
  return run_command(argc, argv);
}


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   $0x2,-0x8(%rbp)
jge    1163 <main+0x33>
mov    $0x0,%al
call   1040 <show_presentation@plt>
movl   $0x0,-0x4(%rbp)
jmp    11cc <main+0x9c>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11bd <main+0x8d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe77(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11aa <main+0x7a>
mov    $0x0,%al
call   1040 <show_presentation@plt>
movl   $0x0,-0x4(%rbp)
jmp    11cc <main+0x9c>
jmp    11af <main+0x7f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116a <main+0x3a>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <run_command@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    $0x2,%edi
jge    114f <main+0x1f>
xor    %eax,%eax
call   1040 <show_presentation@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rsi,%r12
mov    %edi,%r14d
mov    %edi,%ebp
mov    $0x1,%ebx
lea    0xe9d(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r12,%rbx,8),%rsi
mov    %r15,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     113d <main+0xd>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1170 <main+0x40>
mov    %r14d,%edi
mov    %r12,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <run_command@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"--help\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 slt i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @show_presentation()
store i32 0, i32* %3
br label %34
11: ; preds = %2
store i32 1, i32* %6
br label %12
12: ; preds = %27, %11
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %30
16: ; preds = %12
%17 = load i8**, i8*** %5
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = load i8*, i8** %20
%22 = call i32 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %26, label %24
24: ; preds = %16
%25 = call i32 (...) @show_presentation()
store i32 0, i32* %3
br label %34
26: ; preds = %16
br label %27
27: ; preds = %26
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %12
30: ; preds = %12
%31 = load i32, i32* %4
%32 = load i8**, i8*** %5
%33 = call i32 @run_command(i32 %31, i8** %32)
store i32 %33, i32* %3
br label %34
34: ; preds = %30, %24, %9
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
@.str = [7 x i8] c"--help\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %10
6: ; preds = %2
%7 = tail call i32 (...) @show_presentation()
br label %21
8: ; preds = %10
%9 = icmp eq i64 %16, %5
br i1 %9, label %19, label %10
10: ; preds = %4, %8
%11 = phi i64 [ 1, %4 ], [ %16, %8 ]
%12 = getelementptr inbounds i8*, i8** %1, i64 %11
%13 = load i8*, i8** %12
%14 = tail call i32 @strcmp(i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* dereferenceable(1) %13)
%15 = icmp eq i32 %14, 0
%16 = add nuw nsw i64 %11, 1
br i1 %15, label %17, label %8
17: ; preds = %10
%18 = tail call i32 (...) @show_presentation()
br label %21
19: ; preds = %8
%20 = tail call i32 @run_command(i32 %0, i8** %1)
br label %21
21: ; preds = %17, %19, %6
%22 = phi i32 [ 0, %6 ], [ 0, %17 ], [ %20, %19 ]
ret i32 %22
}