#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(void) {
  float vendite = 0;
  int valoreSentinella = -1;
  float importoSalario = 0;
  do {
    printf("%s", "\nInserire vendite in dollari (-1 per uscire): ");
    scanf("%f", &vendite);
    if (vendite != valoreSentinella) {
      importoSalario = ((vendite * ((float)9 / 100)) + (float)200);
      printf("Il Salario e': $%.02f\n", importoSalario);
    }
  } while (vendite != valoreSentinella);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xebb(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jne    1189 <main+0x69>
jp     1189 <main+0x69>
jmp    11c2 <main+0xa2>
movss  -0x8(%rbp),%xmm0
movss  0xe6a(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe62(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe82(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11c7 <main+0xa7>
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jne    1146 <main+0x26>
jp     1146 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xed0(%rip),%r14
lea    0xecc(%rip),%r15
lea    0xef4(%rip),%r12
lea    0xc(%rsp),%r13
lea    0xeeb(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
ucomiss 0xe7b(%rip),%xmm0
jne    1189 <main+0x69>
jnp    11b8 <main+0x98>
mulss  0xe73(%rip),%xmm0
addss  0xe6f(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
ucomiss 0xe4c(%rip),%xmm0
jne    1160 <main+0x40>
jp     1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [47 x i8] c"\0AInserire vendite in dollari (-1 per uscire): \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [23 x i8] c"Il Salario e': $%.02f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store i32 -1, i32* %3
store float 0.000000e+00, float* %4
br label %5
5: ; preds = %19, %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%8 = load float, float* %2
%9 = load i32, i32* %3
%10 = sitofp i32 %9 to float
%11 = fcmp une float %8, %10
br i1 %11, label %12, label %18
12: ; preds = %5
%13 = load float, float* %2
%14 = call float @llvm.fmuladd.f32(float %13, float 0x3FB70A3D80000000, float 2.000000e+02)
store float %14, float* %4
%15 = load float, float* %4
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %16)
br label %18
18: ; preds = %12, %5
br label %19
19: ; preds = %18
%20 = load float, float* %2
%21 = load i32, i32* %3
%22 = sitofp i32 %21 to float
%23 = fcmp une float %20, %22
br i1 %23, label %5, label %24
24: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [47 x i8] c"\0AInserire vendite in dollari (-1 per uscire): \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [23 x i8] c"Il Salario e': $%.02f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
br label %3
3: ; preds = %8, %0
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%6 = load float, float* %1
%7 = fcmp une float %6, -1.000000e+00
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = call float @llvm.fmuladd.f32(float %6, float 0x3FB70A3D80000000, float 2.000000e+02)
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %10)
%12 = load float, float* %1
%13 = fcmp une float %12, -1.000000e+00
br i1 %13, label %3, label %14
14: ; preds = %3, %8
ret i32 0
}