#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*/ printf(char *, char const *);
void print_options(const char *options[], int index, int amount) {
  for (int i = 0; i < amount; i++) {
    if (i == index)
      printf("\x1b[33m"
             "\t\t\t\t %s \n"
             "\x1b[0m",
             options[i]);
    else
      printf("\t\t\t\t %s \n", options[i]);
  }
}


x86 assembly (clang, -O0):
<print_options>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1189 <print_options+0x79>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    115e <print_options+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    1176 <print_options+0x66>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    117b <print_options+0x6b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <print_options+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_options>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    115c <print_options+0x4c>
mov    %rdi,%r14
mov    %esi,%r15d
mov    %edx,%r12d
xor    %ebx,%ebx
lea    0xecf(%rip),%r13
lea    0xedb(%rip),%rbp
nopl   0x0(%rax,%rax,1)
cmp    %rbx,%r15
mov    %rbp,%rdi
cmove  %r13,%rdi
mov    (%r14,%rbx,8),%rsi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_options+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\1B[33m\09\09\09\09 %s \0A\1B[0m\00"
@.str.1 = [10 x i8] c"\09\09\09\09 %s \0A\00"
define void @print_options(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %31, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %34
12: ; preds = %8
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %23
16: ; preds = %12
%17 = load i8**, i8*** %4
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = load i8*, i8** %20
%22 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %21)
br label %30
23: ; preds = %12
%24 = load i8**, i8*** %4
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %28)
br label %30
30: ; preds = %23, %16
br label %31
31: ; preds = %30
%32 = load i32, i32* %7
%33 = add nsw i32 %32, 1
store i32 %33, i32* %7
br label %8
34: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"\1B[33m\09\09\09\09 %s \0A\1B[0m\00"
@.str.1 = [10 x i8] c"\09\09\09\09 %s \0A\00"
define void @print_options(i8** nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = zext i32 %2 to i64
br label %9
8: ; preds = %9, %3
ret void
9: ; preds = %5, %9
%10 = phi i64 [ 0, %5 ], [ %16, %9 ]
%11 = icmp eq i64 %10, %6
%12 = getelementptr inbounds i8*, i8** %0, i64 %10
%13 = select i1 %11, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0)
%14 = load i8*, i8** %12
%15 = tail call i32 @printf(i8* %13, i8* %14)
%16 = add nuw nsw i64 %10, 1
%17 = icmp eq i64 %16, %7
br i1 %17, label %8, label %9
}