#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 venda_bruta = 0.0, encargos = 0.0;
  printf("informe os valores: (-1 para terminar)\n");
  scanf("%f", &venda_bruta);
  if (venda_bruta != -1) {
    printf("O pagamento que voce recebeu é: %.2f\n",
           (venda_bruta * 0.09) + 200.00);
  }
  while (venda_bruta != -1) {
    printf("informe os valores: (-1 para terminar)\n");
    scanf("%f", &venda_bruta);
    if (venda_bruta != -1) {
      printf("O pagamento que voce recebeu é: %.2f\n",
             (venda_bruta * 0.09) + 200.00);
    }
  }
  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)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe96(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    117e <main+0x5e>
jp     117e <main+0x5e>
jmp    11ad <main+0x8d>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe79(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe75(%rip),%xmm1
addsd  %xmm1,%xmm0
lea    0xe9d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11b2 <main+0x92>
movss  -0x8(%rbp),%xmm0
movss  0xe41(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    11d3 <main+0xb3>
jp     11d3 <main+0xb3>
jmp    1246 <main+0x126>
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe58(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe02(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1212 <main+0xf2>
jp     1212 <main+0xf2>
jmp    1241 <main+0x121>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xde5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xde1(%rip),%xmm1
addsd  %xmm1,%xmm0
lea    0xe09(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11b2 <main+0x92>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xefb(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe96(%rip),%xmm0
jne    1172 <main+0x42>
jnp    1213 <main+0xe3>
cvtss2sd %xmm0,%xmm0
mulsd  0xe8a(%rip),%xmm0
addsd  0xe8a(%rip),%xmm0
lea    0xe8e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe5f(%rip),%xmm0
jne    11a5 <main+0x75>
jnp    1213 <main+0xe3>
lea    0xe96(%rip),%r14
lea    0xe65(%rip),%r15
lea    0x4(%rsp),%r12
lea    0xe5c(%rip),%rbx
nop
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe20(%rip),%xmm0
jne    11e4 <main+0xb4>
jnp    1213 <main+0xe3>
cvtss2sd %xmm0,%xmm0
mulsd  0xe18(%rip),%xmm0
addsd  0xe18(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xdf1(%rip),%xmm0
jne    11c0 <main+0x90>
jp     11c0 <main+0x90>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [40 x i8] c"informe os valores: (-1 para terminar)\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [39 x i8] c"O pagamento que voce recebeu \C3\A9: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 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)
%6 = load float, float* %2
%7 = fcmp une float %6, -1.000000e+00
br i1 %7, label %8, label %13
8: ; preds = %0
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = call double @llvm.fmuladd.f64(double %10, double 0x3FB70A3D70A3D70A, double 2.000000e+02)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), double %11)
br label %13
13: ; preds = %8, %0
br label %14
14: ; preds = %27, %13
%15 = load float, float* %2
%16 = fcmp une float %15, -1.000000e+00
br i1 %16, label %17, label %28
17: ; preds = %14
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%20 = load float, float* %2
%21 = fcmp une float %20, -1.000000e+00
br i1 %21, label %22, label %27
22: ; preds = %17
%23 = load float, float* %2
%24 = fpext float %23 to double
%25 = call double @llvm.fmuladd.f64(double %24, double 0x3FB70A3D70A3D70A, double 2.000000e+02)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), double %25)
br label %27
27: ; preds = %22, %17
br label %14
28: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [39 x i8] c"O pagamento que voce recebeu \C3\A9: %.2f\0A\00"
@str.3 = [39 x i8] c"informe os valores: (-1 para terminar)\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.3, 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 %24
7: ; preds = %0
%8 = fpext float %5 to double
%9 = call double @llvm.fmuladd.f64(double %8, double 0x3FB70A3D70A3D70A, double 2.000000e+02)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), double %9)
%11 = load float, float* %1
%12 = fcmp une float %11, -1.000000e+00
br i1 %12, label %13, label %24
13: ; preds = %7, %18
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.3, 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 %18, label %24
18: ; preds = %13
%19 = fpext float %16 to double
%20 = call double @llvm.fmuladd.f64(double %19, double 0x3FB70A3D70A3D70A, double 2.000000e+02)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), double %20)
%22 = load float, float* %1
%23 = fcmp une float %22, -1.000000e+00
br i1 %23, label %13, label %24
24: ; preds = %13, %18, %0, %7
ret i32 0
}