#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 CompareDates(int, int);
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, int *, int *, int *, double *);
int main() {
  int in[500][3] = {{0, 0, 0}}, i, count, N, date[500] = {0}, temp;
  double rate[500] = {0}, temp2;
  for (i = 0;
       scanf("%d-%d-%d %lf", &in[i][0], &in[i][1], &in[i][2], &rate[i]) != EOF;
       i++) {
    date[i] = in[i][0] * 10000 + in[i][1] * 100 + in[i][2];
  }
  N = i;
  for (count = 0; count < N; count++) {
    for (i = N; i != 1; i--) {
      if (CompareDates(date[i - 1], date[i - 2]) == 1) {
        temp = date[i - 1];
        date[i - 1] = date[i - 2];
        date[i - 2] = temp;
        temp2 = rate[i - 1];
        rate[i - 1] = rate[i - 2];
        rate[i - 2] = temp2;
      }
      if (CompareDates(date[i - 1], date[i - 2]) == 0) {
        if (rate[i - 1] < rate[i - 2]) {
          temp = date[i - 1];
          date[i - 1] = date[i - 2];
          date[i - 2] = temp;
          temp2 = rate[i - 1];
          rate[i - 1] = rate[i - 2];
          rate[i - 2] = temp2;
        }
      }
    }
  }
  for (count = 0; count < N; count++) {
    printf("%lf\n", rate[count]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1780(%rbp),%rdi
xor    %esi,%esi
mov    $0x1770,%edx
call   1040 <memset@plt>
lea    -0x1f60(%rbp),%rdi
xor    %esi,%esi
mov    $0x7d0,%edx
call   1040 <memset@plt>
lea    -0x2f10(%rbp),%rdi
xor    %esi,%esi
mov    $0xfa0,%edx
call   1040 <memset@plt>
movl   $0x0,-0x1784(%rbp)
movslq -0x1784(%rbp),%rax
lea    -0x1780(%rbp),%rsi
imul   $0xc,%rax,%rax
add    %rax,%rsi
movslq -0x1784(%rbp),%rax
lea    -0x1780(%rbp),%rdx
imul   $0xc,%rax,%rax
add    %rax,%rdx
add    $0x4,%rdx
movslq -0x1784(%rbp),%rax
lea    -0x1780(%rbp),%rcx
imul   $0xc,%rax,%rax
add    %rax,%rcx
add    $0x8,%rcx
movslq -0x1784(%rbp),%rax
lea    -0x2f10(%rbp),%r8
shl    $0x3,%rax
add    %rax,%r8
lea    0xe08(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2de4(%rip),%rcx
cmp    (%rcx),%rax
je     127d <main+0x13d>
movslq -0x1784(%rbp),%rcx
lea    -0x1780(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
imul   $0x2710,(%rax),%ecx
movslq -0x1784(%rbp),%rdx
lea    -0x1780(%rbp),%rax
imul   $0xc,%rdx,%rdx
add    %rdx,%rax
imul   $0x64,0x4(%rax),%eax
add    %eax,%ecx
movslq -0x1784(%rbp),%rdx
lea    -0x1780(%rbp),%rax
imul   $0xc,%rdx,%rdx
add    %rdx,%rax
add    0x8(%rax),%ecx
movslq -0x1784(%rbp),%rax
mov    %ecx,-0x1f60(%rbp,%rax,4)
mov    -0x1784(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1784(%rbp)
jmp    1195 <main+0x55>
mov    -0x1784(%rbp),%eax
mov    %eax,-0x178c(%rbp)
movl   $0x0,-0x1788(%rbp)
mov    -0x1788(%rbp),%eax
cmp    -0x178c(%rbp),%eax
jge    14f3 <main+0x3b3>
mov    -0x178c(%rbp),%eax
mov    %eax,-0x1784(%rbp)
cmpl   $0x1,-0x1784(%rbp)
je     14da <main+0x39a>
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x1f60(%rbp,%rax,4),%edi
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
mov    -0x1f60(%rbp,%rax,4),%esi
call   1060 <CompareDates@plt>
cmp    $0x1,%eax
jne    13a4 <main+0x264>
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x1f60(%rbp,%rax,4),%eax
mov    %eax,-0x1f64(%rbp)
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
mov    -0x1f60(%rbp,%rax,4),%ecx
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %ecx,-0x1f60(%rbp,%rax,4)
mov    -0x1f64(%rbp),%ecx
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
mov    %ecx,-0x1f60(%rbp,%rax,4)
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x2f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2f18(%rbp)
ff
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
movsd  -0x2f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  %xmm0,-0x2f10(%rbp,%rax,8)
ff ff
movsd  -0x2f18(%rbp),%xmm0
ff
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
movsd  %xmm0,-0x2f10(%rbp,%rax,8)
ff ff
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x1f60(%rbp,%rax,4),%edi
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
mov    -0x1f60(%rbp,%rax,4),%esi
call   1060 <CompareDates@plt>
cmp    $0x0,%eax
jne    14c1 <main+0x381>
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x2f10(%rbp,%rax,8),%xmm1
ff ff
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
movsd  -0x2f10(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    14bc <main+0x37c>
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x1f60(%rbp,%rax,4),%eax
mov    %eax,-0x1f64(%rbp)
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
mov    -0x1f60(%rbp,%rax,4),%ecx
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %ecx,-0x1f60(%rbp,%rax,4)
mov    -0x1f64(%rbp),%ecx
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
mov    %ecx,-0x1f60(%rbp,%rax,4)
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x2f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2f18(%rbp)
ff
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
movsd  -0x2f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x1784(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  %xmm0,-0x2f10(%rbp,%rax,8)
ff ff
movsd  -0x2f18(%rbp),%xmm0
ff
mov    -0x1784(%rbp),%eax
sub    $0x2,%eax
cltq
movsd  %xmm0,-0x2f10(%rbp,%rax,8)
ff ff
jmp    14c1 <main+0x381>
jmp    14c6 <main+0x386>
mov    -0x1784(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1784(%rbp)
jmp    12b1 <main+0x171>
jmp    14df <main+0x39f>
mov    -0x1788(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1788(%rbp)
jmp    1293 <main+0x153>
movl   $0x0,-0x1788(%rbp)
mov    -0x1788(%rbp),%eax
cmp    -0x178c(%rbp),%eax
jge    153f <main+0x3ff>
movslq -0x1788(%rbp),%rax
movsd  -0x2f10(%rbp,%rax,8),%xmm0
ff ff
lea    0xae7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1788(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1788(%rbp)
jmp    14fd <main+0x3bd>
xor    %eax,%eax
add    $0x2f20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2ef8,%rsp
lea    0x1780(%rsp),%rbx
mov    $0x1770,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0x10(%rsp),%rdi
mov    $0x7d0,%edx
xor    %esi,%esi
call   1040 <memset@plt>
lea    0x7e0(%rsp),%rbp
mov    $0xfa0,%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0x1784(%rsp),%rdx
lea    0x1788(%rsp),%rcx
lea    0xe59(%rip),%rdi
mov    %rbx,%rsi
mov    %rbp,%r8
call   1050 <scanf@plt>
mov    0x2e2f(%rip),%r12
cmp    (%r12),%rax
je     133a <main+0x1fa>
lea    0x7e8(%rsp),%r14
lea    0x178c(%rsp),%rbx
xor    %ebp,%ebp
lea    0xe24(%rip),%r15
nopl   0x0(%rax)
imul   $0x2710,-0xc(%rbx),%eax
imul   $0x64,-0x8(%rbx),%ecx
add    %eax,%ecx
add    -0x4(%rbx),%ecx
mov    %ecx,0x10(%rsp,%rbp,4)
add    $0x1,%rbp
lea    0x4(%rbx),%rdx
lea    0x8(%rbx),%rcx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%r8
call   1050 <scanf@plt>
add    $0x8,%r14
add    $0xc,%rbx
cmp    (%r12),%rax
jne    11e0 <main+0xa0>
test   %ebp,%ebp
je     133a <main+0x1fa>
movslq %ebp,%rax
lea    (%rsp,%rax,4),%r15
add    $0xc,%r15
lea    (%rsp,%rax,8),%r13
add    $0x7d0,%r13
xor    %eax,%eax
jmp    1254 <main+0x114>
xchg   %ax,%ax
mov    0x8(%rsp),%rax
add    $0x1,%eax
mov    (%rsp),%rbp
cmp    %eax,%ebp
je     1303 <main+0x1c3>
mov    %rax,0x8(%rsp)
mov    %rbp,(%rsp)
cmp    $0x1,%ebp
je     1240 <main+0x100>
xor    %r12d,%r12d
jmp    1282 <main+0x142>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%r12),%rax
add    (%rsp),%r12d
cmp    $0x2,%r12d
mov    %rax,%r12
je     1240 <main+0x100>
mov    -0x4(%r15,%r12,4),%ebx
mov    (%r15,%r12,4),%ebp
mov    %ebp,%edi
mov    %ebx,%esi
call   1060 <CompareDates@plt>
cmp    $0x1,%eax
jne    12c0 <main+0x180>
mov    %ebx,(%r15,%r12,4)
mov    %ebp,-0x4(%r15,%r12,4)
movupd 0x0(%r13,%r12,8),%xmm0
shufpd $0x1,%xmm0,%xmm0
movupd %xmm0,0x0(%r13,%r12,8)
mov    %ebp,%r14d
jmp    12c5 <main+0x185>
nopw   0x0(%rax,%rax,1)
mov    %ebx,%r14d
mov    %ebp,%ebx
mov    %ebx,%edi
mov    %r14d,%esi
call   1060 <CompareDates@plt>
test   %eax,%eax
jne    1270 <main+0x130>
movsd  0x0(%r13,%r12,8),%xmm1
movsd  0x8(%r13,%r12,8),%xmm0
ucomisd %xmm0,%xmm1
jbe    1270 <main+0x130>
mov    %r14d,(%r15,%r12,4)
mov    %ebx,-0x4(%r15,%r12,4)
movsd  %xmm1,0x8(%r13,%r12,8)
movsd  %xmm0,0x0(%r13,%r12,8)
jmp    1270 <main+0x130>
test   %ebp,%ebp
je     133a <main+0x1fa>
mov    %ebp,%ebp
xor    %ebx,%ebx
lea    0xcfb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x7e0(%rsp,%rbx,8),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1320 <main+0x1e0>
xor    %eax,%eax
add    $0x2ef8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%d-%d-%d %lf\00"
@EOF = global i64 0
@.str.1 = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [500 x [3 x i32]]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [500 x i32]
%7 = alloca i32
%8 = alloca [500 x double]
%9 = alloca double
store i32 0, i32* %1
%10 = bitcast [500 x [3 x i32]]* %2 to i8*
%11 = bitcast [500 x i32]* %6 to i8*
%12 = bitcast [500 x double]* %8 to i8*
store i32 0, i32* %3
br label %13
13: ; preds = %55, %0
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %2, i64 0, i64 %15
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %16, i64 0, i64 0
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %2, i64 0, i64 %19
%21 = getelementptr inbounds [3 x i32], [3 x i32]* %20, i64 0, i64 1
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %2, i64 0, i64 %23
%25 = getelementptr inbounds [3 x i32], [3 x i32]* %24, i64 0, i64 2
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %27
%29 = call i64 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %17, i32* %21, i32* %25, double* %28)
%30 = load i64, i64* @EOF
%31 = icmp ne i64 %29, %30
br i1 %31, label %32, label %58
32: ; preds = %13
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %2, i64 0, i64 %34
%36 = getelementptr inbounds [3 x i32], [3 x i32]* %35, i64 0, i64 0
%37 = load i32, i32* %36
%38 = mul nsw i32 %37, 10000
%39 = load i32, i32* %3
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %2, i64 0, i64 %40
%42 = getelementptr inbounds [3 x i32], [3 x i32]* %41, i64 0, i64 1
%43 = load i32, i32* %42
%44 = mul nsw i32 %43, 100
%45 = add nsw i32 %38, %44
%46 = load i32, i32* %3
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %2, i64 0, i64 %47
%49 = getelementptr inbounds [3 x i32], [3 x i32]* %48, i64 0, i64 2
%50 = load i32, i32* %49
%51 = add nsw i32 %45, %50
%52 = load i32, i32* %3
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %53
store i32 %51, i32* %54
br label %55
55: ; preds = %32
%56 = load i32, i32* %3
%57 = add nsw i32 %56, 1
store i32 %57, i32* %3
br label %13
58: ; preds = %13
%59 = load i32, i32* %3
store i32 %59, i32* %5
store i32 0, i32* %4
br label %60
60: ; preds = %191, %58
%61 = load i32, i32* %4
%62 = load i32, i32* %5
%63 = icmp slt i32 %61, %62
br i1 %63, label %64, label %194
64: ; preds = %60
%65 = load i32, i32* %5
store i32 %65, i32* %3
br label %66
66: ; preds = %187, %64
%67 = load i32, i32* %3
%68 = icmp ne i32 %67, 1
br i1 %68, label %69, label %190
69: ; preds = %66
%70 = load i32, i32* %3
%71 = sub nsw i32 %70, 1
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %72
%74 = load i32, i32* %73
%75 = load i32, i32* %3
%76 = sub nsw i32 %75, 2
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %77
%79 = load i32, i32* %78
%80 = call i32 @CompareDates(i32 %74, i32 %79)
%81 = icmp eq i32 %80, 1
br i1 %81, label %82, label %121
82: ; preds = %69
%83 = load i32, i32* %3
%84 = sub nsw i32 %83, 1
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %85
%87 = load i32, i32* %86
store i32 %87, i32* %7
%88 = load i32, i32* %3
%89 = sub nsw i32 %88, 2
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %90
%92 = load i32, i32* %91
%93 = load i32, i32* %3
%94 = sub nsw i32 %93, 1
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %95
store i32 %92, i32* %96
%97 = load i32, i32* %7
%98 = load i32, i32* %3
%99 = sub nsw i32 %98, 2
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %100
store i32 %97, i32* %101
%102 = load i32, i32* %3
%103 = sub nsw i32 %102, 1
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %104
%106 = load double, double* %105
store double %106, double* %9
%107 = load i32, i32* %3
%108 = sub nsw i32 %107, 2
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %109
%111 = load double, double* %110
%112 = load i32, i32* %3
%113 = sub nsw i32 %112, 1
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %114
store double %111, double* %115
%116 = load double, double* %9
%117 = load i32, i32* %3
%118 = sub nsw i32 %117, 2
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %119
store double %116, double* %120
br label %121
121: ; preds = %82, %69
%122 = load i32, i32* %3
%123 = sub nsw i32 %122, 1
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %124
%126 = load i32, i32* %125
%127 = load i32, i32* %3
%128 = sub nsw i32 %127, 2
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %129
%131 = load i32, i32* %130
%132 = call i32 @CompareDates(i32 %126, i32 %131)
%133 = icmp eq i32 %132, 0
br i1 %133, label %134, label %186
134: ; preds = %121
%135 = load i32, i32* %3
%136 = sub nsw i32 %135, 1
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %137
%139 = load double, double* %138
%140 = load i32, i32* %3
%141 = sub nsw i32 %140, 2
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %142
%144 = load double, double* %143
%145 = fcmp olt double %139, %144
br i1 %145, label %146, label %185
146: ; preds = %134
%147 = load i32, i32* %3
%148 = sub nsw i32 %147, 1
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %149
%151 = load i32, i32* %150
store i32 %151, i32* %7
%152 = load i32, i32* %3
%153 = sub nsw i32 %152, 2
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %154
%156 = load i32, i32* %155
%157 = load i32, i32* %3
%158 = sub nsw i32 %157, 1
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %159
store i32 %156, i32* %160
%161 = load i32, i32* %7
%162 = load i32, i32* %3
%163 = sub nsw i32 %162, 2
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [500 x i32], [500 x i32]* %6, i64 0, i64 %164
store i32 %161, i32* %165
%166 = load i32, i32* %3
%167 = sub nsw i32 %166, 1
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %168
%170 = load double, double* %169
store double %170, double* %9
%171 = load i32, i32* %3
%172 = sub nsw i32 %171, 2
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %173
%175 = load double, double* %174
%176 = load i32, i32* %3
%177 = sub nsw i32 %176, 1
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %178
store double %175, double* %179
%180 = load double, double* %9
%181 = load i32, i32* %3
%182 = sub nsw i32 %181, 2
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %183
store double %180, double* %184
br label %185
185: ; preds = %146, %134
br label %186
186: ; preds = %185, %121
br label %187
187: ; preds = %186
%188 = load i32, i32* %3
%189 = add nsw i32 %188, -1
store i32 %189, i32* %3
br label %66
190: ; preds = %66
br label %191
191: ; preds = %190
%192 = load i32, i32* %4
%193 = add nsw i32 %192, 1
store i32 %193, i32* %4
br label %60
194: ; preds = %60
store i32 0, i32* %4
br label %195
195: ; preds = %205, %194
%196 = load i32, i32* %4
%197 = load i32, i32* %5
%198 = icmp slt i32 %196, %197
br i1 %198, label %199, label %208
199: ; preds = %195
%200 = load i32, i32* %4
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds [500 x double], [500 x double]* %8, i64 0, i64 %201
%203 = load double, double* %202
%204 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %203)
br label %205
205: ; preds = %199
%206 = load i32, i32* %4
%207 = add nsw i32 %206, 1
store i32 %207, i32* %4
br label %195
208: ; preds = %195
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%d-%d-%d %lf\00"
@EOF = global i64 0
@.str.1 = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = alloca [500 x [3 x i32]]
%2 = alloca [500 x i32]
%3 = alloca [500 x double]
%4 = bitcast [500 x [3 x i32]]* %1 to i8*
%5 = bitcast [500 x i32]* %2 to i8*
%6 = bitcast [500 x double]* %3 to i8*
%7 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %1, i64 0, i64 0, i64 0
%8 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %1, i64 0, i64 0, i64 1
%9 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %1, i64 0, i64 0, i64 2
%10 = getelementptr inbounds [500 x double], [500 x double]* %3, i64 0, i64 0
%11 = call i64 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %7, i32* %8, i32* %9, double* %10)
%12 = load i64, i64* @EOF
%13 = icmp eq i64 %11, %12
br i1 %13, label %88, label %21
14: ; preds = %21
%15 = trunc i64 %34 to i32
%16 = icmp eq i32 %15, 0
br i1 %16, label %88, label %17
17: ; preds = %14
%18 = icmp eq i32 %15, 1
%19 = shl i64 %34, 32
%20 = ashr exact i64 %19, 32
br label %42
21: ; preds = %0, %21
%22 = phi i64 [ %34, %21 ], [ 0, %0 ]
%23 = phi i32* [ %37, %21 ], [ %9, %0 ]
%24 = phi i32* [ %36, %21 ], [ %8, %0 ]
%25 = phi i32* [ %35, %21 ], [ %7, %0 ]
%26 = load i32, i32* %25
%27 = mul nsw i32 %26, 10000
%28 = load i32, i32* %24
%29 = mul nsw i32 %28, 100
%30 = add nsw i32 %29, %27
%31 = load i32, i32* %23
%32 = add nsw i32 %30, %31
%33 = getelementptr inbounds [500 x i32], [500 x i32]* %2, i64 0, i64 %22
store i32 %32, i32* %33
%34 = add nuw nsw i64 %22, 1
%35 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %1, i64 0, i64 %34, i64 0
%36 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %1, i64 0, i64 %34, i64 1
%37 = getelementptr inbounds [500 x [3 x i32]], [500 x [3 x i32]]* %1, i64 0, i64 %34, i64 2
%38 = getelementptr inbounds [500 x double], [500 x double]* %3, i64 0, i64 %34
%39 = call i64 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %35, i32* %36, i32* %37, double* %38)
%40 = load i64, i64* @EOF
%41 = icmp eq i64 %39, %40
br i1 %41, label %14, label %21
42: ; preds = %17, %78
%43 = phi i32 [ 0, %17 ], [ %79, %78 ]
br i1 %18, label %78, label %47
44: ; preds = %78
br i1 %16, label %88, label %45
45: ; preds = %44
%46 = and i64 %34, 4294967295
br label %81
47: ; preds = %42, %75
%48 = phi i64 [ %49, %75 ], [ %20, %42 ]
%49 = add nsw i64 %48, -1
%50 = getelementptr inbounds [500 x i32], [500 x i32]* %2, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = add nsw i64 %48, -2
%53 = getelementptr inbounds [500 x i32], [500 x i32]* %2, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = call i32 @CompareDates(i32 %51, i32 %54)
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %63
57: ; preds = %47
store i32 %54, i32* %50
store i32 %51, i32* %53
%58 = getelementptr inbounds [500 x double], [500 x double]* %3, i64 0, i64 %52
%59 = bitcast double* %58 to <2 x double>*
%60 = load <2 x double>, <2 x double>* %59
%61 = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%62 = bitcast double* %58 to <2 x double>*
store <2 x double> %61, <2 x double>* %62
br label %63
63: ; preds = %57, %47
%64 = phi i32 [ %51, %57 ], [ %54, %47 ]
%65 = phi i32 [ %54, %57 ], [ %51, %47 ]
%66 = call i32 @CompareDates(i32 %65, i32 %64)
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %75
68: ; preds = %63
%69 = getelementptr inbounds [500 x double], [500 x double]* %3, i64 0, i64 %49
%70 = load double, double* %69
%71 = getelementptr inbounds [500 x double], [500 x double]* %3, i64 0, i64 %52
%72 = load double, double* %71
%73 = fcmp olt double %70, %72
br i1 %73, label %74, label %75
74: ; preds = %68
store i32 %64, i32* %50
store i32 %65, i32* %53
store double %72, double* %69
store double %70, double* %71
br label %75
75: ; preds = %63, %74, %68
%76 = trunc i64 %49 to i32
%77 = icmp eq i32 %76, 1
br i1 %77, label %78, label %47
78: ; preds = %75, %42
%79 = add nuw i32 %43, 1
%80 = icmp eq i32 %79, %15
br i1 %80, label %44, label %42
81: ; preds = %45, %81
%82 = phi i64 [ 0, %45 ], [ %86, %81 ]
%83 = getelementptr inbounds [500 x double], [500 x double]* %3, i64 0, i64 %82
%84 = load double, double* %83
%85 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %84)
%86 = add nuw nsw i64 %82, 1
%87 = icmp eq i64 %86, %46
br i1 %87, label %88, label %81
88: ; preds = %81, %0, %14, %44
ret i32 0
}