#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_FAILURE;
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *, ...);
int proxr_main(int, char **);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  if (argc < 2)
    errx(EXIT_FAILURE, "Must specify port backend (e.g. proxr)");
  if (strcmp(argv[1], "proxr") == 0)
    return proxr_main(argc, argv);
  else
    errx(EXIT_FAILURE, "Unknown port backend '%s'", argv[1]);
  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)
cmpl   $0x2,-0x8(%rbp)
jge    1167 <main+0x37>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
mov    $0x0,%al
call   1030 <errx@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1199 <main+0x69>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <proxr_main@plt>
mov    %eax,-0x4(%rbp)
jmp    11bf <main+0x8f>
mov    0x2e40(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe7c(%rip),%rsi
mov    $0x0,%al
call   1030 <errx@plt>
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
cmp    $0x1,%edi
jg     1154 <main+0x24>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
xor    %eax,%eax
call   1030 <errx@plt>
mov    0x8(%rbx),%rdi
lea    0xec8(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1190 <main+0x60>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xeb0(%rip),%rsi
xor    %eax,%eax
call   1030 <errx@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <proxr_main@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [39 x i8] c"Must specify port backend (e.g. proxr)\00"
@.str.1 = [6 x i8] c"proxr\00"
@.str.2 = [26 x i8] c"Unknown port backend '%s'\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 = icmp slt i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 (i32, i8*, ...) @errx(i32 %9, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = call i32 @proxr_main(i32 %18, i8** %19)
store i32 %20, i32* %3
br label %28
21: ; preds = %11
%22 = load i32, i32* @EXIT_FAILURE
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 (i32, i8*, ...) @errx(i32 %22, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %25)
br label %27
27: ; preds = %21
store i32 1, i32* %3
br label %28
28: ; preds = %27, %17
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [39 x i8] c"Must specify port backend (e.g. proxr)\00"
@.str.1 = [6 x i8] c"proxr\00"
@.str.2 = [26 x i8] c"Unknown port backend '%s'\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 (i32, i8*, ...) @errx(i32 %5, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = tail call i32 @proxr_main(i32 %0, i8** %1)
br label %18
14: ; preds = %7
%15 = load i32, i32* @EXIT_FAILURE
%16 = load i8*, i8** %8
%17 = tail call i32 (i32, i8*, ...) @errx(i32 %15, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %14, %12
%19 = phi i32 [ %13, %12 ], [ 1, %14 ]
ret i32 %19
}