#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 *);
void main() {
  float salario;
  printf("Digite o salario em reais, usando ponto ao inves de virgula: ");
  scanf("%f", &salario);
  printf("\nSalario original: R$ %.2f\n", salario);
  if (salario < 10000)
    salario += 1000;
  printf("Salario final: R$ %.2f\n", salario);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xef3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xe9b(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1181 <main+0x61>
movss  0xe8d(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xed4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xef8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
movss  0xe9a(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    1179 <main+0x59>
addss  0xe91(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xee1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [62 x i8] c"Digite o salario em reais, usando ponto ao inves de virgula: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"\0ASalario original: R$ %.2f\0A\00"
@.str.3 = [24 x i8] c"Salario final: R$ %.2f\0A\00"
define void @main() {
%1 = alloca float
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %5)
%7 = load float, float* %1
%8 = fcmp olt float %7, 1.000000e+04
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load float, float* %1
%11 = fadd float %10, 1.000000e+03
store float %11, float* %1
br label %12
12: ; preds = %9, %0
%13 = load float, float* %1
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), double %14)
ret void
}

LLVM IR (-O2):
@.str = [62 x i8] c"Digite o salario em reais, usando ponto ao inves de virgula: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"\0ASalario original: R$ %.2f\0A\00"
@.str.3 = [24 x i8] c"Salario final: R$ %.2f\0A\00"
define void @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 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 = fpext float %5 to double
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %6)
%8 = load float, float* %1
%9 = fcmp olt float %8, 1.000000e+04
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = fadd float %8, 1.000000e+03
store float %11, float* %1
br label %12
12: ; preds = %10, %0
%13 = phi float [ %11, %10 ], [ %8, %0 ]
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), double %14)
ret void
}