#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int objdump(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  int status;
  int i;
  if (argc <= 2)
    return (objdump(argc == 1 ? "a.out" : argv[1]));
  status = EXIT_SUCCESS;
  i = 1;
  while (argc-- > 1) {
    printf("\n%s:\n\n", argv[i]);
    if (objdump(argv[i++]) == 1)
      status = EXIT_FAILURE;
  }
  return (status);
}


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)
jg     1177 <main+0x57>
cmpl   $0x1,-0x8(%rbp)
jne    115a <main+0x3a>
lea    0xeaf(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    1166 <main+0x46>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <objdump@plt>
mov    %eax,-0x4(%rbp)
jmp    11f1 <main+0xd1>
mov    0x2e5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x1,%eax
jle    11eb <main+0xcb>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <objdump@plt>
cmp    $0x1,%eax
jne    11e6 <main+0xc6>
mov    0x2dff(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    118a <main+0x6a>
mov    -0x14(%rbp),%eax
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   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     1141 <main+0x21>
cmp    $0x1,%edi
jne    11ab <main+0x8b>
lea    0xec1(%rip),%rdi
jmp    11af <main+0x8f>
mov    0x2e90(%rip),%rax
mov    (%rax),%r15d
mov    %edi,%r12d
mov    $0x1,%ebp
lea    0xeac(%rip),%r14
mov    0x2e7f(%rip),%r13
jmp    1175 <main+0x55>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %rbp,%r12
je     1199 <main+0x79>
mov    (%rbx,%rbp,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx,%rbp,8),%rdi
add    $0x1,%rbp
call   1040 <objdump@plt>
cmp    $0x1,%eax
jne    1170 <main+0x50>
mov    0x0(%r13),%r15d
jmp    1170 <main+0x50>
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x8(%rbx),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <objdump@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"a.out\00"
@EXIT_SUCCESS = global i32 0
@.str.1 = [7 x i8] c"\0A%s:\0A\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 2
br i1 %9, label %10, label %21
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %14
13: ; preds = %10
br label %18
14: ; preds = %10
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
br label %18
18: ; preds = %14, %13
%19 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %13 ], [ %17, %14 ]
%20 = call i32 @objdump(i8* %19)
store i32 %20, i32* %3
br label %47
21: ; preds = %2
%22 = load i32, i32* @EXIT_SUCCESS
store i32 %22, i32* %6
store i32 1, i32* %7
br label %23
23: ; preds = %44, %21
%24 = load i32, i32* %4
%25 = add nsw i32 %24, -1
store i32 %25, i32* %4
%26 = icmp sgt i32 %24, 1
br i1 %26, label %27, label %45
27: ; preds = %23
%28 = load i8**, i8*** %5
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8*, i8** %28, i64 %30
%32 = load i8*, i8** %31
%33 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %32)
%34 = load i8**, i8*** %5
%35 = load i32, i32* %7
%36 = add nsw i32 %35, 1
store i32 %36, i32* %7
%37 = sext i32 %35 to i64
%38 = getelementptr inbounds i8*, i8** %34, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @objdump(i8* %39)
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %44
42: ; preds = %27
%43 = load i32, i32* @EXIT_FAILURE
store i32 %43, i32* %6
br label %44
44: ; preds = %42, %27
br label %23
45: ; preds = %23
%46 = load i32, i32* %6
store i32 %46, i32* %3
br label %47
47: ; preds = %45, %18
%48 = load i32, i32* %3
ret i32 %48
}

LLVM IR (-O2):
@.str = [6 x i8] c"a.out\00"
@EXIT_SUCCESS = global i32 0
@.str.1 = [7 x i8] c"\0A%s:\0A\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = icmp eq i32 %0, 1
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
br label %9
9: ; preds = %4, %6
%10 = phi i8* [ %8, %6 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %4 ]
%11 = tail call i32 @objdump(i8* %10)
br label %28
12: ; preds = %2
%13 = load i32, i32* @EXIT_SUCCESS
%14 = zext i32 %0 to i64
br label %15
15: ; preds = %12, %15
%16 = phi i64 [ 1, %12 ], [ %21, %15 ]
%17 = phi i32 [ %13, %12 ], [ %26, %15 ]
%18 = getelementptr inbounds i8*, i8** %1, i64 %16
%19 = load i8*, i8** %18
%20 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = add nuw nsw i64 %16, 1
%22 = load i8*, i8** %18
%23 = tail call i32 @objdump(i8* %22)
%24 = icmp eq i32 %23, 1
%25 = load i32, i32* @EXIT_FAILURE
%26 = select i1 %24, i32 %25, i32 %17
%27 = icmp eq i64 %21, %14
br i1 %27, label %28, label %15
28: ; preds = %15, %9
%29 = phi i32 [ %11, %9 ], [ %26, %15 ]
ret i32 %29
}