#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 /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(const char *appname) {
  printf("usage: %s [-d] [-s section to dump] metadata.mfs\n", appname);
  printf("options:\n");
  printf("\td: print dot instead of non printable characters\n");
  printf("\ts: dump only given section\n");
  printf("section names:\n");
  printf("\tHEAD - header info\n");
  printf("\tSESS - client sessions\n");
  printf("\tLABS - labels (not used)\n");
  printf("\tSCLA - storage classes\n");
  printf("\tNODE - tree nodes (i-nodes)\n");
  printf("\tEDGE - tree edges (file names)\n");
  printf("\tFREE - free nodes (deleted i-nodes)\n");
  printf("\tQUOT - quota definitions\n");
  printf("\tXATR - xattr data\n");
  printf("\tPACL - posix acl data\n");
  printf("\tOPEN - open files\n");
  printf("\tFLCK - flock data\n");
  printf("\tPLCK - posix locks (lockf,ioctl) data\n");
  printf("\tCSDB - active chunkservers\n");
  printf("\tCHNK - chunks\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf27(%rip),%rdi
call   1030 <puts@plt>
lea    0xf33(%rip),%rdi
call   1030 <puts@plt>
lea    0xf41(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf72(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf99(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa0(%rip),%rdi
call   1030 <puts@plt>
lea    0xfab(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb2(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb9(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe4(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"usage: %s [-d] [-s section to dump] metadata.mfs\0A\00"
@.str.1 = [10 x i8] c"options:\0A\00"
@.str.2 = [51 x i8] c"\09d: print dot instead of non printable characters\0A\00"
@.str.3 = [29 x i8] c"\09s: dump only given section\0A\00"
@.str.4 = [16 x i8] c"section names:\0A\00"
@.str.5 = [21 x i8] c"\09HEAD - header info\0A\00"
@.str.6 = [25 x i8] c"\09SESS - client sessions\0A\00"
@.str.7 = [27 x i8] c"\09LABS - labels (not used)\0A\00"
@.str.8 = [25 x i8] c"\09SCLA - storage classes\0A\00"
@.str.9 = [30 x i8] c"\09NODE - tree nodes (i-nodes)\0A\00"
@.str.10 = [33 x i8] c"\09EDGE - tree edges (file names)\0A\00"
@.str.11 = [38 x i8] c"\09FREE - free nodes (deleted i-nodes)\0A\00"
@.str.12 = [27 x i8] c"\09QUOT - quota definitions\0A\00"
@.str.13 = [20 x i8] c"\09XATR - xattr data\0A\00"
@.str.14 = [24 x i8] c"\09PACL - posix acl data\0A\00"
@.str.15 = [20 x i8] c"\09OPEN - open files\0A\00"
@.str.16 = [20 x i8] c"\09FLCK - flock data\0A\00"
@.str.17 = [40 x i8] c"\09PLCK - posix locks (lockf,ioctl) data\0A\00"
@.str.18 = [29 x i8] c"\09CSDB - active chunkservers\0A\00"
@.str.19 = [16 x i8] c"\09CHNK - chunks\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.18, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.19, i64 0, i64 0))
%24 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [50 x i8] c"usage: %s [-d] [-s section to dump] metadata.mfs\0A\00"
@str = [9 x i8] c"options:\00"
@str.20 = [50 x i8] c"\09d: print dot instead of non printable characters\00"
@str.21 = [28 x i8] c"\09s: dump only given section\00"
@str.22 = [15 x i8] c"section names:\00"
@str.23 = [20 x i8] c"\09HEAD - header info\00"
@str.24 = [24 x i8] c"\09SESS - client sessions\00"
@str.25 = [26 x i8] c"\09LABS - labels (not used)\00"
@str.26 = [24 x i8] c"\09SCLA - storage classes\00"
@str.27 = [29 x i8] c"\09NODE - tree nodes (i-nodes)\00"
@str.28 = [32 x i8] c"\09EDGE - tree edges (file names)\00"
@str.29 = [37 x i8] c"\09FREE - free nodes (deleted i-nodes)\00"
@str.30 = [26 x i8] c"\09QUOT - quota definitions\00"
@str.31 = [19 x i8] c"\09XATR - xattr data\00"
@str.32 = [23 x i8] c"\09PACL - posix acl data\00"
@str.33 = [19 x i8] c"\09OPEN - open files\00"
@str.34 = [19 x i8] c"\09FLCK - flock data\00"
@str.35 = [39 x i8] c"\09PLCK - posix locks (lockf,ioctl) data\00"
@str.36 = [28 x i8] c"\09CSDB - active chunkservers\00"
@str.37 = [15 x i8] c"\09CHNK - chunks\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.20, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.21, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.22, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.23, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.24, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.25, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.26, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.27, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.28, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.29, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.30, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.31, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.32, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.33, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.34, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.35, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.36, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.37, i64 0, i64 0))
%22 = tail call i32 @exit(i32 1)
unreachable
}