#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 */
struct stat {
  scalar_t__ st_rdev;
  scalar_t__ st_dev;
  scalar_t__ st_ino;
  int /*<<< orphan*/ st_mode;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ S_ISBLK(int /*<<< orphan*/);
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
scalar_t__ dostat(char *, struct stat *, int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int getopt(int, char **, char *);
int major(scalar_t__);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int minor(scalar_t__);
int optind;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  struct stat st, st2;
  char buf[256];
  char *path;
  int quiet = 0;
  int showdev = 0;
  int xdev = 0;
  int c, r;
  while ((c = getopt(argc, argv, "dqx")) != EOF)
    switch (c) {
    case 'd':
      showdev = 1;
      break;
    case 'q':
      quiet = 1;
      break;
    case 'x':
      xdev = 1;
      break;
    default:
      usage();
      break;
    }
  if (optind != argc - 1)
    usage();
  path = argv[optind];
  if (dostat(path, &st, !xdev, quiet) < 0)
    return 1;
  if (xdev) {
    if (!S_ISBLK(st.st_mode)) {
      if (quiet)
        printf("\n");
      else
        fprintf(stderr, "mountpoint: %s: not a block device\n", path);
      return 1;
    }
    printf("%u:%u\n", major(st.st_rdev), minor(st.st_rdev));
    return 0;
  }
  if (!S_ISDIR(st.st_mode)) {
    if (!quiet)
      fprintf(stderr, "mountpoint: %s: not a directory\n", path);
    return 1;
  }
  memset(buf, 0, sizeof(buf));
  strncpy(buf, path, sizeof(buf) - 4);
  strcat(buf, "/..");
  if (dostat(buf, &st2, 0, quiet) < 0)
    return 1;
  r = (st.st_dev != st2.st_dev) ||
      (st.st_dev == st2.st_dev && st.st_ino == st2.st_ino);
  if (!quiet && !showdev)
    printf("%s is %sa mountpoint\n", path, r ? "" : "not ");
  if (showdev)
    printf("%u:%u\n", major(st.st_dev), minor(st.st_dev));
  return r ? 0 : 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x15c(%rbp)
movl   $0x0,-0x160(%rbp)
movl   $0x0,-0x164(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdfb(%rip),%rdx
call   10d0 <getopt@plt>
mov    %eax,-0x168(%rbp)
mov    0x2dd1(%rip),%rcx
cmp    (%rcx),%eax
je     129a <main+0xda>
mov    -0x168(%rbp),%eax
mov    %eax,-0x170(%rbp)
sub    $0x64,%eax
je     1261 <main+0xa1>
jmp    1239 <main+0x79>
mov    -0x170(%rbp),%eax
sub    $0x71,%eax
je     1270 <main+0xb0>
jmp    124d <main+0x8d>
mov    -0x170(%rbp),%eax
sub    $0x78,%eax
je     127f <main+0xbf>
jmp    128e <main+0xce>
movl   $0x1,-0x160(%rbp)
jmp    1295 <main+0xd5>
movl   $0x1,-0x15c(%rbp)
jmp    1295 <main+0xd5>
movl   $0x1,-0x164(%rbp)
jmp    1295 <main+0xd5>
mov    $0x0,%al
call   10c0 <usage@plt>
jmp    11f7 <main+0x37>
mov    0x2d3f(%rip),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     12b8 <main+0xf8>
mov    $0x0,%al
call   10c0 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x2d1d(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x158(%rbp)
mov    -0x158(%rbp),%rdi
cmpl   $0x0,-0x164(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edx
mov    -0x15c(%rbp),%ecx
lea    -0x30(%rbp),%rsi
call   1040 <dostat@plt>
cmp    $0x0,%rax
jge    130e <main+0x14e>
movl   $0x1,-0x4(%rbp)
jmp    1555 <main+0x395>
cmpl   $0x0,-0x164(%rbp)
je     13ae <main+0x1ee>
mov    -0x18(%rbp),%edi
call   10b0 <S_ISBLK@plt>
cmp    $0x0,%eax
jne    1374 <main+0x1b4>
cmpl   $0x0,-0x15c(%rbp)
je     134c <main+0x18c>
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1368 <main+0x1a8>
mov    0x2c7d(%rip),%rax
mov    (%rax),%edi
mov    -0x158(%rbp),%rdx
lea    0xca1(%rip),%rsi
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1555 <main+0x395>
mov    -0x30(%rbp),%rdi
call   1080 <major@plt>
mov    %eax,-0x174(%rbp)
mov    -0x30(%rbp),%rdi
call   1050 <minor@plt>
mov    -0x174(%rbp),%esi
mov    %eax,%edx
lea    0xc8d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1555 <main+0x395>
mov    -0x18(%rbp),%edi
call   1070 <S_ISDIR@plt>
cmp    $0x0,%eax
jne    13f4 <main+0x234>
cmpl   $0x0,-0x15c(%rbp)
jne    13e8 <main+0x228>
mov    0x2bfd(%rip),%rax
mov    (%rax),%edi
mov    -0x158(%rbp),%rdx
lea    0xc4c(%rip),%rsi
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1555 <main+0x395>
lea    -0x150(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1090 <memset@plt>
lea    -0x150(%rbp),%rdi
mov    -0x158(%rbp),%rsi
mov    $0xfc,%edx
call   1030 <strncpy@plt>
lea    -0x150(%rbp),%rdi
lea    0xc23(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x150(%rbp),%rdi
mov    -0x15c(%rbp),%ecx
lea    -0x50(%rbp),%rsi
xor    %edx,%edx
call   1040 <dostat@plt>
cmp    $0x0,%rax
jge    1460 <main+0x2a0>
movl   $0x1,-0x4(%rbp)
jmp    1555 <main+0x395>
mov    -0x28(%rbp),%rcx
mov    $0x1,%al
cmp    -0x48(%rbp),%rcx
mov    %al,-0x175(%rbp)
jne    14a9 <main+0x2e9>
mov    -0x28(%rbp),%rcx
xor    %eax,%eax
cmp    -0x48(%rbp),%rcx
mov    %al,-0x176(%rbp)
jne    149d <main+0x2dd>
mov    -0x20(%rbp),%rax
cmp    -0x40(%rbp),%rax
sete   %al
mov    %al,-0x176(%rbp)
mov    -0x176(%rbp),%al
mov    %al,-0x175(%rbp)
mov    -0x175(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x16c(%rbp)
cmpl   $0x0,-0x15c(%rbp)
jne    1504 <main+0x344>
cmpl   $0x0,-0x160(%rbp)
jne    1504 <main+0x344>
mov    -0x158(%rbp),%rsi
mov    -0x16c(%rbp),%ecx
lea    0xb82(%rip),%rdx
lea    0xb38(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xb57(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x160(%rbp)
je     153f <main+0x37f>
mov    -0x28(%rbp),%rdi
call   1080 <major@plt>
mov    %eax,-0x17c(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <minor@plt>
mov    -0x17c(%rbp),%esi
mov    %eax,%edx
lea    0xaf0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x16c(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
mov    %rsi,%rbp
mov    %edi,%ebx
lea    0xe13(%rip),%rdx
call   10e0 <getopt@plt>
mov    0x2def(%rip),%r12
movl   $0x0,0xc(%rsp)
mov    $0x0,%r13d
mov    $0x0,%r15d
cmp    (%r12),%eax
jne    12a8 <main+0xd8>
mov    0x2dc2(%rip),%r14
mov    (%r14),%eax
add    $0xffffffff,%ebx
cmp    %ebx,%eax
je     1232 <main+0x62>
xor    %eax,%eax
call   10d0 <usage@plt>
mov    (%r14),%eax
cltq
mov    0x0(%rbp,%rax,8),%r14
xor    %edx,%edx
test   %r13d,%r13d
sete   %dl
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
mov    %r15d,%ecx
call   1050 <dostat@plt>
mov    $0x1,%ebp
test   %rax,%rax
js     1431 <main+0x261>
mov    0x28(%rsp),%edi
test   %r13d,%r13d
je     1318 <main+0x148>
call   10c0 <S_ISBLK@plt>
test   %eax,%eax
je     13f1 <main+0x221>
mov    0x10(%rsp),%rdi
call   1090 <major@plt>
mov    %eax,%ebx
mov    0x10(%rsp),%rdi
call   1060 <minor@plt>
lea    0xd92(%rip),%rdi
xor    %ebp,%ebp
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1431 <main+0x261>
lea    0xd51(%rip),%r14
xor    %r15d,%r15d
xor    %r13d,%r13d
movl   $0x0,0xc(%rsp)
jmp    12de <main+0x10e>
nop
xor    %eax,%eax
call   10d0 <usage@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    %r14,%rdx
call   10e0 <getopt@plt>
cmp    (%r12),%eax
je     1217 <main+0x47>
cmp    $0x64,%eax
je     1300 <main+0x130>
cmp    $0x78,%eax
je     1310 <main+0x140>
cmp    $0x71,%eax
jne    12c0 <main+0xf0>
mov    $0x1,%r15d
jmp    12c7 <main+0xf7>
cs nopw 0x0(%rax,%rax,1)
nop
movl   $0x1,0xc(%rsp)
jmp    12c7 <main+0xf7>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%r13d
jmp    12c7 <main+0xf7>
call   1080 <S_ISDIR@plt>
test   %eax,%eax
je     1402 <main+0x232>
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   10a0 <memset@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xfc,%edx
call   1040 <strncpy@plt>
lea    0xd00(%rip),%rsi
mov    %rbx,%rdi
call   10f0 <strcat@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
xor    %edx,%edx
mov    %r15d,%ecx
call   1050 <dostat@plt>
test   %rax,%rax
js     1431 <main+0x261>
mov    0x18(%rsp),%rax
cmp    0x38(%rsp),%rax
mov    0x20(%rsp),%rax
setne  %cl
cmp    0x40(%rsp),%rax
sete   %bl
or     %cl,%bl
mov    0xc(%rsp),%ebp
or     %ebp,%r15d
jne    13bd <main+0x1ed>
lea    0xc88(%rip),%rax
lea    0xcc4(%rip),%rdx
test   %bl,%bl
cmovne %rax,%rdx
lea    0xca1(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
test   %ebp,%ebp
je     13e9 <main+0x219>
mov    0x18(%rsp),%rdi
call   1090 <major@plt>
mov    %eax,%ebp
mov    0x18(%rsp),%rdi
call   1060 <minor@plt>
lea    0xc4a(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1070 <printf@plt>
xor    $0x1,%bl
movzbl %bl,%ebp
jmp    1431 <main+0x261>
test   %r15d,%r15d
je     1419 <main+0x249>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1431 <main+0x261>
test   %r15d,%r15d
jne    1431 <main+0x261>
mov    0x2bc2(%rip),%rax
mov    (%rax),%edi
lea    0xc18(%rip),%rsi
jmp    1429 <main+0x259>
mov    0x2bb0(%rip),%rax
mov    (%rax),%edi
lea    0xbdb(%rip),%rsi
mov    %r14,%rdx
call   10b0 <fprintf@plt>
mov    %ebp,%eax
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i64, i64, i64, i32 }
@.str = [4 x i8] c"dqx\00"
@EOF = global i32 0
@optind = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
@stderr = global i32 0
@.str.2 = [36 x i8] c"mountpoint: %s: not a block device\0A\00"
@.str.3 = [7 x i8] c"%u:%u\0A\00"
@.str.4 = [33 x i8] c"mountpoint: %s: not a directory\0A\00"
@.str.5 = [4 x i8] c"/..\00"
@.str.6 = [22 x i8] c"%s is %sa mountpoint\0A\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [5 x i8] c"not \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.stat
%7 = alloca %struct.stat
%8 = alloca [256 x i8]
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
br label %15
15: ; preds = %28, %2
%16 = load i32, i32* %4
%17 = load i8**, i8*** %5
%18 = call i32 @getopt(i32 %16, i8** %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 %18, i32* %13
%19 = load i32, i32* @EOF
%20 = icmp ne i32 %18, %19
br i1 %20, label %21, label %29
21: ; preds = %15
%22 = load i32, i32* %13
switch i32 %22, label %26 [
i32 100, label %23
i32 113, label %24
i32 120, label %25
]
23: ; preds = %21
store i32 1, i32* %11
br label %28
24: ; preds = %21
store i32 1, i32* %10
br label %28
25: ; preds = %21
store i32 1, i32* %12
br label %28
26: ; preds = %21
%27 = call i32 (...) @usage()
br label %28
28: ; preds = %26, %25, %24, %23
br label %15
29: ; preds = %15
%30 = load i32, i32* @optind
%31 = load i32, i32* %4
%32 = sub nsw i32 %31, 1
%33 = icmp ne i32 %30, %32
br i1 %33, label %34, label %36
34: ; preds = %29
%35 = call i32 (...) @usage()
br label %36
36: ; preds = %34, %29
%37 = load i8**, i8*** %5
%38 = load i32, i32* @optind
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
store i8* %41, i8** %9
%42 = load i8*, i8** %9
%43 = load i32, i32* %12
%44 = icmp ne i32 %43, 0
%45 = xor i1 %44, true
%46 = zext i1 %45 to i32
%47 = load i32, i32* %10
%48 = call i64 @dostat(i8* %42, %struct.stat* %6, i32 %46, i32 %47)
%49 = icmp slt i64 %48, 0
br i1 %49, label %50, label %51
50: ; preds = %36
store i32 1, i32* %3
br label %154
51: ; preds = %36
%52 = load i32, i32* %12
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %77
54: ; preds = %51
%55 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 3
%56 = load i32, i32* %55
%57 = call i32 @S_ISBLK(i32 %56)
%58 = icmp ne i32 %57, 0
br i1 %58, label %69, label %59
59: ; preds = %54
%60 = load i32, i32* %10
%61 = icmp ne i32 %60, 0
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %68
64: ; preds = %59
%65 = load i32, i32* @stderr
%66 = load i8*, i8** %9
%67 = call i32 @fprintf(i32 %65, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* %66)
br label %68
68: ; preds = %64, %62
store i32 1, i32* %3
br label %154
69: ; preds = %54
%70 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%71 = load i64, i64* %70
%72 = call i32 @major(i64 %71)
%73 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%74 = load i64, i64* %73
%75 = call i32 @minor(i64 %74)
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %72, i32 %75)
store i32 0, i32* %3
br label %154
77: ; preds = %51
%78 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 3
%79 = load i32, i32* %78
%80 = call i32 @S_ISDIR(i32 %79)
%81 = icmp ne i32 %80, 0
br i1 %81, label %90, label %82
82: ; preds = %77
%83 = load i32, i32* %10
%84 = icmp ne i32 %83, 0
br i1 %84, label %89, label %85
85: ; preds = %82
%86 = load i32, i32* @stderr
%87 = load i8*, i8** %9
%88 = call i32 @fprintf(i32 %86, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8* %87)
br label %89
89: ; preds = %85, %82
store i32 1, i32* %3
br label %154
90: ; preds = %77
%91 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%92 = call i32 @memset(i8* %91, i32 0, i32 256)
%93 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%94 = load i8*, i8** %9
%95 = call i32 @strncpy(i8* %93, i8* %94, i32 252)
%96 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%97 = call i32 @strcat(i8* %96, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%98 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%99 = load i32, i32* %10
%100 = call i64 @dostat(i8* %98, %struct.stat* %7, i32 0, i32 %99)
%101 = icmp slt i64 %100, 0
br i1 %101, label %102, label %103
102: ; preds = %90
store i32 1, i32* %3
br label %154
103: ; preds = %90
%104 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%105 = load i64, i64* %104
%106 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 1
%107 = load i64, i64* %106
%108 = icmp ne i64 %105, %107
br i1 %108, label %123, label %109
109: ; preds = %103
%110 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%111 = load i64, i64* %110
%112 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 1
%113 = load i64, i64* %112
%114 = icmp eq i64 %111, %113
br i1 %114, label %115, label %121
115: ; preds = %109
%116 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 2
%117 = load i64, i64* %116
%118 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 2
%119 = load i64, i64* %118
%120 = icmp eq i64 %117, %119
br label %121
121: ; preds = %115, %109
%122 = phi i1 [ false, %109 ], [ %120, %115 ]
br label %123
123: ; preds = %121, %103
%124 = phi i1 [ true, %103 ], [ %122, %121 ]
%125 = zext i1 %124 to i32
store i32 %125, i32* %14
%126 = load i32, i32* %10
%127 = icmp ne i32 %126, 0
br i1 %127, label %138, label %128
128: ; preds = %123
%129 = load i32, i32* %11
%130 = icmp ne i32 %129, 0
br i1 %130, label %138, label %131
131: ; preds = %128
%132 = load i8*, i8** %9
%133 = load i32, i32* %14
%134 = icmp ne i32 %133, 0
%135 = zext i1 %134 to i64
%136 = select i1 %134, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0)
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* %132, i8* %136)
br label %138
138: ; preds = %131, %128, %123
%139 = load i32, i32* %11
%140 = icmp ne i32 %139, 0
br i1 %140, label %141, label %149
141: ; preds = %138
%142 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%143 = load i64, i64* %142
%144 = call i32 @major(i64 %143)
%145 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 1
%146 = load i64, i64* %145
%147 = call i32 @minor(i64 %146)
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %144, i32 %147)
br label %149
149: ; preds = %141, %138
%150 = load i32, i32* %14
%151 = icmp ne i32 %150, 0
%152 = zext i1 %151 to i64
%153 = select i1 %151, i32 0, i32 1
store i32 %153, i32* %3
br label %154
154: ; preds = %149, %102, %89, %69, %68, %50
%155 = load i32, i32* %3
ret i32 %155
}

LLVM IR (-O2):
%struct.stat = type { i64, i64, i64, i32 }
@.str = [4 x i8] c"dqx\00"
@EOF = global i32 0
@optind = global i32 0
@stderr = global i32 0
@.str.2 = [36 x i8] c"mountpoint: %s: not a block device\0A\00"
@.str.3 = [7 x i8] c"%u:%u\0A\00"
@.str.4 = [33 x i8] c"mountpoint: %s: not a directory\0A\00"
@.str.5 = [4 x i8] c"/..\00"
@.str.6 = [22 x i8] c"%s is %sa mountpoint\0A\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [5 x i8] c"not \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca %struct.stat
%4 = alloca %struct.stat
%5 = alloca [256 x i8]
%6 = bitcast %struct.stat* %3 to i8*
%7 = bitcast %struct.stat* %4 to i8*
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%9 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %28, label %12
12: ; preds = %2, %21
%13 = phi i32 [ %25, %21 ], [ %9, %2 ]
%14 = phi i32 [ %24, %21 ], [ 0, %2 ]
%15 = phi i32 [ %23, %21 ], [ 0, %2 ]
%16 = phi i32 [ %22, %21 ], [ 0, %2 ]
switch i32 %13, label %19 [
i32 100, label %21
i32 113, label %17
i32 120, label %18
]
17: ; preds = %12
br label %21
18: ; preds = %12
br label %21
19: ; preds = %12
%20 = tail call i32 (...) @usage()
br label %21
21: ; preds = %12, %19, %18, %17
%22 = phi i32 [ %16, %19 ], [ %16, %18 ], [ %16, %17 ], [ 1, %12 ]
%23 = phi i32 [ %15, %19 ], [ 1, %18 ], [ %15, %17 ], [ %15, %12 ]
%24 = phi i32 [ %14, %19 ], [ %14, %18 ], [ 1, %17 ], [ %14, %12 ]
%25 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%26 = load i32, i32* @EOF
%27 = icmp eq i32 %25, %26
br i1 %27, label %28, label %12
28: ; preds = %21, %2
%29 = phi i32 [ 0, %2 ], [ %22, %21 ]
%30 = phi i32 [ 0, %2 ], [ %23, %21 ]
%31 = phi i32 [ 0, %2 ], [ %24, %21 ]
%32 = load i32, i32* @optind
%33 = add nsw i32 %0, -1
%34 = icmp eq i32 %32, %33
br i1 %34, label %38, label %35
35: ; preds = %28
%36 = tail call i32 (...) @usage()
%37 = load i32, i32* @optind
br label %38
38: ; preds = %35, %28
%39 = phi i32 [ %37, %35 ], [ %32, %28 ]
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8*, i8** %1, i64 %40
%42 = load i8*, i8** %41
%43 = icmp eq i32 %30, 0
%44 = zext i1 %43 to i32
%45 = call i64 @dostat(i8* %42, %struct.stat* %3, i32 %44, i32 %31)
%46 = icmp slt i64 %45, 0
br i1 %46, label %109, label %47
47: ; preds = %38
%48 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 3
%49 = load i32, i32* %48
br i1 %43, label %67, label %50
50: ; preds = %47
%51 = call i32 @S_ISBLK(i32 %49)
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %60
53: ; preds = %50
%54 = icmp eq i32 %31, 0
br i1 %54, label %57, label %55
55: ; preds = %53
%56 = call i32 @putchar(i32 10)
br label %109
57: ; preds = %53
%58 = load i32, i32* @stderr
%59 = call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* %42)
br label %109
60: ; preds = %50
%61 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%62 = load i64, i64* %61
%63 = call i32 @major(i64 %62)
%64 = load i64, i64* %61
%65 = call i32 @minor(i64 %64)
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %63, i32 %65)
br label %109
67: ; preds = %47
%68 = call i32 @S_ISDIR(i32 %49)
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %75
70: ; preds = %67
%71 = icmp eq i32 %31, 0
br i1 %71, label %72, label %109
72: ; preds = %70
%73 = load i32, i32* @stderr
%74 = call i32 @fprintf(i32 %73, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), i8* %42)
br label %109
75: ; preds = %67
%76 = call i32 @memset(i8* %8, i32 0, i32 256)
%77 = call i32 @strncpy(i8* %8, i8* %42, i32 252)
%78 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%79 = call i64 @dostat(i8* %8, %struct.stat* %4, i32 0, i32 %31)
%80 = icmp slt i64 %79, 0
br i1 %80, label %109, label %81
81: ; preds = %75
%82 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 1
%83 = load i64, i64* %82
%84 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 1
%85 = load i64, i64* %84
%86 = icmp ne i64 %83, %85
%87 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 2
%88 = load i64, i64* %87
%89 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 2
%90 = load i64, i64* %89
%91 = icmp eq i64 %88, %90
%92 = select i1 %86, i1 true, i1 %91
%93 = icmp ne i32 %31, 0
%94 = icmp ne i32 %29, 0
%95 = select i1 %93, i1 true, i1 %94
br i1 %95, label %99, label %96
96: ; preds = %81
%97 = select i1 %92, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0)
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* %42, i8* %97)
br label %99
99: ; preds = %96, %81
br i1 %94, label %100, label %106
100: ; preds = %99
%101 = load i64, i64* %82
%102 = call i32 @major(i64 %101)
%103 = load i64, i64* %82
%104 = call i32 @minor(i64 %103)
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %102, i32 %104)
br label %106
106: ; preds = %100, %99
%107 = xor i1 %92, true
%108 = zext i1 %107 to i32
br label %109
109: ; preds = %75, %70, %72, %55, %57, %38, %106, %60
%110 = phi i32 [ 0, %60 ], [ %108, %106 ], [ 1, %38 ], [ 1, %57 ], [ 1, %55 ], [ 1, %72 ], [ 1, %70 ], [ 1, %75 ]
ret i32 %110
}