#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 get_year(float);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  float a, b, max;
  int N, i;
  int c[10];
  printf("请输入个数N\n");
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%f%f", &a, &b);
    max = a > b ? a : b;
    c[i] = get_year(max);
  }
  for (i = 0; i < N; i++) {
    printf("Property %d:This property will begin eroding in year %d.\n", i + 1,
           c[i]);
  }
  printf("END OF OUTPUT.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11dc <main+0xac>
lea    0xe9c(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    11a6 <main+0x76>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
jmp    11b0 <main+0x80>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
call   1040 <get_year@plt>
mov    %eax,%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1166 <main+0x36>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1219 <main+0xe9>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
movslq -0x18(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%edx
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11e3 <main+0xb3>
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
lea    0xea2(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11ee <main+0xae>
lea    0xe8b(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
maxss  0x8(%rsp),%xmm0
call   1050 <get_year@plt>
mov    %eax,0x10(%rsp,%rbx,4)
add    $0x1,%rbx
movslq 0x4(%rsp),%rax
cmp    %rax,%rbx
jl     1190 <main+0x50>
test   %eax,%eax
jle    11ee <main+0xae>
lea    0xe3a(%rip),%r14
xor    %ebx,%ebx
mov    0x10(%rsp,%rbx,4),%edx
add    $0x1,%rbx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0x4(%rsp),%rax
cmp    %rax,%rbx
jl     11d0 <main+0x90>
lea    0xe5e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [18 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\AA\E6\95\B0N\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%f%f\00"
@.str.3 = [58 x i8] c"Property %d:This property will begin eroding in year %d.\0A\00"
@.str.4 = [16 x i8] c"END OF OUTPUT.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
%7 = alloca [10 x i32]
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
store i32 0, i32* %6
br label %10
10: ; preds = %30, %0
%11 = load i32, i32* %6
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %33
14: ; preds = %10
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), float* %2, float* %3)
%16 = load float, float* %2
%17 = load float, float* %3
%18 = fcmp ogt float %16, %17
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = load float, float* %2
br label %23
21: ; preds = %14
%22 = load float, float* %3
br label %23
23: ; preds = %21, %19
%24 = phi float [ %20, %19 ], [ %22, %21 ]
store float %24, float* %4
%25 = load float, float* %4
%26 = call i32 @get_year(float %25)
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %28
store i32 %26, i32* %29
br label %30
30: ; preds = %23
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %10
33: ; preds = %10
store i32 0, i32* %6
br label %34
34: ; preds = %46, %33
%35 = load i32, i32* %6
%36 = load i32, i32* %5
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %49
38: ; preds = %34
%39 = load i32, i32* %6
%40 = add nsw i32 %39, 1
%41 = load i32, i32* %6
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %42
%44 = load i32, i32* %43
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0), i32 %40, i32 %44)
br label %46
46: ; preds = %38
%47 = load i32, i32* %6
%48 = add nsw i32 %47, 1
store i32 %48, i32* %6
br label %34
49: ; preds = %34
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%f%f\00"
@.str.3 = [58 x i8] c"Property %d:This property will begin eroding in year %d.\0A\00"
@str = [17 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\AA\E6\95\B0N\00"
@str.5 = [15 x i8] c"END OF OUTPUT.\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca i32
%4 = alloca [10 x i32]
%5 = bitcast float* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast [10 x i32]* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 0
br i1 %12, label %15, label %38
13: ; preds = %15
%14 = icmp sgt i32 %25, 0
br i1 %14, label %28, label %38
15: ; preds = %0, %15
%16 = phi i64 [ %24, %15 ], [ 0, %0 ]
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), float* %1, float* %2)
%18 = load float, float* %1
%19 = load float, float* %2
%20 = fcmp ogt float %18, %19
%21 = select i1 %20, float %18, float %19
%22 = call i32 @get_year(float %21)
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 %16
store i32 %22, i32* %23
%24 = add nuw nsw i64 %16, 1
%25 = load i32, i32* %3
%26 = sext i32 %25 to i64
%27 = icmp slt i64 %24, %26
br i1 %27, label %15, label %13
28: ; preds = %13, %28
%29 = phi i64 [ %30, %28 ], [ 0, %13 ]
%30 = add nuw nsw i64 %29, 1
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 %29
%32 = load i32, i32* %31
%33 = trunc i64 %30 to i32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.3, i64 0, i64 0), i32 %33, i32 %32)
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = icmp slt i64 %30, %36
br i1 %37, label %28, label %38
38: ; preds = %28, %0, %13
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}