#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*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
scalar_t__ mount(char *, char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv, char **envp) {
  if (argc < 4)
    usage("Invalid argument count");
  if (mount(argv[2], argv[3], argv[1], 0)) {
    fprintf(stderr, "mount: %s\n", strerror(errno));
    return EXIT_FAILURE;
  }
  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)
mov    %rdx,-0x18(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    1170 <main+0x30>
lea    0xe95(%rip),%rdi
call   1050 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
xor    %ecx,%ecx
call   1030 <mount@plt>
cmp    $0x0,%rax
je     11d6 <main+0x96>
mov    0x2e40(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    0x2e2c(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0x1c(%rbp),%edi
mov    %rax,%rdx
lea    0xe57(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e04(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11e2 <main+0xa2>
mov    0x2deb(%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   %rbx
mov    %rsi,%rbx
cmp    $0x3,%edi
jg     1155 <main+0x15>
lea    0xeb0(%rip),%rdi
call   1050 <usage@plt>
mov    0x8(%rbx),%rdx
mov    0x10(%rbx),%rdi
mov    0x18(%rbx),%rsi
xor    %ecx,%ecx
call   1030 <mount@plt>
test   %rax,%rax
je     119e <main+0x5e>
mov    0x2e6c(%rip),%rax
mov    (%rax),%ebx
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe8c(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    0x2e34(%rip),%rax
jmp    11a5 <main+0x65>
mov    0x2e23(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"Invalid argument count\00"
@stderr = global i32 0
@.str.1 = [11 x i8] c"mount: %s\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = icmp slt i32 %0, 4
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @usage(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 3
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = tail call i64 @mount(i8* %9, i8* %11, i8* %13, i32 0)
%15 = icmp eq i64 %14, 0
br i1 %15, label %21, label %16
16: ; preds = %7
%17 = load i32, i32* @stderr
%18 = load i32, i32* @errno
%19 = tail call i8* @strerror(i32 %18)
%20 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %7, %16
%22 = phi i32* [ @EXIT_FAILURE, %16 ], [ @EXIT_SUCCESS, %7 ]
%23 = load i32, i32* %22
ret i32 %23
}