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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void PrintUserMenuChoices() {
  int i;
  printf("--MENI--\n[Naredba] <-> [Objasnjenje]\n");
  char *options[] = {
      "md <dir>   -  kreiraj novi direktorij u trenutnom",
      "cd..       -  izadi iz trenutnog direktorija u roditeljski",
      "cd <dir>   -  pozicioniraj se u odredeni direktorij",
      "dir        -  ispisi sadrzaj trenutnog direktorija",
      "exit       -  izlaz"};
  for (i = 0; i < sizeof(options) / sizeof(char *); i++)
    printf("%s\n", options[i]);
}


x86 assembly (clang, -O0):
<PrintUserMenuChoices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0xed9(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xf00(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xf30(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xf59(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xf81(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rax
cmp    $0x5,%rax
jae    11b7 <PrintUserMenuChoices+0x97>
movslq -0x4(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rsi
lea    0xf6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1184 <PrintUserMenuChoices+0x64>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintUserMenuChoices>:
push   %rax
lea    0xfd0(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
lea    0xf31(%rip),%rdi
call   1030 <puts@plt>
lea    0xf59(%rip),%rdi
call   1030 <puts@plt>
lea    0xf80(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"--MENI--\0A[Naredba] <-> [Objasnjenje]\0A\00"
@.str.1 = [50 x i8] c"md <dir> - kreiraj novi direktorij u trenutnom\00"
@.str.2 = [59 x i8] c"cd.. - izadi iz trenutnog direktorija u roditeljski\00"
@.str.3 = [52 x i8] c"cd <dir> - pozicioniraj se u odredeni direktorij\00"
@.str.4 = [51 x i8] c"dir - ispisi sadrzaj trenutnog direktorija\00"
@.str.5 = [20 x i8] c"exit - izlaz\00"
@.str.6 = [4 x i8] c"%s\0A\00"
define void @PrintUserMenuChoices() {
%1 = alloca i32
%2 = alloca [5 x i8*]
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [5 x i8*]* %2 to i8*
%5 = bitcast i8* %4 to [5 x i8*]*
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 0
store i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i32 0, i32 0), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 1
store i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i32 0, i32 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 2
store i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 3
store i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i32 0, i32 0), i8** %9
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %5, i32 0, i32 4
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i32 0, i32 0), i8** %10
store i32 0, i32* %1
br label %11
11: ; preds = %21, %0
%12 = load i32, i32* %1
%13 = sext i32 %12 to i64
%14 = icmp ult i64 %13, 5
br i1 %14, label %15, label %24
15: ; preds = %11
%16 = load i32, i32* %1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %15
%22 = load i32, i32* %1
%23 = add nsw i32 %22, 1
store i32 %23, i32* %1
br label %11
24: ; preds = %11
ret void
}

LLVM IR (-O2):
@.str.1 = [50 x i8] c"md <dir> - kreiraj novi direktorij u trenutnom\00"
@.str.2 = [59 x i8] c"cd.. - izadi iz trenutnog direktorija u roditeljski\00"
@.str.3 = [52 x i8] c"cd <dir> - pozicioniraj se u odredeni direktorij\00"
@.str.4 = [51 x i8] c"dir - ispisi sadrzaj trenutnog direktorija\00"
@.str.5 = [20 x i8] c"exit - izlaz\00"
@str = [37 x i8] c"--MENI--\0A[Naredba] <-> [Objasnjenje]\00"
define void @PrintUserMenuChoices() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
ret void
}