#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 parse_args(int, char **, char **, char **);
int perform_action(char *, char *);
int /*<<< orphan*/ print_usage(char *);
int main(int argc, char *argv[]) {
  char *in_file = NULL;
  char *out_file = NULL;
  int status = 0;
  status = parse_args(argc, argv, &in_file, &out_file);
  if (1 == status) {
    print_usage(argv[0]);
    return status;
  }
  status = perform_action(in_file, out_file);
  return status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1030 <parse_args@plt>
mov    %eax,-0x24(%rbp)
mov    $0x1,%eax
cmp    -0x24(%rbp),%eax
jne    1199 <main+0x69>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <print_usage@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11af <main+0x7f>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <perform_action@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movq   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1030 <parse_args@plt>
cmp    $0x1,%eax
jne    116a <main+0x3a>
mov    (%rbx),%rdi
call   1050 <print_usage@plt>
mov    $0x1,%eax
jmp    1178 <main+0x48>
mov    0x8(%rsp),%rdi
mov    (%rsp),%rsi
call   1040 <perform_action@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i8* null, i8** %7
store i32 0, i32* %8
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @parse_args(i32 %9, i8** %10, i8** %6, i8** %7)
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = icmp eq i32 1, %12
br i1 %13, label %14, label %20
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 @print_usage(i8* %17)
%19 = load i32, i32* %8
store i32 %19, i32* %3
br label %25
20: ; preds = %2
%21 = load i8*, i8** %6
%22 = load i8*, i8** %7
%23 = call i32 @perform_action(i8* %21, i8* %22)
store i32 %23, i32* %8
%24 = load i32, i32* %8
store i32 %24, i32* %3
br label %25
25: ; preds = %20, %14
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%6 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%7 = call i32 @parse_args(i32 %0, i8** %1, i8** %3, i8** %4)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i8*, i8** %1
%11 = call i32 @print_usage(i8* %10)
br label %16
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @perform_action(i8* %13, i8* %14)
br label %16
16: ; preds = %12, %9
%17 = phi i32 [ 1, %9 ], [ %15, %12 ]
ret i32 %17
}