#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*/ exec_trace(char *, char **, char **);
scalar_t__ get_complete_path(char *, char *);
int /*<<< orphan*/ printf(char *);
int main(int ac, char **av, char **env) {
  char ret[1024];
  if (ac < 2) {
    printf("fdp\n");
    return (-1);
  }
  if (get_complete_path(ret, av[1]) < 0) {
    printf("fdp\n");
    return (-1);
  }
  exec_trace(ret, av + 1, env);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116f <main+0x3f>
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11c4 <main+0x94>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <get_complete_path@plt>
cmp    $0x0,%rax
jge    11a5 <main+0x75>
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11c4 <main+0x94>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    -0x18(%rbp),%rdx
call   1050 <exec_trace@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x408,%rsp
cmp    $0x1,%edi
jle    116c <main+0x3c>
mov    %rdx,%r14
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
mov    %rsp,%rdi
call   1030 <get_complete_path@plt>
test   %rax,%rax
js     116c <main+0x3c>
add    $0x8,%rbx
mov    %rsp,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <exec_trace@plt>
xor    %eax,%eax
jmp    117d <main+0x4d>
lea    0xe8d(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fdp\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca [1024 x i8]
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %4
br label %28
13: ; preds = %3
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%15 = load i8**, i8*** %6
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i64 @get_complete_path(i8* %14, i8* %17)
%19 = icmp slt i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %13
%21 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %4
br label %28
22: ; preds = %13
%23 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%24 = load i8**, i8*** %6
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8**, i8*** %7
%27 = call i32 @exec_trace(i8* %23, i8** %25, i8** %26)
store i32 0, i32* %4
br label %28
28: ; preds = %22, %20, %11
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
@str.1 = [4 x i8] c"fdp\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = icmp slt i32 %0, 2
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.1, i64 0, i64 0))
br label %18
9: ; preds = %3
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @get_complete_path(i8* %5, i8* %11)
%13 = icmp slt i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.1, i64 0, i64 0))
br label %18
16: ; preds = %9
%17 = call i32 @exec_trace(i8* %5, i8** %10, i8** %2)
br label %18
18: ; preds = %16, %14, %7
%19 = phi i32 [ -1, %7 ], [ -1, %14 ], [ 0, %16 ]
ret i32 %19
}