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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ podesihardver();
int /*<<< orphan*/ podesijacinupwm(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  podesihardver();
  int g, i, odabir, x = 0, d = 0, t = 0, o = 0, z = 0, y = 0, l = 0;
  FILE *fp;
  fp = fopen("jacina.txt", "r");
  fscanf(fp, "%d", &l);
  fclose(fp);
  if (l <= 1000000000) {
    l = l * 5;
    fp = fopen("jacina.txt", "w");
    ;
    podesijacinupwm(l);
    fprintf(fp, "%d", l);
    fclose(fp);
  } else {
    printf("\n Osvetljenje je maksimalno \n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <podesihardver@plt>
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
lea    0xe3b(%rip),%rdi
lea    0xe3f(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
lea    0xe2d(%rip),%rsi
lea    -0x38(%rbp),%rdx
call   1050 <fscanf@plt>
mov    -0x40(%rbp),%rdi
call   1030 <fclose@plt>
cmpl   $0x3b9aca00,-0x38(%rbp)
jg     1246 <main+0xd6>
imul   $0x5,-0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
lea    0xdf3(%rip),%rdi
lea    0xdfc(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%edi
call   1080 <podesijacinupwm@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%edx
lea    0xdda(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x40(%rbp),%rdi
call   1030 <fclose@plt>
jmp    1252 <main+0xe2>
lea    0xdc5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1070 <podesihardver@plt>
movl   $0x0,0xc(%rsp)
lea    0xe75(%rip),%rdi
lea    0xe79(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
lea    0xe6c(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rax,%rdi
call   1050 <fscanf@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0xc(%rsp),%eax
cmp    $0x3b9aca00,%eax
jg     1204 <main+0x94>
lea    (%rax,%rax,4),%eax
mov    %eax,0xc(%rsp)
lea    0xe31(%rip),%rdi
lea    0xe3a(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
mov    0xc(%rsp),%edi
call   1080 <podesijacinupwm@plt>
mov    0xc(%rsp),%edx
lea    0xe1b(%rip),%rsi
mov    %rbx,%rdi
call   1060 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
jmp    1210 <main+0xa0>
lea    0xe07(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"jacina.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [30 x i8] c"\0A Osvetljenje je maksimalno \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = call i32 (...) @podesihardver()
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
%18 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %18, i32** %16
%19 = load i32*, i32** %16
%20 = call i32 @fscanf(i32* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %15)
%21 = load i32*, i32** %16
%22 = call i32 @fclose(i32* %21)
%23 = load i32, i32* %15
%24 = icmp sle i32 %23, 1000000000
br i1 %24, label %25, label %36
25: ; preds = %2
%26 = load i32, i32* %15
%27 = mul nsw i32 %26, 5
store i32 %27, i32* %15
%28 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %28, i32** %16
%29 = load i32, i32* %15
%30 = call i32 @podesijacinupwm(i32 %29)
%31 = load i32*, i32** %16
%32 = load i32, i32* %15
%33 = call i32 @fprintf(i32* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %32)
%34 = load i32*, i32** %16
%35 = call i32 @fclose(i32* %34)
br label %38
36: ; preds = %2
%37 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
br label %38
38: ; preds = %36, %25
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"jacina.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [2 x i8] c"w\00"
@str = [29 x i8] c"\0A Osvetljenje je maksimalno \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = tail call i32 (...) @podesihardver()
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @fscanf(i32* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%8 = call i32 @fclose(i32* %6)
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 1000000001
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = mul nsw i32 %9, 5
store i32 %12, i32* %3
%13 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32, i32* %3
%15 = call i32 @podesijacinupwm(i32 %14)
%16 = load i32, i32* %3
%17 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = call i32 @fclose(i32* %13)
br label %21
19: ; preds = %2
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %21
21: ; preds = %19, %11
ret i32 0
}