#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 peso;
  printf("Digite quantos quilos você coletou:\n");
  scanf("%f", &peso);
  printf("=================================================\n");
  printf("Você coletou: %f Kg.\n", peso);
  if (peso > 50)
    printf("A multa a ser paga, será de: R$%f\n", (peso - 50) * 4.0);
  else
    printf("Não será necessário pagar multa!\n");
}


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    0xef2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf01(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe81(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11bc <main+0x9c>
movss  -0x8(%rbp),%xmm0
movss  0xe6b(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe63(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xed3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11ca <main+0xaa>
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xe81(%rip),%xmm0
jbe    11a5 <main+0x75>
addss  0xe7b(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe73(%rip),%xmm0
lea    0xe8e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    11b1 <main+0x81>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Digite quantos quilos voc\C3\AA coletou:\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [51 x i8] c"=================================================\0A\00"
@.str.3 = [23 x i8] c"Voc\C3\AA coletou: %f Kg.\0A\00"
@.str.4 = [36 x i8] c"A multa a ser paga, ser\C3\A1 de: R$%f\0A\00"
@.str.5 = [37 x i8] c"N\C3\A3o ser\C3\A1 necess\C3\A1rio pagar multa!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 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* %2)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %7)
%9 = load float, float* %2
%10 = fcmp ogt float %9, 5.000000e+01
br i1 %10, label %11, label %17
11: ; preds = %0
%12 = load float, float* %2
%13 = fsub float %12, 5.000000e+01
%14 = fpext float %13 to double
%15 = fmul double %14, 4.000000e+00
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), double %15)
br label %19
17: ; preds = %0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0))
br label %19
19: ; preds = %17, %11
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [23 x i8] c"Voc\C3\AA coletou: %f Kg.\0A\00"
@.str.4 = [36 x i8] c"A multa a ser paga, ser\C3\A1 de: R$%f\0A\00"
@str = [37 x i8] c"Digite quantos quilos voc\C3\AA coletou:\00"
@str.6 = [50 x i8] c"=================================================\00"
@str.7 = [36 x i8] c"N\C3\A3o ser\C3\A1 necess\C3\A1rio pagar multa!\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(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 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.6, i64 0, i64 0))
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %7)
%9 = load float, float* %1
%10 = fcmp ogt float %9, 5.000000e+01
br i1 %10, label %11, label %16
11: ; preds = %0
%12 = fadd float %9, -5.000000e+01
%13 = fpext float %12 to double
%14 = fmul double %13, 4.000000e+00
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), double %14)
br label %18
16: ; preds = %0
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.7, i64 0, i64 0))
br label %18
18: ; preds = %16, %11
ret i32 0
}