#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 /*<<< orphan*/ decode(char *);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  size_t i;
  if (argc < 2) {
    fprintf(stderr, "Usage: fstab-decode command [arguments]\n");
    return EXIT_FAILURE;
  }
  for (i = 2; i < (size_t)argc; i++)
    decode(argv[i]);
  execvp(argv[1], argv + 1);
  fprintf(stderr, "fstab-decode: %s: %s\n", argv[1], strerror(errno));
  return 127;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1188 <main+0x48>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e52(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    121d <main+0xdd>
movq   $0x2,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    11c3 <main+0x83>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <decode@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1190 <main+0x50>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1050 <execvp@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rdx
mov    %rax,%rcx
lea    0xe1a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x7f,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%edi
jge    116b <main+0x2b>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%eax
jmp    11d5 <main+0x95>
mov    %rsi,%r14
je     1192 <main+0x52>
mov    %edi,%ebp
mov    $0x2,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1040 <decode@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1180 <main+0x40>
lea    0x8(%r14),%rsi
mov    0x8(%r14),%rdi
call   1050 <execvp@plt>
mov    0x2e3a(%rip),%rax
mov    (%rax),%ebp
mov    0x8(%r14),%rbx
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe68(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x7f,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: fstab-decode command [arguments]\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [22 x i8] c"fstab-decode: %s: %s\0A\00"
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
store i32 %12, i32* %3
br label %42
13: ; preds = %2
store i64 2, i64* %6
br label %14
14: ; preds = %25, %13
%15 = load i64, i64* %6
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = icmp ult i64 %15, %17
br i1 %18, label %19, label %28
19: ; preds = %14
%20 = load i8**, i8*** %5
%21 = load i64, i64* %6
%22 = getelementptr inbounds i8*, i8** %20, i64 %21
%23 = load i8*, i8** %22
%24 = call i32 @decode(i8* %23)
br label %25
25: ; preds = %19
%26 = load i64, i64* %6
%27 = add i64 %26, 1
store i64 %27, i64* %6
br label %14
28: ; preds = %14
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = call i32 @execvp(i8* %31, i8** %33)
%35 = load i32, i32* @stderr
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = load i32, i32* @errno
%40 = call i8* @strerror(i32 %39)
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %38, i8* %40)
store i32 127, i32* %3
br label %42
42: ; preds = %28, %9
%43 = load i32, i32* %3
ret i32 %43
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: fstab-decode command [arguments]\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [22 x i8] c"fstab-decode: %s: %s\0A\00"
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = icmp eq i32 %0, 2
br i1 %5, label %19, label %6
6: ; preds = %4
%7 = zext i32 %0 to i64
br label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
br label %28
12: ; preds = %6, %12
%13 = phi i64 [ %17, %12 ], [ 2, %6 ]
%14 = getelementptr inbounds i8*, i8** %1, i64 %13
%15 = load i8*, i8** %14
%16 = tail call i32 @decode(i8* %15)
%17 = add nuw i64 %13, 1
%18 = icmp eq i64 %17, %7
br i1 %18, label %19, label %12
19: ; preds = %12, %4
%20 = getelementptr inbounds i8*, i8** %1, i64 1
%21 = load i8*, i8** %20
%22 = tail call i32 @execvp(i8* %21, i8** %20)
%23 = load i32, i32* @stderr
%24 = load i8*, i8** %20
%25 = load i32, i32* @errno
%26 = tail call i8* @strerror(i32 %25)
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %24, i8* %26)
br label %28
28: ; preds = %19, %8
%29 = phi i32 [ %11, %8 ], [ 127, %19 ]
ret i32 %29
}