#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 */
scalar_t__ bu_handle_version(int, char **);
scalar_t__ has_arg(int, char **, char *);
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  if (has_arg(argc, argv, "-h") || has_arg(argc, argv, "--help")) {
    puts("Usage: false");
    puts("Do nothing and fail.");
  }
  if (bu_handle_version(argc, argv)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdx
call   1040 <has_arg@plt>
cmp    $0x0,%rax
jne    1180 <main+0x50>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe92(%rip),%rdx
call   1040 <has_arg@plt>
cmp    $0x0,%rax
je     1198 <main+0x68>
lea    0xe83(%rip),%rdi
call   1030 <puts@plt>
lea    0xe84(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <bu_handle_version@plt>
cmp    $0x0,%rax
je     11ba <main+0x8a>
movl   $0x0,-0x4(%rbp)
jmp    11c1 <main+0x91>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdx
call   1040 <has_arg@plt>
test   %rax,%rax
jne    115f <main+0x2f>
lea    0xeb3(%rip),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <has_arg@plt>
test   %rax,%rax
je     1177 <main+0x47>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <bu_handle_version@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-h\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [13 x i8] c"Usage: false\00"
@.str.3 = [21 x i8] c"Do nothing and fail.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i64 @has_arg(i32 %6, i8** %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call i64 @has_arg(i32 %11, i8** %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %10, %2
%16 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %18
18: ; preds = %15, %10
%19 = load i32, i32* %4
%20 = load i8**, i8*** %5
%21 = call i64 @bu_handle_version(i32 %19, i8** %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %18
store i32 0, i32* %3
br label %25
24: ; preds = %18
store i32 1, i32* %3
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [13 x i8] c"Usage: false\00"
@.str.3 = [21 x i8] c"Do nothing and fail.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i64 @has_arg(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i64 @has_arg(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %5, %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %11
11: ; preds = %8, %5
%12 = tail call i64 @bu_handle_version(i32 %0, i8** %1)
%13 = icmp eq i64 %12, 0
%14 = zext i1 %13 to i32
ret i32 %14
}