#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 *, int *);
void main() {
  float TARIFA1 = 70.5;
  float TARIFA2 = 50.5;
  int MIN_PARA_TARIFA = 8;
  int personas;
  float total;
  printf("Numero de personas que entraran al cine:\n");
  scanf("%d", &personas);
  if (personas >= MIN_PARA_TARIFA)
    total = TARIFA2 * personas;
  else
    total = TARIFA1 * personas;
  printf("La cantidad que debe pagar es: $ %.2f \n", total);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0xed4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xec3(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     118b <main+0x6b>
movss  -0x8(%rbp),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    119e <main+0x7e>
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe87(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xefb(%rip),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
xor    %ecx,%ecx
cmp    $0x8,%eax
setge  %cl
cvtsi2ss %eax,%xmm0
lea    0xe9b(%rip),%rax
mulss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe96(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Numero de personas que entraran al cine:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [40 x i8] c"La cantidad que debe pagar es: $ %.2f \0A\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store float 7.050000e+01, float* %1
store float 5.050000e+01, float* %2
store i32 8, i32* %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %0
%12 = load float, float* %2
%13 = load i32, i32* %4
%14 = sitofp i32 %13 to float
%15 = fmul float %12, %14
store float %15, float* %5
br label %21
16: ; preds = %0
%17 = load float, float* %1
%18 = load i32, i32* %4
%19 = sitofp i32 %18 to float
%20 = fmul float %17, %19
store float %20, float* %5
br label %21
21: ; preds = %16, %11
%22 = load float, float* %5
%23 = fpext float %22 to double
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), double %23)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [40 x i8] c"La cantidad que debe pagar es: $ %.2f \0A\00"
@str = [41 x i8] c"Numero de personas que entraran al cine:\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 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), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 7
%7 = sitofp i32 %5 to float
%8 = select i1 %6, float 5.050000e+01, float 7.050000e+01
%9 = fmul float %8, %7
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), double %10)
ret void
}