#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 statfs {
  int f_blocks;
  int f_bsize;
  int f_bavail;
  unsigned long long f_bfree;
};
struct mntent {
  char *mnt_dir;
  char *mnt_fsname;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ df_error();
int /*<<< orphan*/ df_human(unsigned long long);
int /*<<< orphan*/ endmntent(int /*<<< orphan*/ *);
struct mntent *getmntent(int /*<<< orphan*/ *);
int getopt(int, char **, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ *setmntent(char *, char *);
int /*<<< orphan*/ statfs(char *, struct statfs *);
int strlen(char *);
int main(int argc, char *argv[]) {
  int o, human = 0;
  while ((o = getopt(argc, argv, "h")) != -1)
    switch (o) {
    case 'h':
      human = 1;
      break;
    case '?':
      df_error();
    }
  unsigned long long size, avail, used;
  FILE *f = setmntent("/etc/mtab", "r");
  struct mntent *ent;
  struct statfs fs;
  printf("%-13s ", "Filesystem");
  if (human == 1)
    printf("%-13s ", "Size");
  else
    printf("%-13s ", "1K-blocks");
  printf("%-13s ", "Used");
  printf("%-13s ", "Available");
  printf("%s ", "Use% ");
  printf("%s ", "Mounted on");
  printf("\n");
  while ((ent = getmntent(f))) {
    statfs(ent->mnt_dir, &fs);
    size = fs.f_blocks * fs.f_bsize / 1024;
    avail = fs.f_bavail * fs.f_bsize / 1024;
    used = fs.f_blocks - fs.f_bfree;
    used *= (fs.f_bsize / 1024);
    printf("%-13s ", ent->mnt_fsname);
    if (strlen(ent->mnt_fsname) > 13)
      printf("\n%-13s ", "");
    if (human == 1) {
      df_human(size);
      df_human(used);
      df_human(avail);
    } else {
      printf("%-13llu ", size);
      printf("%-13llu ", used);
      printf("%-13llu ", avail);
    }
    printf("%3.0f%%  ", (100 * (float)used) / (size + 1) + .5);
    printf("%-13s ", ent->mnt_dir);
    printf("\n");
  }
  endmntent(f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe51(%rip),%rdx
call   10a0 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     1209 <main+0x79>
mov    -0x14(%rbp),%eax
mov    %eax,-0x5c(%rbp)
sub    $0x3f,%eax
je     11fd <main+0x6d>
jmp    11e0 <main+0x50>
mov    -0x5c(%rbp),%eax
sub    $0x68,%eax
jne    1204 <main+0x74>
jmp    11f1 <main+0x61>
movl   $0x1,-0x18(%rbp)
jmp    1204 <main+0x74>
mov    $0x0,%al
call   1060 <df_error@plt>
jmp    11ad <main+0x1d>
lea    0xdfe(%rip),%rdi
lea    0xe01(%rip),%rsi
call   1090 <setmntent@plt>
mov    %rax,-0x38(%rbp)
lea    0xe34(%rip),%rdi
lea    0xdec(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x1,-0x18(%rbp)
jne    1259 <main+0xc9>
lea    0xe15(%rip),%rdi
lea    0xdd8(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    126e <main+0xde>
lea    0xdfb(%rip),%rdi
lea    0xdc3(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xde6(%rip),%rdi
lea    0xdb8(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdd1(%rip),%rdi
lea    0xda8(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xda4(%rip),%rdi
lea    0xda1(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd8f(%rip),%rdi
lea    0xd92(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1080 <getmntent@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
je     14cc <main+0x33c>
mov    -0x40(%rbp),%rax
mov    (%rax),%rdi
lea    -0x58(%rbp),%rsi
call   1070 <statfs@plt>
mov    -0x58(%rbp),%eax
imul   -0x54(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
cltq
mov    %rax,-0x20(%rbp)
mov    -0x50(%rbp),%eax
imul   -0x54(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
cltq
mov    %rax,-0x28(%rbp)
movslq -0x58(%rbp),%rax
sub    -0x48(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x54(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
cltq
imul   -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x40(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd09(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x40(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <strlen@plt>
cmp    $0xd,%eax
jle    1384 <main+0x1f4>
lea    0xce4(%rip),%rdi
lea    0xcdc(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x1,-0x18(%rbp)
jne    13ae <main+0x21e>
mov    -0x20(%rbp),%rdi
call   10b0 <df_human@plt>
mov    -0x30(%rbp),%rdi
call   10b0 <df_human@plt>
mov    -0x28(%rbp),%rdi
call   10b0 <df_human@plt>
jmp    13e4 <main+0x254>
mov    -0x20(%rbp),%rsi
lea    0xca9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rsi
lea    0xc97(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xc85(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x64(%rbp)
test   %rax,%rax
movss  %xmm0,-0x60(%rbp)
js     1421 <main+0x291>
movss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x60(%rbp),%xmm0
movss  0xbda(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x6c(%rbp)
test   %rax,%rax
movss  %xmm0,-0x68(%rbp)
js     1478 <main+0x2e8>
movss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x70(%rbp),%xmm0
movss  -0x68(%rbp),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xb6e(%rip),%xmm1
addsd  %xmm1,%xmm0
lea    0xbce(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x40(%rbp),%rax
mov    (%rax),%rsi
lea    0xba9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xb98(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12d0 <main+0x140>
mov    -0x38(%rbp),%rdi
call   1030 <endmntent@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe56(%rip),%r14
movl   $0x0,0x4(%rsp)
jmp    11d7 <main+0x37>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1070 <df_error@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   10b0 <getopt@plt>
cmp    $0x3f,%eax
je     11d0 <main+0x30>
cmp    $0xffffffff,%eax
je     11fb <main+0x5b>
cmp    $0x68,%eax
jne    11d7 <main+0x37>
mov    $0x1,%al
mov    %eax,0x4(%rsp)
jmp    11d7 <main+0x37>
lea    0xe10(%rip),%rdi
lea    0xe13(%rip),%rsi
call   10a0 <setmntent@plt>
mov    %rax,%rbp
lea    0xe45(%rip),%rbx
lea    0xdff(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdf9(%rip),%rax
lea    0xdf7(%rip),%rsi
testb  $0x1,0x4(%rsp)
cmovne %rax,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xde7(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xddb(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdd4(%rip),%rbx
lea    0xdd1(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdc6(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,0x8(%rsp)
mov    %rbp,%rdi
call   1090 <getmntent@plt>
test   %rax,%rax
je     1472 <main+0x2d2>
mov    %rax,%r13
lea    0xd9e(%rip),%r12
jmp    1320 <main+0x180>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cvtsi2ss %ebp,%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xd24(%rip),%xmm0
lea    0xd82(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    0x0(%r13),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%rdi
call   1090 <getmntent@plt>
mov    %rax,%r13
test   %rax,%rax
je     1472 <main+0x2d2>
mov    0x0(%r13),%rdi
lea    0x10(%rsp),%rsi
call   1080 <statfs@plt>
movslq 0x10(%rsp),%r14
mov    0x14(%rsp),%eax
mov    %eax,%ecx
imul   %r14d,%ecx
lea    0x3ff(%rcx),%ebp
test   %ecx,%ecx
cmovns %ecx,%ebp
sar    $0xa,%ebp
mov    0x18(%rsp),%ecx
imul   %eax,%ecx
lea    0x3ff(%rcx),%ebx
test   %ecx,%ecx
cmovns %ecx,%ebx
sar    $0xa,%ebx
sub    0x20(%rsp),%r14
lea    0x3ff(%rax),%r15d
test   %eax,%eax
cmovns %eax,%r15d
sar    $0xa,%r15d
mov    0x8(%r13),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8(%r13),%rdi
call   1050 <strlen@plt>
cmp    $0xe,%eax
jl     13a7 <main+0x207>
lea    0xcc3(%rip),%rdi
lea    0xcd6(%rip),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
movslq %ebp,%rbp
movslq %ebx,%r12
movslq %r15d,%rax
imul   %rax,%r14
testb  $0x1,0x4(%rsp)
je     13e0 <main+0x240>
mov    %rbp,%rdi
call   10c0 <df_human@plt>
mov    %r14,%rdi
call   10c0 <df_human@plt>
mov    %r12,%rdi
call   10c0 <df_human@plt>
jmp    140e <main+0x26e>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xc7d(%rip),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc48(%rip),%r12
test   %r14,%r14
js     1430 <main+0x290>
xorps  %xmm0,%xmm0
cvtsi2ss %r14,%xmm0
jmp    1446 <main+0x2a6>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rax
shr    %rax
and    $0x1,%r14d
or     %rax,%r14
cvtsi2ss %r14,%xmm0
addss  %xmm0,%xmm0
mulss  0xbb2(%rip),%xmm0
add    $0x1,%rbp
jns    12d0 <main+0x130>
mov    %rbp,%rax
shr    %rax
and    $0x1,%ebp
or     %rax,%rbp
cvtsi2ss %rbp,%xmm1
addss  %xmm1,%xmm1
jmp    12d4 <main+0x134>
mov    0x8(%rsp),%rdi
call   1040 <endmntent@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.mntent = type { i8*, i8* }
%struct.statfs = type { i32, i32, i32, i64 }
@.str = [2 x i8] c"h\00"
@.str.1 = [10 x i8] c"/etc/mtab\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [7 x i8] c"%-13s \00"
@.str.4 = [11 x i8] c"Filesystem\00"
@.str.5 = [5 x i8] c"Size\00"
@.str.6 = [10 x i8] c"1K-blocks\00"
@.str.7 = [5 x i8] c"Used\00"
@.str.8 = [10 x i8] c"Available\00"
@.str.9 = [4 x i8] c"%s \00"
@.str.10 = [6 x i8] c"Use% \00"
@.str.11 = [11 x i8] c"Mounted on\00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [8 x i8] c"\0A%-13s \00"
@.str.14 = [1 x i8] zeroinitializer
@.str.15 = [9 x i8] c"%-13llu \00"
@.str.16 = [10 x i8] c"%3.0f%% \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i32*
%12 = alloca %struct.mntent*
%13 = alloca %struct.statfs
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
br label %14
14: ; preds = %24, %2
%15 = load i32, i32* %4
%16 = load i8**, i8*** %5
%17 = call i32 @getopt(i32 %15, i8** %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %17, i32* %6
%18 = icmp ne i32 %17, -1
br i1 %18, label %19, label %25
19: ; preds = %14
%20 = load i32, i32* %6
switch i32 %20, label %24 [
i32 104, label %21
i32 63, label %22
]
21: ; preds = %19
store i32 1, i32* %7
br label %24
22: ; preds = %19
%23 = call i32 (...) @df_error()
br label %24
24: ; preds = %22, %19, %21
br label %14
25: ; preds = %14
%26 = call i32* @setmntent(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %26, i32** %11
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%28 = load i32, i32* %7
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %32
30: ; preds = %25
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %34
32: ; preds = %25
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %40
40: ; preds = %103, %34
%41 = load i32*, i32** %11
%42 = call %struct.mntent* @getmntent(i32* %41)
store %struct.mntent* %42, %struct.mntent** %12
%43 = icmp ne %struct.mntent* %42, null
br i1 %43, label %44, label %119
44: ; preds = %40
%45 = load %struct.mntent*, %struct.mntent** %12
%46 = getelementptr inbounds %struct.mntent, %struct.mntent* %45, i32 0, i32 0
%47 = load i8*, i8** %46
%48 = call i32 @statfs(i8* %47, %struct.statfs* %13)
%49 = getelementptr inbounds %struct.statfs, %struct.statfs* %13, i32 0, i32 0
%50 = load i32, i32* %49
%51 = getelementptr inbounds %struct.statfs, %struct.statfs* %13, i32 0, i32 1
%52 = load i32, i32* %51
%53 = mul nsw i32 %50, %52
%54 = sdiv i32 %53, 1024
%55 = sext i32 %54 to i64
store i64 %55, i64* %8
%56 = getelementptr inbounds %struct.statfs, %struct.statfs* %13, i32 0, i32 2
%57 = load i32, i32* %56
%58 = getelementptr inbounds %struct.statfs, %struct.statfs* %13, i32 0, i32 1
%59 = load i32, i32* %58
%60 = mul nsw i32 %57, %59
%61 = sdiv i32 %60, 1024
%62 = sext i32 %61 to i64
store i64 %62, i64* %9
%63 = getelementptr inbounds %struct.statfs, %struct.statfs* %13, i32 0, i32 0
%64 = load i32, i32* %63
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds %struct.statfs, %struct.statfs* %13, i32 0, i32 3
%67 = load i64, i64* %66
%68 = sub i64 %65, %67
store i64 %68, i64* %10
%69 = getelementptr inbounds %struct.statfs, %struct.statfs* %13, i32 0, i32 1
%70 = load i32, i32* %69
%71 = sdiv i32 %70, 1024
%72 = sext i32 %71 to i64
%73 = load i64, i64* %10
%74 = mul i64 %73, %72
store i64 %74, i64* %10
%75 = load %struct.mntent*, %struct.mntent** %12
%76 = getelementptr inbounds %struct.mntent, %struct.mntent* %75, i32 0, i32 1
%77 = load i8*, i8** %76
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %77)
%79 = load %struct.mntent*, %struct.mntent** %12
%80 = getelementptr inbounds %struct.mntent, %struct.mntent* %79, i32 0, i32 1
%81 = load i8*, i8** %80
%82 = call i32 @strlen(i8* %81)
%83 = icmp sgt i32 %82, 13
br i1 %83, label %84, label %86
84: ; preds = %44
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0))
br label %86
86: ; preds = %84, %44
%87 = load i32, i32* %7
%88 = icmp eq i32 %87, 1
br i1 %88, label %89, label %96
89: ; preds = %86
%90 = load i64, i64* %8
%91 = call i32 @df_human(i64 %90)
%92 = load i64, i64* %10
%93 = call i32 @df_human(i64 %92)
%94 = load i64, i64* %9
%95 = call i32 @df_human(i64 %94)
br label %103
96: ; preds = %86
%97 = load i64, i64* %8
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i64 %97)
%99 = load i64, i64* %10
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i64 %99)
%101 = load i64, i64* %9
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i64 %101)
br label %103
103: ; preds = %96, %89
%104 = load i64, i64* %10
%105 = uitofp i64 %104 to float
%106 = fmul float 1.000000e+02, %105
%107 = load i64, i64* %8
%108 = add i64 %107, 1
%109 = uitofp i64 %108 to float
%110 = fdiv float %106, %109
%111 = fpext float %110 to double
%112 = fadd double %111, 5.000000e-01
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0), double %112)
%114 = load %struct.mntent*, %struct.mntent** %12
%115 = getelementptr inbounds %struct.mntent, %struct.mntent* %114, i32 0, i32 0
%116 = load i8*, i8** %115
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %116)
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %40
119: ; preds = %40
%120 = load i32*, i32** %11
%121 = call i32 @endmntent(i32* %120)
ret i32 0
}

LLVM IR (-O2):
%struct.statfs = type { i32, i32, i32, i64 }
%struct.mntent = type { i8*, i8* }
@.str = [2 x i8] c"h\00"
@.str.1 = [10 x i8] c"/etc/mtab\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [7 x i8] c"%-13s \00"
@.str.4 = [11 x i8] c"Filesystem\00"
@.str.5 = [5 x i8] c"Size\00"
@.str.6 = [10 x i8] c"1K-blocks\00"
@.str.7 = [5 x i8] c"Used\00"
@.str.8 = [10 x i8] c"Available\00"
@.str.9 = [4 x i8] c"%s \00"
@.str.10 = [6 x i8] c"Use% \00"
@.str.11 = [11 x i8] c"Mounted on\00"
@.str.13 = [8 x i8] c"\0A%-13s \00"
@.str.14 = [1 x i8] zeroinitializer
@.str.15 = [9 x i8] c"%-13llu \00"
@.str.16 = [10 x i8] c"%3.0f%% \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca %struct.statfs
br label %4
4: ; preds = %6, %2
%5 = phi i1 [ false, %2 ], [ true, %6 ]
br label %6
6: ; preds = %8, %4
%7 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
switch i32 %7, label %8 [
i32 -1, label %11
i32 104, label %4
i32 63, label %9
]
8: ; preds = %6, %9
br label %6
9: ; preds = %6
%10 = tail call i32 (...) @df_error()
br label %8
11: ; preds = %6
%12 = tail call i32* @setmntent(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%13 = bitcast %struct.statfs* %3 to i8*
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%15 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%21 = tail call i32 @putchar(i32 10)
%22 = call %struct.mntent* @getmntent(i32* %12)
%23 = icmp eq %struct.mntent* %22, null
br i1 %23, label %80, label %24
24: ; preds = %11
%25 = getelementptr inbounds %struct.statfs, %struct.statfs* %3, i64 0, i32 0
%26 = getelementptr inbounds %struct.statfs, %struct.statfs* %3, i64 0, i32 1
%27 = getelementptr inbounds %struct.statfs, %struct.statfs* %3, i64 0, i32 2
%28 = getelementptr inbounds %struct.statfs, %struct.statfs* %3, i64 0, i32 3
br label %29
29: ; preds = %24, %66
%30 = phi %struct.mntent* [ %22, %24 ], [ %78, %66 ]
%31 = getelementptr inbounds %struct.mntent, %struct.mntent* %30, i64 0, i32 0
%32 = load i8*, i8** %31
%33 = call i32 @statfs(i8* %32, %struct.statfs* %3)
%34 = load i32, i32* %25
%35 = load i32, i32* %26
%36 = mul nsw i32 %35, %34
%37 = sdiv i32 %36, 1024
%38 = sext i32 %37 to i64
%39 = load i32, i32* %27
%40 = mul nsw i32 %39, %35
%41 = sdiv i32 %40, 1024
%42 = sext i32 %41 to i64
%43 = sext i32 %34 to i64
%44 = load i64, i64* %28
%45 = sub i64 %43, %44
%46 = sdiv i32 %35, 1024
%47 = sext i32 %46 to i64
%48 = mul i64 %45, %47
%49 = getelementptr inbounds %struct.mntent, %struct.mntent* %30, i64 0, i32 1
%50 = load i8*, i8** %49
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %50)
%52 = load i8*, i8** %49
%53 = call i32 @strlen(i8* %52)
%54 = icmp sgt i32 %53, 13
br i1 %54, label %55, label %57
55: ; preds = %29
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0))
br label %57
57: ; preds = %55, %29
br i1 %5, label %58, label %62
58: ; preds = %57
%59 = call i32 @df_human(i64 %38)
%60 = call i32 @df_human(i64 %48)
%61 = call i32 @df_human(i64 %42)
br label %66
62: ; preds = %57
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i64 %38)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i64 %48)
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i64 %42)
br label %66
66: ; preds = %62, %58
%67 = uitofp i64 %48 to float
%68 = fmul float %67, 1.000000e+02
%69 = add nsw i64 %38, 1
%70 = uitofp i64 %69 to float
%71 = fdiv float %68, %70
%72 = fpext float %71 to double
%73 = fadd double %72, 5.000000e-01
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.16, i64 0, i64 0), double %73)
%75 = load i8*, i8** %31
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %75)
%77 = call i32 @putchar(i32 10)
%78 = call %struct.mntent* @getmntent(i32* %12)
%79 = icmp eq %struct.mntent* %78, null
br i1 %79, label %80, label %29
80: ; preds = %66, %11
%81 = call i32 @endmntent(i32* %12)
ret i32 0
}