#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ iterate_parsers(char *, char *);
int /*<<< orphan*/ set_mount_base(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  char *mountpoint, *dev;
  if (argc != 3) {
    fprintf(stderr, "usage: %s <basedir> <devname>\n", argv[0]);
    return EXIT_FAILURE;
  }
  mountpoint = argv[1];
  dev = argv[2];
  set_mount_base(mountpoint);
  iterate_parsers(dev, mountpoint);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     117d <main+0x4d>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe99(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11b7 <main+0x87>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <set_mount_base@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <iterate_parsers@plt>
mov    0x2e1e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x3,%edi
jne    115d <main+0x2d>
mov    0x8(%rsi),%rbx
mov    0x10(%rsi),%r14
mov    %rbx,%rdi
call   1050 <set_mount_base@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <iterate_parsers@plt>
mov    0x2e75(%rip),%rax
jmp    117c <main+0x4c>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"usage: %s <basedir> <devname>\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 3
br i1 %9, label %10, label %17
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* @EXIT_FAILURE
store i32 %16, i32* %3
br label %30
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
store i8* %20, i8** %6
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
store i8* %23, i8** %7
%24 = load i8*, i8** %6
%25 = call i32 @set_mount_base(i8* %24)
%26 = load i8*, i8** %7
%27 = load i8*, i8** %6
%28 = call i32 @iterate_parsers(i8* %26, i8* %27)
%29 = load i32, i32* @EXIT_SUCCESS
store i32 %29, i32* %3
br label %30
30: ; preds = %17, %10
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"usage: %s <basedir> <devname>\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %15
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @set_mount_base(i8* %10)
%14 = tail call i32 @iterate_parsers(i8* %12, i8* %10)
br label %15
15: ; preds = %8, %4
%16 = phi i32* [ @EXIT_FAILURE, %4 ], [ @EXIT_SUCCESS, %8 ]
%17 = load i32, i32* %16
ret i32 %17
}