#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 relation, gender, age, rate;
  rate = 100.00;
  printf("is the customer married (1=married, 0=unmarried)? \n");
  scanf("%f", &relation);
  printf("is the customer male or female (1=female, 0=male? \n");
  scanf("%f", &gender);
  printf("What is the customer's age? \n");
  scanf("%f", &age);
  if (relation > 0) {
    rate -= 10;
  }
  if (gender == 0) {
    if (age < 25)
      rate *= 2;
    if (age > 25)
      rate *= 1.5;
  } else {
    if (age < 25)
      rate *= 1.5;
  }
  printf("The daily rate for the customer is:$%.2f", rate);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xf04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    11bd <main+0x9d>
movss  -0x14(%rbp),%xmm0
movss  0xe50(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1231 <main+0x111>
jp     1231 <main+0x111>
movss  0xe2c(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    11f8 <main+0xd8>
movss  0xe1e(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xe03(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    122c <main+0x10c>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdf1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1266 <main+0x146>
movss  0xdcf(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1261 <main+0x141>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdbc(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1266 <main+0x146>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe2b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf13(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf2d(%rip),%rdi
call   1030 <puts@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
lea    0xe61(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
movss  0x8(%rsp),%xmm2
ucomiss %xmm1,%xmm2
movss  0x4(%rsp),%xmm1
jne    11ec <main+0xbc>
jp     11ec <main+0xbc>
movaps %xmm0,%xmm3
addss  %xmm0,%xmm3
movss  0xe42(%rip),%xmm4
movaps %xmm1,%xmm2
cmpltss %xmm4,%xmm2
andps  %xmm2,%xmm3
andnps %xmm0,%xmm2
orps   %xmm3,%xmm2
ucomiss %xmm4,%xmm1
movaps %xmm2,%xmm0
jbe    1201 <main+0xd1>
mulss  0xe25(%rip),%xmm2
movaps %xmm2,%xmm0
jmp    1201 <main+0xd1>
movss  0xe14(%rip),%xmm2
ucomiss %xmm1,%xmm2
jbe    1201 <main+0xd1>
mulss  0xe0b(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe07(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"is the customer married (1=married, 0=unmarried)? \0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [52 x i8] c"is the customer male or female (1=female, 0=male? \0A\00"
@.str.3 = [30 x i8] c"What is the customer's age? \0A\00"
@.str.4 = [41 x i8] c"The daily rate for the customer is:$%.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store float 1.000000e+02, float* %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 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), float* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%12 = load float, float* %2
%13 = fcmp ogt float %12, 0.000000e+00
br i1 %13, label %14, label %17
14: ; preds = %0
%15 = load float, float* %5
%16 = fsub float %15, 1.000000e+01
store float %16, float* %5
br label %17
17: ; preds = %14, %0
%18 = load float, float* %3
%19 = fcmp oeq float %18, 0.000000e+00
br i1 %19, label %20, label %35
20: ; preds = %17
%21 = load float, float* %4
%22 = fcmp olt float %21, 2.500000e+01
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load float, float* %5
%25 = fmul float %24, 2.000000e+00
store float %25, float* %5
br label %26
26: ; preds = %23, %20
%27 = load float, float* %4
%28 = fcmp ogt float %27, 2.500000e+01
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load float, float* %5
%31 = fpext float %30 to double
%32 = fmul double %31, 1.500000e+00
%33 = fptrunc double %32 to float
store float %33, float* %5
br label %34
34: ; preds = %29, %26
br label %44
35: ; preds = %17
%36 = load float, float* %4
%37 = fcmp olt float %36, 2.500000e+01
br i1 %37, label %38, label %43
38: ; preds = %35
%39 = load float, float* %5
%40 = fpext float %39 to double
%41 = fmul double %40, 1.500000e+00
%42 = fptrunc double %41 to float
store float %42, float* %5
br label %43
43: ; preds = %38, %35
br label %44
44: ; preds = %43, %34
%45 = load float, float* %5
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), double %46)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.4 = [41 x i8] c"The daily rate for the customer is:$%.2f\00"
@str = [51 x i8] c"is the customer married (1=married, 0=unmarried)? \00"
@str.5 = [51 x i8] c"is the customer male or female (1=female, 0=male? \00"
@str.6 = [29 x i8] c"What is the customer's age? \00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.5, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.6, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%13 = load float, float* %1
%14 = fcmp ogt float %13, 0.000000e+00
%15 = select i1 %14, float 9.000000e+01, float 1.000000e+02
%16 = load float, float* %2
%17 = fcmp oeq float %16, 0.000000e+00
%18 = load float, float* %3
%19 = fcmp olt float %18, 2.500000e+01
br i1 %17, label %20, label %26
20: ; preds = %0
%21 = fmul float %15, 2.000000e+00
%22 = select i1 %19, float %21, float %15
%23 = fcmp ogt float %18, 2.500000e+01
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = fmul float %22, 1.500000e+00
br label %29
26: ; preds = %0
br i1 %19, label %27, label %29
27: ; preds = %26
%28 = fmul float %15, 1.500000e+00
br label %29
29: ; preds = %26, %27, %20, %24
%30 = phi float [ %25, %24 ], [ %22, %20 ], [ %28, %27 ], [ %15, %26 ]
%31 = fpext float %30 to double
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), double %31)
ret i32 0
}