#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 */
typedef int /*<<< orphan*/ opts;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void show_options(void) {
  static const struct {
    const char *name;
    const char *desc;
  } opts[] = {{"-a, --allow-root", "allow running command as root user"},
              {"-u, --user=USERNAME", "run command as specified user name"},
              {"-h, --help", "display this help and exit"},
              {"-v, --version", "output version information and exit"},
              {"--", "stop processing command line options"}};
  unsigned int i;
  for (i = 0; i < sizeof(opts) / sizeof(opts[0]); i++) {
    printf("  %-28s%s\n", opts[i].name, opts[i].desc);
  }
}


x86 assembly (clang, -O0):
<show_options>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x5,%rax
jae    1173 <show_options+0x63>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0x2c98(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rsi
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0x2c82(%rip),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rdx
lea    0xf8b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <show_options+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_options>:
push   %rbx
lea    0xfd3(%rip),%rbx
lea    0xee1(%rip),%rsi
lea    0xeeb(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xeff(%rip),%rsi
lea    0xf0c(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf20(%rip),%rsi
lea    0xf24(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf30(%rip),%rsi
lea    0xf37(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf4c(%rip),%rsi
lea    0xf48(%rip),%rdx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.anon = type { i8*, i8* }
@show_options.opts = internal constant [5 x %struct.anon] [%struct.anon { i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i32 0, i32 0) }, %struct.anon { i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i32 0, i32 0) }]
@.str = [17 x i8] c"-a, --allow-root\00"
@.str.1 = [35 x i8] c"allow running command as root user\00"
@.str.2 = [20 x i8] c"-u, --user=USERNAME\00"
@.str.3 = [35 x i8] c"run command as specified user name\00"
@.str.4 = [11 x i8] c"-h, --help\00"
@.str.5 = [27 x i8] c"display this help and exit\00"
@.str.6 = [14 x i8] c"-v, --version\00"
@.str.7 = [36 x i8] c"output version information and exit\00"
@.str.8 = [3 x i8] c"--\00"
@.str.9 = [37 x i8] c"stop processing command line options\00"
@.str.10 = [11 x i8] c" %-28s%s\0A\00"
define void @show_options() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %18, %0
%3 = load i32, i32* %1
%4 = zext i32 %3 to i64
%5 = icmp ult i64 %4, 5
br i1 %5, label %6, label %21
6: ; preds = %2
%7 = load i32, i32* %1
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds [5 x %struct.anon], [5 x %struct.anon]* @show_options.opts, i64 0, i64 %8
%10 = getelementptr inbounds %struct.anon, %struct.anon* %9, i32 0, i32 0
%11 = load i8*, i8** %10
%12 = load i32, i32* %1
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds [5 x %struct.anon], [5 x %struct.anon]* @show_options.opts, i64 0, i64 %13
%15 = getelementptr inbounds %struct.anon, %struct.anon* %14, i32 0, i32 1
%16 = load i8*, i8** %15
%17 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* %11, i8* %16)
br label %18
18: ; preds = %6
%19 = load i32, i32* %1
%20 = add i32 %19, 1
store i32 %20, i32* %1
br label %2
21: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"-a, --allow-root\00"
@.str.1 = [35 x i8] c"allow running command as root user\00"
@.str.2 = [20 x i8] c"-u, --user=USERNAME\00"
@.str.3 = [35 x i8] c"run command as specified user name\00"
@.str.4 = [11 x i8] c"-h, --help\00"
@.str.5 = [27 x i8] c"display this help and exit\00"
@.str.6 = [14 x i8] c"-v, --version\00"
@.str.7 = [36 x i8] c"output version information and exit\00"
@.str.8 = [3 x i8] c"--\00"
@.str.9 = [37 x i8] c"stop processing command line options\00"
@.str.10 = [11 x i8] c" %-28s%s\0A\00"
define void @show_options() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0))
ret void
}