#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ fstype0(char *, int);
int getopt(int, char **, char *);
int optind;
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int dry_run = 0, opt;
  while ((opt = getopt(argc, argv, "n")) != -1) {
    switch (opt) {
    case 'n':
      dry_run = 1;
      break;
    default:
      fprintf(stderr, "Usage: %s [-n] font.ttf\n", argv[0]);
      exit(1);
    }
  }
  if (optind >= argc) {
    fprintf(stderr, "Usage: %s [-n] font.ttf\n", argv[0]);
    exit(1);
  }
  while (optind < argc)
    fstype0(argv[optind++], dry_run);
  return 0;
}


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)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe95(%rip),%rdx
call   1050 <getopt@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
je     11c4 <main+0x84>
mov    -0x18(%rbp),%eax
sub    $0x6e,%eax
jne    1199 <main+0x59>
jmp    118d <main+0x4d>
movl   $0x1,-0x14(%rbp)
jmp    11bf <main+0x7f>
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe52(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
jmp    115d <main+0x1d>
mov    0x2e1d(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jl     11fc <main+0xbc>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe15(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
jmp    1201 <main+0xc1>
mov    0x2de0(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    1242 <main+0x102>
mov    -0x10(%rbp),%rax
mov    0x2dca(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    0x2dbc(%rip),%rdx
mov    %esi,(%rdx)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x14(%rbp),%esi
call   1040 <fstype0@plt>
jmp    1201 <main+0xc1>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebp
xor    %ecx,%ecx
lea    0xeab(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%ebx
mov    %ebp,%edi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <getopt@plt>
mov    $0x1,%ecx
cmp    $0x6e,%eax
je     1160 <main+0x20>
cmp    $0xffffffff,%eax
jne    11b7 <main+0x77>
mov    0x2e63(%rip),%r15
mov    (%r15),%eax
cmp    %ebp,%eax
jge    11b7 <main+0x77>
nopl   0x0(%rax)
lea    0x1(%rax),%ecx
mov    %ecx,(%r15)
cltq
mov    (%r14,%rax,8),%rdi
mov    %ebx,%esi
call   1040 <fstype0@plt>
mov    (%r15),%eax
cmp    %ebp,%eax
jl     1190 <main+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xe38(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"n\00"
@stderr = global i32 0
@.str.1 = [25 x i8] c"Usage: %s [-n] font.ttf\0A\00"
@optind = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %8
8: ; preds = %23, %2
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @getopt(i32 %9, i8** %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %11, i32* %7
%12 = icmp ne i32 %11, -1
br i1 %12, label %13, label %24
13: ; preds = %8
%14 = load i32, i32* %7
switch i32 %14, label %16 [
i32 110, label %15
]
15: ; preds = %13
store i32 1, i32* %6
br label %23
16: ; preds = %13
%17 = load i32, i32* @stderr
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %15
br label %8
24: ; preds = %8
%25 = load i32, i32* @optind
%26 = load i32, i32* %4
%27 = icmp sge i32 %25, %26
br i1 %27, label %28, label %35
28: ; preds = %24
%29 = load i32, i32* @stderr
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 0
%32 = load i8*, i8** %31
%33 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %32)
%34 = call i32 @exit(i32 1)
unreachable
35: ; preds = %24
br label %36
36: ; preds = %40, %35
%37 = load i32, i32* @optind
%38 = load i32, i32* %4
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %49
40: ; preds = %36
%41 = load i8**, i8*** %5
%42 = load i32, i32* @optind
%43 = add nsw i32 %42, 1
store i32 %43, i32* @optind
%44 = sext i32 %42 to i64
%45 = getelementptr inbounds i8*, i8** %41, i64 %44
%46 = load i8*, i8** %45
%47 = load i32, i32* %6
%48 = call i32 @fstype0(i8* %46, i32 %47)
br label %36
49: ; preds = %36
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"n\00"
@stderr = global i32 0
@.str.1 = [25 x i8] c"Usage: %s [-n] font.ttf\0A\00"
@optind = global i32 0
define i32 @main(i32 %0, i8** %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ 1, %3 ]
%5 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
switch i32 %5, label %6 [
i32 -1, label %11
i32 110, label %3
]
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %3
%12 = load i32, i32* @optind
%13 = icmp slt i32 %12, %0
br i1 %13, label %19, label %14
14: ; preds = %11
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %1
%17 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = tail call i32 @exit(i32 1)
unreachable
19: ; preds = %11, %19
%20 = phi i32 [ %26, %19 ], [ %12, %11 ]
%21 = add nsw i32 %20, 1
store i32 %21, i32* @optind
%22 = sext i32 %20 to i64
%23 = getelementptr inbounds i8*, i8** %1, i64 %22
%24 = load i8*, i8** %23
%25 = tail call i32 @fstype0(i8* %24, i32 %4)
%26 = load i32, i32* @optind
%27 = icmp slt i32 %26, %0
br i1 %27, label %19, label %28
28: ; preds = %19
ret i32 0
}