#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 option {
  scalar_t__ val;
  char *name;
  scalar_t__ has_arg;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(int nopts, struct option *long_options, const char **cmds) {
  int i;
  fprintf(stderr, "\nUsage: %s [options] <file>\n\n", "data_prep");
  fprintf(stderr, "Prepare diagnostic data from <file>\n\n");
  fprintf(stderr, "  Options:\n");
  for (i = 0; long_options[i].val != 0; i++) {
    fprintf(stderr, "     --%-10s, -%c %s %s\n", long_options[i].name,
            long_options[i].val, long_options[i].has_arg ? "[]" : "  ",
            cmds[4 * i + 3]);
  }
  fprintf(stderr, "\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
lea    0xed4(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
cmpq   $0x0,(%rax)
je     1226 <usage+0x106>
mov    0x2e3a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rdx
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rsi
imul   $0x18,%rsi,%rsi
add    %rsi,%rax
mov    0x10(%rax),%rsi
lea    0xe8f(%rip),%r8
lea    0xe85(%rip),%rax
cmp    $0x0,%rsi
cmovne %rax,%r8
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%esi
shl    $0x2,%esi
add    $0x3,%esi
movslq %esi,%rsi
mov    (%rax,%rsi,8),%r9
lea    0xe49(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1186 <usage+0x66>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
lea    0xde6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    0x2ea8(%rip),%r12
mov    (%r12),%edi
lea    0xebd(%rip),%rsi
lea    0xed4(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r12),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r12),%edi
lea    0xee0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rcx
test   %rcx,%rcx
je     11d1 <usage+0xb1>
add    $0x18,%rbx
add    $0x18,%r14
lea    0xeea(%rip),%r13
lea    0xee0(%rip),%rbp
lea    0xec0(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    (%r12),%edi
cmpq   $0x0,-0x8(%rbx)
mov    -0x10(%rbx),%rdx
mov    %rbp,%r8
cmove  %r13,%r8
mov    (%r14),%r9
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rcx
add    $0x18,%rbx
add    $0x20,%r14
test   %rcx,%rcx
jne    11a0 <usage+0x80>
mov    (%r12),%edi
lea    0xe40(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.option = type { i64, i8*, i64 }
@stderr = global i32 0
@.str = [30 x i8] c"\0AUsage: %s [options] <file>\0A\0A\00"
@.str.1 = [10 x i8] c"data_prep\00"
@.str.2 = [38 x i8] c"Prepare diagnostic data from <file>\0A\0A\00"
@.str.3 = [12 x i8] c" Options:\0A\00"
@.str.4 = [25 x i8] c" --%-10s, -%c %s %s\0A\00"
@.str.5 = [3 x i8] c"[]\00"
@.str.6 = [3 x i8] c" \00"
@.str.7 = [2 x i8] c"\0A\00"
define void @usage(i32 %0, %struct.option* %1, i8** %2) {
%4 = alloca i32
%5 = alloca %struct.option*
%6 = alloca i8**
%7 = alloca i32
store i32 %0, i32* %4
store %struct.option* %1, %struct.option** %5
store i8** %2, i8*** %6
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %7
br label %14
14: ; preds = %53, %3
%15 = load %struct.option*, %struct.option** %5
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds %struct.option, %struct.option* %15, i64 %17
%19 = getelementptr inbounds %struct.option, %struct.option* %18, i32 0, i32 0
%20 = load i64, i64* %19
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %56
22: ; preds = %14
%23 = load i32, i32* @stderr
%24 = load %struct.option*, %struct.option** %5
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds %struct.option, %struct.option* %24, i64 %26
%28 = getelementptr inbounds %struct.option, %struct.option* %27, i32 0, i32 1
%29 = load i8*, i8** %28
%30 = load %struct.option*, %struct.option** %5
%31 = load i32, i32* %7
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds %struct.option, %struct.option* %30, i64 %32
%34 = getelementptr inbounds %struct.option, %struct.option* %33, i32 0, i32 0
%35 = load i64, i64* %34
%36 = load %struct.option*, %struct.option** %5
%37 = load i32, i32* %7
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds %struct.option, %struct.option* %36, i64 %38
%40 = getelementptr inbounds %struct.option, %struct.option* %39, i32 0, i32 2
%41 = load i64, i64* %40
%42 = icmp ne i64 %41, 0
%43 = zext i1 %42 to i64
%44 = select i1 %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0)
%45 = load i8**, i8*** %6
%46 = load i32, i32* %7
%47 = mul nsw i32 4, %46
%48 = add nsw i32 %47, 3
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8*, i8** %45, i64 %49
%51 = load i8*, i8** %50
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %29, i64 %35, i8* %44, i8* %51)
br label %53
53: ; preds = %22
%54 = load i32, i32* %7
%55 = add nsw i32 %54, 1
store i32 %55, i32* %7
br label %14
56: ; preds = %14
%57 = load i32, i32* @stderr
%58 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%59 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
%struct.option = type { i64, i8*, i64 }
@stderr = global i32 0
@.str = [30 x i8] c"\0AUsage: %s [options] <file>\0A\0A\00"
@.str.1 = [10 x i8] c"data_prep\00"
@.str.2 = [38 x i8] c"Prepare diagnostic data from <file>\0A\0A\00"
@.str.3 = [12 x i8] c" Options:\0A\00"
@.str.4 = [25 x i8] c" --%-10s, -%c %s %s\0A\00"
@.str.5 = [3 x i8] c"[]\00"
@.str.6 = [3 x i8] c" \00"
@.str.7 = [2 x i8] c"\0A\00"
define void @usage(i32 %0, %struct.option* nocapture %1, i8** nocapture %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds %struct.option, %struct.option* %1, i64 0, i32 0
%11 = load i64, i64* %10
%12 = icmp eq i64 %11, 0
br i1 %12, label %32, label %13
13: ; preds = %3, %13
%14 = phi i64 [ %28, %13 ], [ 0, %3 ]
%15 = phi i64 [ %30, %13 ], [ %11, %3 ]
%16 = load i32, i32* @stderr
%17 = getelementptr inbounds %struct.option, %struct.option* %1, i64 %14, i32 1
%18 = load i8*, i8** %17
%19 = getelementptr inbounds %struct.option, %struct.option* %1, i64 %14, i32 2
%20 = load i64, i64* %19
%21 = icmp eq i64 %20, 0
%22 = select i1 %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0)
%23 = shl nsw i64 %14, 2
%24 = or i64 %23, 3
%25 = getelementptr inbounds i8*, i8** %2, i64 %24
%26 = load i8*, i8** %25
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8* %18, i64 %15, i8* %22, i8* %26)
%28 = add nuw i64 %14, 1
%29 = getelementptr inbounds %struct.option, %struct.option* %1, i64 %28, i32 0
%30 = load i64, i64* %29
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %13
32: ; preds = %13, %3
%33 = load i32, i32* @stderr
%34 = tail call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%35 = tail call i32 @exit(i32 1)
unreachable
}