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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4c(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2e(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    11bd <main+0x9d>
jmp    11c6 <main+0xa6>
mov    -0x14(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    11ed <main+0xcd>
jmp    1205 <main+0xe5>
cmpl   $0x19,-0x10(%rbp)
jge    1205 <main+0xe5>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1284 <main+0x164>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    121b <main+0xfb>
jmp    1242 <main+0x122>
cmpl   $0x19,-0x10(%rbp)
jle    1242 <main+0x122>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xdce(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
jmp    127f <main+0x15f>
movl   $0x1,-0xc(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1258 <main+0x138>
jmp    127a <main+0x15a>
cmpl   $0x19,-0x10(%rbp)
jge    127a <main+0x15a>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xd91(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
jmp    127f <main+0x15f>
jmp    1284 <main+0x164>
mov    -0x14(%rbp),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%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    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xee4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf0d(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movl   $0x1,0xc(%rsp)
mov    (%rsp),%esi
add    $0xfffffff6,%esi
mov    %esi,(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x1,0x8(%rsp)
cmpl   $0x18,0x4(%rsp)
mov    (%rsp),%esi
jg     11de <main+0xae>
cvtsi2sd %esi,%xmm0
mulsd  0xe29(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %esi,(%rsp)
lea    0xe23(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Is the customer married?\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [56 x i8] c"Is the customer male or female (1 = female, 0 = male?\0A\00"
@.str.3 = [29 x i8] c"What is the customer's age?\0A\00"
@.str.4 = [19 x i8] c"What is the rate?\0A\00"
@.str.5 = [39 x i8] c"The daily rate for the customer is: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 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* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 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), i32* %3)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 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), i32* %4)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
store i32 1, i32* %2
br i1 true, label %14, label %17
14: ; preds = %0
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 10
store i32 %16, i32* %5
br label %17
17: ; preds = %14, %0
%18 = load i32, i32* %5
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %18)
store i32 0, i32* %3
br i1 false, label %20, label %26
20: ; preds = %17
%21 = load i32, i32* %4
%22 = icmp slt i32 %21, 25
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %5
%25 = mul nsw i32 %24, 2
store i32 %25, i32* %5
br label %46
26: ; preds = %20, %17
store i32 0, i32* %3
br i1 false, label %27, label %35
27: ; preds = %26
%28 = load i32, i32* %4
%29 = icmp sgt i32 %28, 25
br i1 %29, label %30, label %35
30: ; preds = %27
%31 = load i32, i32* %5
%32 = sitofp i32 %31 to double
%33 = fmul double %32, 1.500000e+00
%34 = fptosi double %33 to i32
store i32 %34, i32* %5
br label %45
35: ; preds = %27, %26
store i32 1, i32* %3
br i1 true, label %36, label %44
36: ; preds = %35
%37 = load i32, i32* %4
%38 = icmp slt i32 %37, 25
br i1 %38, label %39, label %44
39: ; preds = %36
%40 = load i32, i32* %5
%41 = sitofp i32 %40 to double
%42 = fmul double %41, 1.500000e+00
%43 = fptosi double %42 to i32
store i32 %43, i32* %5
br label %44
44: ; preds = %39, %36, %35
br label %45
45: ; preds = %44, %30
br label %46
46: ; preds = %45, %23
%47 = load i32, i32* %5
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %47)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.5 = [39 x i8] c"The daily rate for the customer is: %d\00"
@str = [25 x i8] c"Is the customer married?\00"
@str.6 = [55 x i8] c"Is the customer male or female (1 = female, 0 = male?\00"
@str.7 = [28 x i8] c"What is the customer's age?\00"
@str.8 = [18 x i8] c"What is the rate?\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 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), i32* %2)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.7, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.8, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
store i32 1, i32* %1
%17 = load i32, i32* %4
%18 = add nsw i32 %17, -10
store i32 %18, i32* %4
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %18)
store i32 1, i32* %2
%20 = load i32, i32* %3
%21 = icmp slt i32 %20, 25
%22 = load i32, i32* %4
br i1 %21, label %23, label %27
23: ; preds = %0
%24 = sitofp i32 %22 to double
%25 = fmul double %24, 1.500000e+00
%26 = fptosi double %25 to i32
store i32 %26, i32* %4
br label %27
27: ; preds = %0, %23
%28 = phi i32 [ %26, %23 ], [ %22, %0 ]
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %28)
ret i32 0
}