#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*/ opt_desc;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
void evemu_print_options() {
  static char *opt_desc[] = {
      "-m",
      "--mouse",
      "  Mouse input device node path, for example, /dev/input/event12",
      "-x",
      "--mouse-x",
      "  Mouse initial X axis offset, for example, 100 or -100",
      "-y",
      "--mouse-y",
      "  Mouse initial Y axis offset, for example, 100 or -100",
      "-d",
      "--device",
      "  Other input device node path, for example, /dev/input/event10.",
      "  You can specify multiple input device by using multiple -d options.",
      "-l",
      "--list",
      "  List all input devices.",
      "-h",
      "--help",
      "  Print this help.",
      ""};
  char *prefix = "  ";
  char *surfix = "\n";
  for (int i = 0; i < sizeof(opt_desc) / sizeof(char *); i++) {
    fprintf(stderr, "%s%s%s", prefix, opt_desc[i], surfix);
  }
}


x86 assembly (clang, -O0):
<evemu_print_options>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0x1084(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0x107c(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x14,%rax
jae    117d <evemu_print_options+0x6d>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
movslq -0x14(%rbp),%rcx
lea    0x2ed5(%rip),%rax
mov    (%rax,%rcx,8),%rcx
mov    -0x10(%rbp),%r8
lea    0x103e(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1135 <evemu_print_options+0x25>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evemu_print_options>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %ebx,%ebx
mov    0x2ebc(%rip),%r13
lea    0xed5(%rip),%rbp
lea    0x10c6(%rip),%r14
lea    0x10ba(%rip),%r15
lea    0x10b6(%rip),%r12
mov    0x0(%r13),%edi
movslq (%rbx,%rbp,1),%rcx
add    %rbp,%rcx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %r12,%r8
call   1030 <fprintf@plt>
add    $0x4,%rbx
cmp    $0x50,%rbx
jne    1140 <evemu_print_options+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@evemu_print_options.opt_desc = internal global [20 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i32 0, i32 0)]
@.str = [3 x i8] c"-m\00"
@.str.1 = [8 x i8] c"--mouse\00"
@.str.2 = [64 x i8] c" Mouse input device node path, for example, /dev/input/event12\00"
@.str.3 = [3 x i8] c"-x\00"
@.str.4 = [10 x i8] c"--mouse-x\00"
@.str.5 = [56 x i8] c" Mouse initial X axis offset, for example, 100 or -100\00"
@.str.6 = [3 x i8] c"-y\00"
@.str.7 = [10 x i8] c"--mouse-y\00"
@.str.8 = [56 x i8] c" Mouse initial Y axis offset, for example, 100 or -100\00"
@.str.9 = [3 x i8] c"-d\00"
@.str.10 = [9 x i8] c"--device\00"
@.str.11 = [65 x i8] c" Other input device node path, for example, /dev/input/event10.\00"
@.str.12 = [70 x i8] c" You can specify multiple input device by using multiple -d options.\00"
@.str.13 = [3 x i8] c"-l\00"
@.str.14 = [7 x i8] c"--list\00"
@.str.15 = [26 x i8] c" List all input devices.\00"
@.str.16 = [3 x i8] c"-h\00"
@.str.17 = [7 x i8] c"--help\00"
@.str.18 = [19 x i8] c" Print this help.\00"
@.str.19 = [1 x i8] zeroinitializer
@.str.20 = [3 x i8] c" \00"
@.str.21 = [2 x i8] c"\0A\00"
@stderr = global i32 0
@.str.22 = [7 x i8] c"%s%s%s\00"
define void @evemu_print_options() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i32
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0), i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %17, %0
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = icmp ult i64 %6, 20
br i1 %7, label %8, label %20
8: ; preds = %4
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %1
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [20 x i8*], [20 x i8*]* @evemu_print_options.opt_desc, i64 0, i64 %12
%14 = load i8*, i8** %13
%15 = load i8*, i8** %2
%16 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i8* %10, i8* %14, i8* %15)
br label %17
17: ; preds = %8
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %4
20: ; preds = %4
ret void
}

LLVM IR (-O2):
@reltable.evemu_print_options = internal unnamed_addr constant [20 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.1 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([64 x i8]* @.str.2 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.3 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.4 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([56 x i8]* @.str.5 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.6 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.7 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([56 x i8]* @.str.8 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.9 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.10 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([65 x i8]* @.str.11 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([70 x i8]* @.str.12 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.13 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.14 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.15 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.16 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.17 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.18 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([1 x i8]* @.str.19 to i64), i64 ptrtoint ([20 x i32]* @reltable.evemu_print_options to i64)) to i32)]
@.str = [3 x i8] c"-m\00"
@.str.1 = [8 x i8] c"--mouse\00"
@.str.2 = [64 x i8] c" Mouse input device node path, for example, /dev/input/event12\00"
@.str.3 = [3 x i8] c"-x\00"
@.str.4 = [10 x i8] c"--mouse-x\00"
@.str.5 = [56 x i8] c" Mouse initial X axis offset, for example, 100 or -100\00"
@.str.6 = [3 x i8] c"-y\00"
@.str.7 = [10 x i8] c"--mouse-y\00"
@.str.8 = [56 x i8] c" Mouse initial Y axis offset, for example, 100 or -100\00"
@.str.9 = [3 x i8] c"-d\00"
@.str.10 = [9 x i8] c"--device\00"
@.str.11 = [65 x i8] c" Other input device node path, for example, /dev/input/event10.\00"
@.str.12 = [70 x i8] c" You can specify multiple input device by using multiple -d options.\00"
@.str.13 = [3 x i8] c"-l\00"
@.str.14 = [7 x i8] c"--list\00"
@.str.15 = [26 x i8] c" List all input devices.\00"
@.str.16 = [3 x i8] c"-h\00"
@.str.17 = [7 x i8] c"--help\00"
@.str.18 = [19 x i8] c" Print this help.\00"
@.str.19 = [1 x i8] zeroinitializer
@.str.20 = [3 x i8] c" \00"
@.str.21 = [2 x i8] c"\0A\00"
@stderr = global i32 0
@.str.22 = [7 x i8] c"%s%s%s\00"
define void @evemu_print_options() {
br label %2
1: ; preds = %2
ret void
2: ; preds = %0, %2
%3 = phi i64 [ 0, %0 ], [ %8, %2 ]
%4 = load i32, i32* @stderr
%5 = shl i64 %3, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([20 x i32]* @reltable.evemu_print_options to i8*), i64 %5)
%7 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%8 = add nuw nsw i64 %3, 1
%9 = icmp eq i64 %8, 20
br i1 %9, label %1, label %2
}