#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 */
double GetDouble();
int GetInt();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int age;
  int number_of_children;
  double salary;
  printf("Please input your age:\n");
  age = GetInt();
  printf("Please input how many children you have:\n");
  number_of_children = GetInt();
  printf("Please input your salary:\n");
  salary = GetDouble();
  if ((age <= 30) && (salary >= 30000)) {
    printf("You are a rich young person\n");
  } else {
    printf("You are not a rich young person\n");
  }
  if ((age <= 30) || (salary >= 30000)) {
    printf("You are either rich or young or both\n");
  } else {
    printf("You are neither rich nor young\n");
  }
  if ((age <= 30) && (salary >= 30000) && (number_of_children != 0)) {
    printf("You are a rich young parent\n");
  } else {
    printf("You are not a rich young parent\n");
  }
  printf("°´ÈÎÒâ¼ü¼ÌÐø¡­¡­");
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <GetInt@plt>
mov    %eax,-0x14(%rbp)
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <GetInt@plt>
mov    %eax,-0x18(%rbp)
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <GetDouble@plt>
movsd  %xmm0,-0x20(%rbp)
cmpl   $0x1e,-0x14(%rbp)
jg     11cc <main+0x8c>
movsd  -0x20(%rbp),%xmm0
movsd  0xe4f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11cc <main+0x8c>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    11d8 <main+0x98>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1e,-0x14(%rbp)
jle    11f9 <main+0xb9>
movsd  -0x20(%rbp),%xmm0
movsd  0xe11(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     120a <main+0xca>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1216 <main+0xd6>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1e,-0x14(%rbp)
jg     1252 <main+0x112>
movsd  -0x20(%rbp),%xmm0
movsd  0xdd3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1252 <main+0x112>
cmpl   $0x0,-0x18(%rbp)
je     1252 <main+0x112>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
jmp    125e <main+0x11e>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <GetInt@plt>
mov    %eax,%r14d
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <GetInt@plt>
mov    %eax,%ebp
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <GetDouble@plt>
ucomisd 0xe66(%rip),%xmm0
setae  %al
lea    0xf5a(%rip),%rcx
lea    0xef8(%rip),%rbx
cmovae %rcx,%rbx
cmp    $0x1f,%r14d
setl   %dl
lea    0xf66(%rip),%rsi
lea    0xebf(%rip),%rdi
cmovl  %rcx,%rbx
test   %ebp,%ebp
lea    0xf11(%rip),%rbp
lea    0xeea(%rip),%rcx
cmove  %rcx,%rbp
test   %al,%dl
cmovne %rsi,%rdi
cmove  %rcx,%rbp
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
lea    0xe06(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Please input your age:\0A\00"
@.str.1 = [42 x i8] c"Please input how many children you have:\0A\00"
@.str.2 = [27 x i8] c"Please input your salary:\0A\00"
@.str.3 = [29 x i8] c"You are a rich young person\0A\00"
@.str.4 = [33 x i8] c"You are not a rich young person\0A\00"
@.str.5 = [38 x i8] c"You are either rich or young or both\0A\00"
@.str.6 = [32 x i8] c"You are neither rich nor young\0A\00"
@.str.7 = [29 x i8] c"You are a rich young parent\0A\00"
@.str.8 = [33 x i8] c"You are not a rich young parent\0A\00"
@.str.9 = [33 x i8] c"\C2\B0\C2\B4\C3\88\C3\8E\C3\92\C3\A2\C2\BC\C3\BC\C2\BC\C3\8C\C3\90\C3\B8\C2\A1\C2\AD\C2\A1\C2\AD\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @GetInt()
store i32 %10, i32* %6
%11 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @GetInt()
store i32 %12, i32* %7
%13 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%14 = call double (...) @GetDouble()
store double %14, double* %8
%15 = load i32, i32* %6
%16 = icmp sle i32 %15, 30
br i1 %16, label %17, label %22
17: ; preds = %2
%18 = load double, double* %8
%19 = fcmp oge double %18, 3.000000e+04
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
br label %24
22: ; preds = %17, %2
%23 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
%25 = load i32, i32* %6
%26 = icmp sle i32 %25, 30
br i1 %26, label %30, label %27
27: ; preds = %24
%28 = load double, double* %8
%29 = fcmp oge double %28, 3.000000e+04
br i1 %29, label %30, label %32
30: ; preds = %27, %24
%31 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
br label %34
32: ; preds = %27
%33 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
%35 = load i32, i32* %6
%36 = icmp sle i32 %35, 30
br i1 %36, label %37, label %45
37: ; preds = %34
%38 = load double, double* %8
%39 = fcmp oge double %38, 3.000000e+04
br i1 %39, label %40, label %45
40: ; preds = %37
%41 = load i32, i32* %7
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
br label %47
45: ; preds = %40, %37, %34
%46 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
br label %47
47: ; preds = %45, %43
%48 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%49 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.9 = [33 x i8] c"\C2\B0\C2\B4\C3\88\C3\8E\C3\92\C3\A2\C2\BC\C3\BC\C2\BC\C3\8C\C3\90\C3\B8\C2\A1\C2\AD\C2\A1\C2\AD\00"
@str = [23 x i8] c"Please input your age:\00"
@str.10 = [41 x i8] c"Please input how many children you have:\00"
@str.11 = [26 x i8] c"Please input your salary:\00"
@str.12 = [32 x i8] c"You are not a rich young person\00"
@str.13 = [31 x i8] c"You are neither rich nor young\00"
@str.14 = [32 x i8] c"You are not a rich young parent\00"
@str.15 = [28 x i8] c"You are a rich young parent\00"
@str.16 = [37 x i8] c"You are either rich or young or both\00"
@str.17 = [28 x i8] c"You are a rich young person\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @GetInt()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.10, i64 0, i64 0))
%6 = tail call i32 (...) @GetInt()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.11, i64 0, i64 0))
%8 = tail call double (...) @GetDouble()
%9 = icmp slt i32 %4, 31
%10 = fcmp oge double %8, 3.000000e+04
%11 = select i1 %9, i1 %10, i1 false
%12 = select i1 %11, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.17, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.12, i64 0, i64 0)
%13 = tail call i32 @puts(i8* dereferenceable(1) %12)
%14 = select i1 %9, i1 true, i1 %10
%15 = select i1 %14, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @str.16, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @str.13, i64 0, i64 0)
%16 = tail call i32 @puts(i8* dereferenceable(1) %15)
%17 = icmp ne i32 %6, 0
%18 = select i1 %11, i1 %17, i1 false
%19 = select i1 %18, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.15, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.14, i64 0, i64 0)
%20 = tail call i32 @puts(i8* dereferenceable(1) %19)
%21 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%22 = tail call i32 (...) @getchar()
ret i32 0
}