#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 chemical_sells, salary;
  printf("\nEnter sales in dollars (-1 to end):");
  scanf("%f", &chemical_sells);
  while (chemical_sells != -1) {
    salary = ((chemical_sells * 9) / 100) + (200);
    printf("Salary is:$%.2f\n", salary);
    printf("\nEnter sales in dollars (-1 to end):");
    scanf("%f", &chemical_sells);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xea6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    116e <main+0x4e>
jp     116e <main+0x4e>
jmp    11d2 <main+0xb2>
movss  0xe96(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xe85(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe75(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe90(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe71(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    114d <main+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xee1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xeac(%rip),%xmm0
jne    1158 <main+0x38>
jnp    11cc <main+0xac>
lea    0xed9(%rip),%r14
lea    0xeaa(%rip),%r15
lea    0xec8(%rip),%r12
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulss  0xe7c(%rip),%xmm0
divss  0xe78(%rip),%xmm0
addss  0xe74(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe38(%rip),%xmm0
jne    1180 <main+0x60>
jp     1180 <main+0x60>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [37 x i8] c"\0AEnter sales in dollars (-1 to end):\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [17 x i8] c"Salary is:$%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
br label %6
6: ; preds = %9, %0
%7 = load float, float* %2
%8 = fcmp une float %7, -1.000000e+00
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load float, float* %2
%11 = fmul float %10, 9.000000e+00
%12 = fdiv float %11, 1.000000e+02
%13 = fadd float %12, 2.000000e+02
store float %13, float* %3
%14 = load float, float* %3
%15 = fpext float %14 to double
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
br label %6
19: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"\0AEnter sales in dollars (-1 to end):\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [17 x i8] c"Salary is:$%.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fcmp une float %5, -1.000000e+00
br i1 %6, label %7, label %18
7: ; preds = %0, %7
%8 = phi float [ %16, %7 ], [ %5, %0 ]
%9 = fmul float %8, 9.000000e+00
%10 = fdiv float %9, 1.000000e+02
%11 = fadd float %10, 2.000000e+02
%12 = fpext float %11 to double
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %12)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%16 = load float, float* %1
%17 = fcmp une float %16, -1.000000e+00
br i1 %17, label %7, label %18
18: ; preds = %7, %0
ret i32 0
}