#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 *);
int main() {
  int marriage;
  int sex;
  int age;
  float rate = 100.00;
  printf("Is the customer married (1=married, 0=unmarried)? ");
  scanf(" %d", &marriage);
  printf("\nIs the customer male or female (1=female, 0=male)? ");
  scanf(" %d", &sex);
  printf("\nWhat is the customer's age? ");
  scanf(" %d", &age);
  if (marriage == 1 && sex == 0 && age < 25) {
    rate -= 10;
    rate *= 2;
  } else if (marriage == 0 && sex == 0 && age < 25)
    rate *= 2;
  else if (marriage == 1 && sex == 0 && age >= 25) {
    rate -= 10;
    rate *= 1.5;
  } else if (marriage == 0 && sex == 0 && age >= 25)
    rate *= 1.5;
  else if (marriage == 1 && sex == 1) {
    rate -= 10;
    rate *= 1.5;
  } else
    rate *= 1.5;
  printf("\nThe 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    0xefa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    11e1 <main+0xc1>
cmpl   $0x0,-0xc(%rbp)
jne    11e1 <main+0xc1>
cmpl   $0x19,-0x10(%rbp)
jge    11e1 <main+0xc1>
movss  -0x14(%rbp),%xmm0
movss  0xe43(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe36(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    132d <main+0x20d>
cmpl   $0x0,-0x8(%rbp)
jne    1216 <main+0xf6>
cmpl   $0x0,-0xc(%rbp)
jne    1216 <main+0xf6>
cmpl   $0x19,-0x10(%rbp)
jge    1216 <main+0xf6>
movss  0xe01(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1328 <main+0x208>
cmpl   $0x1,-0x8(%rbp)
jne    126d <main+0x14d>
cmpl   $0x0,-0xc(%rbp)
jne    126d <main+0x14d>
cmpl   $0x19,-0x10(%rbp)
jl     126d <main+0x14d>
movss  -0x14(%rbp),%xmm0
movss  0xdc3(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdb5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1323 <main+0x203>
cmpl   $0x0,-0x8(%rbp)
jne    12ae <main+0x18e>
cmpl   $0x0,-0xc(%rbp)
jne    12ae <main+0x18e>
cmpl   $0x19,-0x10(%rbp)
jl     12ae <main+0x18e>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd74(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    131e <main+0x1fe>
cmpl   $0x1,-0x8(%rbp)
jne    12fb <main+0x1db>
cmpl   $0x1,-0xc(%rbp)
jne    12fb <main+0x1db>
movss  -0x14(%rbp),%xmm0
movss  0xd35(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd27(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1319 <main+0x1f9>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd04(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    131e <main+0x1fe>
jmp    1323 <main+0x203>
jmp    1328 <main+0x208>
jmp    132d <main+0x20d>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd65(%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    0xf04(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf29(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xf19(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xf33(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
mov    %esi,%eax
xor    $0x1,%eax
mov    0x8(%rsp),%ecx
mov    %eax,%edx
or     %ecx,%edx
sete   %dil
mov    0x4(%rsp),%edx
jne    11a7 <main+0x87>
cmp    $0x19,%edx
jge    11a7 <main+0x87>
movsd  0xe5b(%rip),%xmm0
jmp    11fe <main+0xde>
or     %ecx,%esi
sete   %sil
jne    11be <main+0x9e>
cmp    $0x19,%edx
jge    11be <main+0x9e>
movsd  0xe4c(%rip),%xmm0
jmp    11fe <main+0xde>
cmp    $0x19,%edx
setge  %bl
test   %bl,%dil
je     11d3 <main+0xb3>
movsd  0xe3f(%rip),%xmm0
jmp    11fe <main+0xde>
cmp    $0x19,%edx
setge  %dl
test   %dl,%sil
je     11e8 <main+0xc8>
movsd  0xe32(%rip),%xmm0
jmp    11fe <main+0xde>
xor    $0x1,%ecx
xor    %edx,%edx
or     %ecx,%eax
sete   %dl
lea    0xe27(%rip),%rax
movsd  (%rax,%rdx,8),%xmm0
lea    0xeb5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"Is the customer married (1=married, 0=unmarried)? \00"
@.str.1 = [4 x i8] c" %d\00"
@.str.2 = [53 x i8] c"\0AIs the customer male or female (1=female, 0=male)? \00"
@.str.3 = [30 x i8] c"\0AWhat is the customer's age? \00"
@.str.4 = [43 x i8] c"\0AThe daily rate for the customer is: $%.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 0, i32* %1
store float 1.000000e+02, float* %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %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 ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %25
14: ; preds = %0
%15 = load i32, i32* %3
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %14
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 25
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load float, float* %5
%22 = fsub float %21, 1.000000e+01
store float %22, float* %5
%23 = load float, float* %5
%24 = fmul float %23, 2.000000e+00
store float %24, float* %5
br label %89
25: ; preds = %17, %14, %0
%26 = load i32, i32* %2
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %37
28: ; preds = %25
%29 = load i32, i32* %3
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %37
31: ; preds = %28
%32 = load i32, i32* %4
%33 = icmp slt i32 %32, 25
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load float, float* %5
%36 = fmul float %35, 2.000000e+00
store float %36, float* %5
br label %88
37: ; preds = %31, %28, %25
%38 = load i32, i32* %2
%39 = icmp eq i32 %38, 1
br i1 %39, label %40, label %53
40: ; preds = %37
%41 = load i32, i32* %3
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %53
43: ; preds = %40
%44 = load i32, i32* %4
%45 = icmp sge i32 %44, 25
br i1 %45, label %46, label %53
46: ; preds = %43
%47 = load float, float* %5
%48 = fsub float %47, 1.000000e+01
store float %48, float* %5
%49 = load float, float* %5
%50 = fpext float %49 to double
%51 = fmul double %50, 1.500000e+00
%52 = fptrunc double %51 to float
store float %52, float* %5
br label %87
53: ; preds = %43, %40, %37
%54 = load i32, i32* %2
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %67
56: ; preds = %53
%57 = load i32, i32* %3
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %67
59: ; preds = %56
%60 = load i32, i32* %4
%61 = icmp sge i32 %60, 25
br i1 %61, label %62, label %67
62: ; preds = %59
%63 = load float, float* %5
%64 = fpext float %63 to double
%65 = fmul double %64, 1.500000e+00
%66 = fptrunc double %65 to float
store float %66, float* %5
br label %86
67: ; preds = %59, %56, %53
%68 = load i32, i32* %2
%69 = icmp eq i32 %68, 1
br i1 %69, label %70, label %80
70: ; preds = %67
%71 = load i32, i32* %3
%72 = icmp eq i32 %71, 1
br i1 %72, label %73, label %80
73: ; preds = %70
%74 = load float, float* %5
%75 = fsub float %74, 1.000000e+01
store float %75, float* %5
%76 = load float, float* %5
%77 = fpext float %76 to double
%78 = fmul double %77, 1.500000e+00
%79 = fptrunc double %78 to float
store float %79, float* %5
br label %85
80: ; preds = %70, %67
%81 = load float, float* %5
%82 = fpext float %81 to double
%83 = fmul double %82, 1.500000e+00
%84 = fptrunc double %83 to float
store float %84, float* %5
br label %85
85: ; preds = %80, %73
br label %86
86: ; preds = %85, %62
br label %87
87: ; preds = %86, %46
br label %88
88: ; preds = %87, %34
br label %89
89: ; preds = %88, %20
%90 = load float, float* %5
%91 = fpext float %90 to double
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), double %91)
ret i32 0
}

LLVM IR (-O2):
@.str = [51 x i8] c"Is the customer married (1=married, 0=unmarried)? \00"
@.str.1 = [4 x i8] c" %d\00"
@.str.2 = [53 x i8] c"\0AIs the customer male or female (1=female, 0=male)? \00"
@.str.3 = [30 x i8] c"\0AWhat is the customer's age? \00"
@.str.4 = [43 x i8] c"\0AThe daily rate for the customer is: $%.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %1
%14 = icmp eq i32 %13, 1
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 0
%17 = select i1 %14, i1 %16, i1 false
%18 = load i32, i32* %3
%19 = icmp slt i32 %18, 25
%20 = select i1 %17, i1 %19, i1 false
br i1 %20, label %34, label %21
21: ; preds = %0
%22 = icmp eq i32 %13, 0
%23 = select i1 %22, i1 %16, i1 false
%24 = select i1 %23, i1 %19, i1 false
br i1 %24, label %34, label %25
25: ; preds = %21
%26 = icmp sgt i32 %18, 24
%27 = select i1 %17, i1 %26, i1 false
br i1 %27, label %34, label %28
28: ; preds = %25
%29 = select i1 %23, i1 %26, i1 false
br i1 %29, label %34, label %30
30: ; preds = %28
%31 = icmp eq i32 %15, 1
%32 = select i1 %14, i1 %31, i1 false
%33 = select i1 %32, double 1.350000e+02, double 1.500000e+02
br label %34
34: ; preds = %30, %28, %25, %21, %0
%35 = phi double [ 1.800000e+02, %0 ], [ 2.000000e+02, %21 ], [ 1.350000e+02, %25 ], [ 1.500000e+02, %28 ], [ %33, %30 ]
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), double %35)
ret i32 0
}