#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 {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ *member_2;
  int /*<<< orphan*/ member_1;
};

/* Variables and functions */
char getopt_long(int, char **, char *, struct option *, int /*<<< orphan*/ *);
int /*<<< orphan*/ no_argument;
int /*<<< orphan*/ show_basic_info();
int /*<<< orphan*/ show_family_info();
int /*<<< orphan*/ show_version_info();
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  char *optstring = "bfhv";
  struct option longopts[] = {{"basic_info", no_argument, NULL, 'b'},
                              {"family_info", no_argument, NULL, 'f'},
                              {"help", no_argument, NULL, 'h'},
                              {"version", no_argument, NULL, 'v'},
                              {0, 0, 0, 0}};
  if (argc <= 1) {
    usage();
    return 0;
  }
  char opt;
  while ((opt = getopt_long(argc, argv, optstring, longopts, NULL)) != -1) {
    switch (opt) {
    case 'b':
      show_basic_info();
      return 0;
    case 'f':
      show_family_info();
      return 0;
    case 'v':
      show_version_info();
      return 0;
    case 'h':
    case '?':
    default:
      usage();
      return 0;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe80(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xe73(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0x2e40(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xb8(%rbp)
movq   $0x0,-0xb0(%rbp)
movl   $0x62,-0xa8(%rbp)
add    $0x20,%rdi
lea    0xe48(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2e0a(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x98(%rbp)
movq   $0x0,-0x90(%rbp)
movl   $0x66,-0x88(%rbp)
add    $0x20,%rdi
lea    0xe1e(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0x2dd7(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x78(%rbp)
movq   $0x0,-0x70(%rbp)
movl   $0x68,-0x68(%rbp)
add    $0x20,%rdi
lea    0xdf9(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2dad(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x58(%rbp)
movq   $0x0,-0x50(%rbp)
movl   $0x76,-0x48(%rbp)
add    $0x20,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1050 <memset@plt>
cmpl   $0x1,-0x8(%rbp)
jg     1274 <main+0x114>
mov    $0x0,%al
call   1060 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    136a <main+0x20a>
jmp    1279 <main+0x119>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0xc0(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <getopt_long@plt>
mov    %al,-0xc1(%rbp)
movsbl %al,%eax
cmp    $0xffffffff,%eax
je     1363 <main+0x203>
movsbl -0xc1(%rbp),%eax
mov    %eax,-0xc8(%rbp)
sub    $0x3f,%eax
je     134b <main+0x1eb>
jmp    12c2 <main+0x162>
mov    -0xc8(%rbp),%eax
sub    $0x62,%eax
je     1312 <main+0x1b2>
jmp    12d6 <main+0x176>
mov    -0xc8(%rbp),%eax
sub    $0x66,%eax
je     1325 <main+0x1c5>
jmp    12ea <main+0x18a>
mov    -0xc8(%rbp),%eax
sub    $0x68,%eax
je     134b <main+0x1eb>
jmp    12fe <main+0x19e>
mov    -0xc8(%rbp),%eax
sub    $0x76,%eax
je     1338 <main+0x1d8>
jmp    1350 <main+0x1f0>
mov    $0x0,%al
call   1080 <show_basic_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    136a <main+0x20a>
mov    $0x0,%al
call   1040 <show_family_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    136a <main+0x20a>
mov    $0x0,%al
call   1070 <show_version_info@plt>
movl   $0x0,-0x4(%rbp)
jmp    136a <main+0x20a>
jmp    1350 <main+0x1f0>
mov    $0x0,%al
call   1060 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    136a <main+0x20a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xa8,%rsp
lea    0xea7(%rip),%rax
mov    %rax,(%rsp)
mov    0x2e77(%rip),%rax
mov    (%rax),%al
mov    %al,0x8(%rsp)
movq   $0x0,0x10(%rsp)
movl   $0x62,0x18(%rsp)
lea    0xe89(%rip),%rcx
mov    %rcx,0x20(%rsp)
mov    %al,0x28(%rsp)
movq   $0x0,0x30(%rsp)
movl   $0x66,0x38(%rsp)
lea    0xe74(%rip),%rcx
mov    %rcx,0x40(%rsp)
mov    %al,0x48(%rsp)
movq   $0x0,0x50(%rsp)
movl   $0x68,0x58(%rsp)
lea    0xe58(%rip),%rcx
mov    %rcx,0x60(%rsp)
mov    %al,0x68(%rsp)
movq   $0x0,0x70(%rsp)
movl   $0x76,0x78(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
cmp    $0x1,%edi
jg     1204 <main+0xb4>
xor    %eax,%eax
call   1050 <usage@plt>
jmp    1245 <main+0xf5>
lea    0xdf5(%rip),%rdx
mov    %rsp,%rcx
xor    %r8d,%r8d
call   1030 <getopt_long@plt>
cmp    $0xff,%al
je     1245 <main+0xf5>
movsbl %al,%eax
cmp    $0x76,%eax
je     1235 <main+0xe5>
cmp    $0x66,%eax
je     123e <main+0xee>
cmp    $0x62,%eax
jne    11fb <main+0xab>
xor    %eax,%eax
call   1070 <show_basic_info@plt>
jmp    1245 <main+0xf5>
xor    %eax,%eax
call   1060 <show_version_info@plt>
jmp    1245 <main+0xf5>
xor    %eax,%eax
call   1040 <show_family_info@plt>
xor    %eax,%eax
add    $0xa8,%rsp
ret

LLVM IR (-O0):
%struct.option = type { i8*, i8, i32*, i32 }
@.str = [5 x i8] c"bfhv\00"
@.str.1 = [11 x i8] c"basic_info\00"
@no_argument = global i32 0
@.str.2 = [12 x i8] c"family_info\00"
@.str.3 = [5 x i8] c"help\00"
@.str.4 = [8 x i8] c"version\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [5 x %struct.option]
%8 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %6
%9 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %7, i64 0, i64 0
%10 = getelementptr inbounds %struct.option, %struct.option* %9, i32 0, i32 0
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %10
%11 = getelementptr inbounds %struct.option, %struct.option* %9, i32 0, i32 1
%12 = load i32, i32* @no_argument
%13 = trunc i32 %12 to i8
store i8 %13, i8* %11
%14 = getelementptr inbounds %struct.option, %struct.option* %9, i32 0, i32 2
store i32* null, i32** %14
%15 = getelementptr inbounds %struct.option, %struct.option* %9, i32 0, i32 3
store i32 98, i32* %15
%16 = getelementptr inbounds %struct.option, %struct.option* %9, i64 1
%17 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8** %17
%18 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 1
%19 = load i32, i32* @no_argument
%20 = trunc i32 %19 to i8
store i8 %20, i8* %18
%21 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 2
store i32* null, i32** %21
%22 = getelementptr inbounds %struct.option, %struct.option* %16, i32 0, i32 3
store i32 102, i32* %22
%23 = getelementptr inbounds %struct.option, %struct.option* %16, i64 1
%24 = getelementptr inbounds %struct.option, %struct.option* %23, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %24
%25 = getelementptr inbounds %struct.option, %struct.option* %23, i32 0, i32 1
%26 = load i32, i32* @no_argument
%27 = trunc i32 %26 to i8
store i8 %27, i8* %25
%28 = getelementptr inbounds %struct.option, %struct.option* %23, i32 0, i32 2
store i32* null, i32** %28
%29 = getelementptr inbounds %struct.option, %struct.option* %23, i32 0, i32 3
store i32 104, i32* %29
%30 = getelementptr inbounds %struct.option, %struct.option* %23, i64 1
%31 = getelementptr inbounds %struct.option, %struct.option* %30, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %31
%32 = getelementptr inbounds %struct.option, %struct.option* %30, i32 0, i32 1
%33 = load i32, i32* @no_argument
%34 = trunc i32 %33 to i8
store i8 %34, i8* %32
%35 = getelementptr inbounds %struct.option, %struct.option* %30, i32 0, i32 2
store i32* null, i32** %35
%36 = getelementptr inbounds %struct.option, %struct.option* %30, i32 0, i32 3
store i32 118, i32* %36
%37 = getelementptr inbounds %struct.option, %struct.option* %30, i64 1
%38 = bitcast %struct.option* %37 to i8*
%39 = load i32, i32* %4
%40 = icmp sle i32 %39, 1
br i1 %40, label %41, label %43
41: ; preds = %2
%42 = call i32 (...) @usage()
store i32 0, i32* %3
br label %65
43: ; preds = %2
br label %44
44: ; preds = %43
%45 = load i32, i32* %4
%46 = load i8**, i8*** %5
%47 = load i8*, i8** %6
%48 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %7, i64 0, i64 0
%49 = call signext i8 @getopt_long(i32 %45, i8** %46, i8* %47, %struct.option* %48, i32* null)
store i8 %49, i8* %8
%50 = sext i8 %49 to i32
%51 = icmp ne i32 %50, -1
br i1 %51, label %52, label %64
52: ; preds = %44
%53 = load i8, i8* %8
%54 = sext i8 %53 to i32
switch i32 %54, label %62 [
i32 98, label %55
i32 102, label %57
i32 118, label %59
i32 104, label %61
i32 63, label %61
]
55: ; preds = %52
%56 = call i32 (...) @show_basic_info()
store i32 0, i32* %3
br label %65
57: ; preds = %52
%58 = call i32 (...) @show_family_info()
store i32 0, i32* %3
br label %65
59: ; preds = %52
%60 = call i32 (...) @show_version_info()
store i32 0, i32* %3
br label %65
61: ; preds = %52, %52
br label %62
62: ; preds = %52, %61
%63 = call i32 (...) @usage()
store i32 0, i32* %3
br label %65
64: ; preds = %44
store i32 0, i32* %3
br label %65
65: ; preds = %64, %62, %59, %57, %55, %41
%66 = load i32, i32* %3
ret i32 %66
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i32*, i32 }
@.str = [5 x i8] c"bfhv\00"
@.str.1 = [11 x i8] c"basic_info\00"
@no_argument = global i32 0
@.str.2 = [12 x i8] c"family_info\00"
@.str.3 = [5 x i8] c"help\00"
@.str.4 = [8 x i8] c"version\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [5 x %struct.option]
%4 = bitcast [5 x %struct.option]* %3 to i8*
%5 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0, i32 1
%7 = load i32, i32* @no_argument
%8 = trunc i32 %7 to i8
store i8 %8, i8* %6
%9 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0, i32 2
store i32* null, i32** %9
%10 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0, i32 3
store i32 98, i32* %10
%11 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8** %11
%12 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 1, i32 1
store i8 %8, i8* %12
%13 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 1, i32 2
store i32* null, i32** %13
%14 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 1, i32 3
store i32 102, i32* %14
%15 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %15
%16 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 2, i32 1
store i8 %8, i8* %16
%17 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 2, i32 2
store i32* null, i32** %17
%18 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 2, i32 3
store i32 104, i32* %18
%19 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %19
%20 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 3, i32 1
store i8 %8, i8* %20
%21 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 3, i32 2
store i32* null, i32** %21
%22 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 3, i32 3
store i32 118, i32* %22
%23 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 4
%24 = bitcast %struct.option* %23 to i8*
%25 = icmp slt i32 %0, 2
br i1 %25, label %26, label %28
26: ; preds = %2
%27 = tail call i32 (...) @usage()
br label %42
28: ; preds = %2
%29 = getelementptr inbounds [5 x %struct.option], [5 x %struct.option]* %3, i64 0, i64 0
%30 = call signext i8 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %struct.option* %29, i32* null)
%31 = icmp eq i8 %30, -1
br i1 %31, label %42, label %32
32: ; preds = %28
%33 = sext i8 %30 to i32
switch i32 %33, label %40 [
i32 98, label %34
i32 102, label %36
i32 118, label %38
]
34: ; preds = %32
%35 = call i32 (...) @show_basic_info()
br label %42
36: ; preds = %32
%37 = call i32 (...) @show_family_info()
br label %42
38: ; preds = %32
%39 = call i32 (...) @show_version_info()
br label %42
40: ; preds = %32
%41 = call i32 (...) @usage()
br label %42
42: ; preds = %34, %36, %38, %40, %28, %26
ret i32 0
}