#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 *, float *);
int main() {
  float calismaSaati, saatlikUcret, calisanMaasi, yeniSaat;
  printf("\nCalisma saatini girin:(Cikis icin -1):");
  scanf("%f", &calismaSaati);
  printf("\nCalisanin saatlik ucretini girin:");
  scanf("%f", &saatlikUcret);
  while (calismaSaati != -1) {
    if (calismaSaati <= 40) {
      calisanMaasi = calismaSaati * saatlikUcret;
      printf("\nCalisan maasi %f $", calisanMaasi);
    }
    if (calismaSaati >= 40) {
      yeniSaat = calismaSaati - 40;
      calisanMaasi = yeniSaat * saatlikUcret;
      printf("\nCalisan maasi %f $", calisanMaasi);
    }
    printf("\nCalisma saatini girin:(Cikis icin -1):");
    scanf("%f", &calismaSaati);
  }
  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    0xeec(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe88(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    118c <main+0x6c>
jp     118c <main+0x6c>
jmp    1239 <main+0x119>
movss  0xe70(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11c4 <main+0xa4>
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe99(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe33(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1216 <main+0xf6>
movss  -0x8(%rbp),%xmm0
movss  0xe1d(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe47(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe05(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    116b <main+0x4b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef7(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  (%rsp),%xmm0
ucomiss 0xe91(%rip),%xmm0
jne    1177 <main+0x57>
jnp    1212 <main+0xf2>
lea    0xe8e(%rip),%r14
lea    0xeaf(%rip),%r15
mov    %rsp,%r12
lea    0xecb(%rip),%rbx
jmp    11c5 <main+0xa5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
movss  (%rsp),%xmm0
ucomiss 0xe3f(%rip),%xmm0
jne    11c5 <main+0xa5>
jnp    1212 <main+0xf2>
movss  0xe37(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     11eb <main+0xcb>
mulss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  (%rsp),%xmm0
ucomiss 0xe12(%rip),%xmm0
jb     11a0 <main+0x80>
addss  0xe0c(%rip),%xmm0
mulss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11a0 <main+0x80>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [40 x i8] c"\0ACalisma saatini girin:(Cikis icin -1):\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [35 x i8] c"\0ACalisanin saatlik ucretini girin:\00"
@.str.3 = [20 x i8] c"\0ACalisan maasi %f $\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
br label %10
10: ; preds = %35, %0
%11 = load float, float* %2
%12 = fcmp une float %11, -1.000000e+00
br i1 %12, label %13, label %38
13: ; preds = %10
%14 = load float, float* %2
%15 = fcmp ole float %14, 4.000000e+01
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = load float, float* %2
%18 = load float, float* %3
%19 = fmul float %17, %18
store float %19, float* %4
%20 = load float, float* %4
%21 = fpext float %20 to double
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %21)
br label %23
23: ; preds = %16, %13
%24 = load float, float* %2
%25 = fcmp oge float %24, 4.000000e+01
br i1 %25, label %26, label %35
26: ; preds = %23
%27 = load float, float* %2
%28 = fsub float %27, 4.000000e+01
store float %28, float* %5
%29 = load float, float* %5
%30 = load float, float* %3
%31 = fmul float %29, %30
store float %31, float* %4
%32 = load float, float* %4
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %33)
br label %35
35: ; preds = %26, %23
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
br label %10
38: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"\0ACalisma saatini girin:(Cikis icin -1):\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [35 x i8] c"\0ACalisanin saatlik ucretini girin:\00"
@.str.3 = [20 x i8] c"\0ACalisan maasi %f $\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%9 = load float, float* %1
%10 = fcmp une float %9, -1.000000e+00
br i1 %10, label %11, label %34
11: ; preds = %0, %29
%12 = phi float [ %32, %29 ], [ %9, %0 ]
%13 = fcmp ugt float %12, 4.000000e+01
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load float, float* %2
%16 = fmul float %12, %15
%17 = fpext float %16 to double
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %17)
%19 = load float, float* %1
br label %20
20: ; preds = %14, %11
%21 = phi float [ %19, %14 ], [ %12, %11 ]
%22 = fcmp ult float %21, 4.000000e+01
br i1 %22, label %29, label %23
23: ; preds = %20
%24 = fadd float %21, -4.000000e+01
%25 = load float, float* %2
%26 = fmul float %24, %25
%27 = fpext float %26 to double
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), double %27)
br label %29
29: ; preds = %23, %20
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%32 = load float, float* %1
%33 = fcmp une float %32, -1.000000e+00
br i1 %33, label %11, label %34
34: ; preds = %29, %0
ret i32 0
}