#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 *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int gun;
  float ana_para, faiz, faiz_orani;
  printf("Programdan cikmak icin -1 e basiniz.\n");
  printf("Ana parayi giriniz:");
  scanf("%f", &ana_para);
  while (ana_para != -1) {
    printf("Faiz oranini giriniz:");
    scanf("%f", &faiz_orani);
    printf("Gun sayisini giriniz:");
    scanf("%d", &gun);
    faiz = (ana_para * faiz_orani * gun) / 365;
    printf("Faiz ucreti %.2f TL dir.\n", faiz);
    printf("Ana parayi giriniz:");
    scanf("%f", &ana_para);
  }
  if (ana_para == -1) {
    printf("Program sonlandirilmistir.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
movss  0xe96(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    117e <main+0x5e>
jp     117e <main+0x5e>
jmp    121e <main+0xfe>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xe2b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe82(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe34(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    115d <main+0x3d>
movss  -0xc(%rbp),%xmm0
movss  0xdd5(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1248 <main+0x128>
jp     1248 <main+0x128>
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xf3e(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
ucomiss 0xe88(%rip),%xmm0
jne    1180 <main+0x50>
jnp    124a <main+0x11a>
lea    0xe95(%rip),%rbx
lea    0xebd(%rip),%r13
lea    0x14(%rsp),%rbp
lea    0xeb4(%rip),%r14
lea    0xe67(%rip),%r15
lea    0xc(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
lea    0xe68(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xe61(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
mulss  0x10(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2ssl 0x14(%rsp),%xmm1
mulss  %xmm0,%xmm1
divss  0xdfb(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
ucomiss 0xdc2(%rip),%xmm0
jne    11b0 <main+0x80>
jp     11b0 <main+0x80>
lea    0xe17(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Programdan cikmak icin -1 e basiniz.\0A\00"
@.str.1 = [20 x i8] c"Ana parayi giriniz:\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [22 x i8] c"Faiz oranini giriniz:\00"
@.str.4 = [22 x i8] c"Gun sayisini giriniz:\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [26 x i8] c"Faiz ucreti %.2f TL dir.\0A\00"
@.str.7 = [27 x i8] c"Program sonlandirilmistir.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
br label %9
9: ; preds = %12, %0
%10 = load float, float* %3
%11 = fcmp une float %10, -1.000000e+00
br i1 %11, label %12, label %29
12: ; preds = %9
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %5)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %2)
%17 = load float, float* %3
%18 = load float, float* %5
%19 = fmul float %17, %18
%20 = load i32, i32* %2
%21 = sitofp i32 %20 to float
%22 = fmul float %19, %21
%23 = fdiv float %22, 3.650000e+02
store float %23, float* %4
%24 = load float, float* %4
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), double %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
br label %9
29: ; preds = %9
%30 = load float, float* %3
%31 = fcmp oeq float %30, -1.000000e+00
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
br label %34
34: ; preds = %32, %29
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [20 x i8] c"Ana parayi giriniz:\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [22 x i8] c"Faiz oranini giriniz:\00"
@.str.4 = [22 x i8] c"Gun sayisini giriniz:\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [26 x i8] c"Faiz ucreti %.2f TL dir.\0A\00"
@.str.7 = [27 x i8] c"Program sonlandirilmistir.\00"
@str = [37 x i8] c"Programdan cikmak icin -1 e basiniz.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = bitcast i32* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%10 = load float, float* %2
%11 = fcmp une float %10, -1.000000e+00
br i1 %11, label %12, label %30
12: ; preds = %0, %12
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%17 = load float, float* %2
%18 = load float, float* %3
%19 = fmul float %17, %18
%20 = load i32, i32* %1
%21 = sitofp i32 %20 to float
%22 = fmul float %19, %21
%23 = fdiv float %22, 3.650000e+02
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), double %24)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%28 = load float, float* %2
%29 = fcmp une float %28, -1.000000e+00
br i1 %29, label %12, label %30
30: ; preds = %12, %0
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}