#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ get_bin_file_list(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strlen(char const *);
int main(int argc, char **argv) {
  char *header_filename;
  char *this_prog = argv[0];
  if ((argv[1] == NULL) || (!strlen((const char *)argv[1]))) {
    printf(
        "\n\tYou need to supply the name of a header file as an argument.\n");
    printf("\n\t\t%s filename\n\n", this_prog);
    exit(0);
  }
  header_filename = argv[1];
  get_bin_file_list(header_filename);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     117f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jne    11a6 <main+0x66>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <get_bin_file_list@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%r14
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     117f <main+0x2f>
mov    %rsi,%rbx
call   1040 <strlen@plt>
test   %eax,%eax
je     117f <main+0x2f>
mov    0x8(%rbx),%rdi
call   1060 <get_bin_file_list@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe8b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6e(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"\0A\09You need to supply the name of a header file as an argument.\0A\00"
@.str.1 = [17 x i8] c"\0A\09\09%s filename\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
store i8* %9, i8** %6
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %20, label %14
14: ; preds = %2
%15 = load i8**, i8*** %4
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @strlen(i8* %17)
%19 = icmp ne i32 %18, 0
br i1 %19, label %25, label %20
20: ; preds = %14, %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%22 = load i8*, i8** %6
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %22)
%24 = call i32 @exit(i32 0)
unreachable
25: ; preds = %14
%26 = load i8**, i8*** %4
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
store i8* %28, i8** %5
%29 = load i8*, i8** %5
%30 = call i32 @get_bin_file_list(i8* %29)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"\0A\09\09%s filename\0A\0A\00"
@str = [63 x i8] c"\0A\09You need to supply the name of a header file as an argument.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 @strlen(i8* %5)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7, %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%13 = tail call i32 @exit(i32 0)
unreachable
14: ; preds = %7
%15 = load i8*, i8** %4
%16 = tail call i32 @get_bin_file_list(i8* %15)
ret i32 0
}