#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 *);
scalar_t__ rec_postoji(char *);
int /*<<< orphan*/ unesi_rec(char *, char **);
int main() {
  char recnik[30][2500];
  char nova_rec[17];
  printf("Unesite rec:\n");
  if (rec_postoji(nova_rec))
    printf("Uneta rec %s vec postoji.\n");
  else
    unesi_rec(nova_rec, recnik);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x12520,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
lea    -0x12520(%rbp),%rdi
call   1040 <rec_postoji@plt>
cmp    $0x0,%rax
je     1175 <main+0x45>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1188 <main+0x58>
lea    -0x12520(%rbp),%rdi
lea    -0x12500(%rbp),%rsi
call   1050 <unesi_rec@plt>
xor    %eax,%eax
add    $0x12520,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x12518,%rsp
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rdi
call   1050 <rec_postoji@plt>
test   %rax,%rax
je     116e <main+0x2e>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
jmp    117b <main+0x3b>
mov    %rsp,%rdi
lea    0x20(%rsp),%rsi
call   1060 <unesi_rec@plt>
xor    %eax,%eax
add    $0x12518,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Unesite rec:\0A\00"
@.str.1 = [27 x i8] c"Uneta rec %s vec postoji.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x [2500 x i8]]
%3 = alloca [17 x i8]
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%6 = call i64 @rec_postoji(i8* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %15
10: ; preds = %0
%11 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [30 x [2500 x i8]], [30 x [2500 x i8]]* %2, i64 0, i64 0
%13 = bitcast [2500 x i8]* %12 to i8**
%14 = call i32 @unesi_rec(i8* %11, i8** %13)
br label %15
15: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [27 x i8] c"Uneta rec %s vec postoji.\0A\00"
@str = [13 x i8] c"Unesite rec:\00"
define i32 @main() {
%1 = alloca [30 x [2500 x i8]]
%2 = alloca [17 x i8]
%3 = getelementptr inbounds [30 x [2500 x i8]], [30 x [2500 x i8]]* %1, i64 0, i64 0, i64 0
%4 = getelementptr inbounds [17 x i8], [17 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%6 = call i64 @rec_postoji(i8* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %0
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %13
10: ; preds = %0
%11 = bitcast [30 x [2500 x i8]]* %1 to i8**
%12 = call i32 @unesi_rec(i8* %4, i8** %11)
br label %13
13: ; preds = %10, %8
ret i32 0
}