#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 main(void) {
  float price;
  float maxPrice = 0;
  float minPrice = 0;
  int month = 0;
  int maxMonth = 0, minMonth = 1;
  int year;
  int maxYear = 0, minYear = 0;
  int count = 0;
  scanf("%d", &month);
  while (month != -1) {
    scanf("%d", &year);
    scanf("%f", &price);
    if (count < 1)
      minPrice = price;
    if (price >= maxPrice) {
      maxPrice = price;
      maxMonth = month;
      maxYear = year;
    }
    if (price <= minPrice) {
      minPrice = price;
      minMonth = month;
      minYear = year;
    }
    count++;
    scanf("%d", &month);
  }
  printf("Minimum Price    $%6.2f     ", minPrice);
  switch (minMonth) {
  case 1:
    printf("January  ");
    break;
  case 2:
    printf("February ");
    break;
  case 3:
    printf("March    ");
    break;
  case 4:
    printf("April    ");
    break;
  case 5:
    printf("May      ");
    break;
  case 6:
    printf("June     ");
    break;
  case 7:
    printf("July     ");
    break;
  case 8:
    printf("August   ");
    break;
  case 9:
    printf("September");
    break;
  case 10:
    printf("October  ");
    break;
  case 11:
    printf("November ");
    break;
  case 12:
    printf("December ");
    break;
  default:
    break;
  }
  printf("     %d\n", minYear);
  printf("Maximum Price    $%6.2f     ", maxPrice);
  switch (maxMonth) {
  case 1:
    printf("January  ");
    break;
  case 2:
    printf("February ");
    break;
  case 3:
    printf("March    ");
    break;
  case 4:
    printf("April    ");
    break;
  case 5:
    printf("May      ");
    break;
  case 6:
    printf("June     ");
    break;
  case 7:
    printf("July     ");
    break;
  case 8:
    printf("August   ");
    break;
  case 9:
    printf("September");
    break;
  case 10:
    printf("October  ");
    break;
  case 11:
    printf("November ");
    break;
  case 12:
    printf("December ");
    break;
  default:
    break;
  }
  printf("     %d\n", maxYear);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
lea    0xef0(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0xffffffff,-0x14(%rbp)
je     122b <main+0x10b>
lea    0xed4(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x1,-0x2c(%rbp)
jge    11bd <main+0x9d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     11e2 <main+0xc2>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     120b <main+0xeb>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
lea    0xe45(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
jmp    117b <main+0x5b>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe2b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0xb,%eax
ja     134f <main+0x22f>
mov    -0x38(%rbp),%rax
lea    0xd9e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xddb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1354 <main+0x234>
jmp    1354 <main+0x234>
mov    -0x28(%rbp),%esi
lea    0xd9d(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd8f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0xb,%eax
ja     1489 <main+0x369>
mov    -0x40(%rbp),%rax
lea    0xc94(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xcce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xcbc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xcb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xcaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xca1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xc98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xc8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xc86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xc7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
lea    0xc74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    148e <main+0x36e>
jmp    148e <main+0x36e>
mov    -0x24(%rbp),%esi
lea    0xc63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movl   $0x0,0x4(%rsp)
lea    0xf23(%rip),%rdi
xor    %r15d,%r15d
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0xffffffff,0x4(%rsp)
je     1272 <main+0x152>
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
mov    $0x1,%r13d
lea    0xef4(%rip),%r14
xor    %ebp,%ebp
xor    %ebx,%ebx
xor    %r12d,%r12d
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
jmp    11e3 <main+0xc3>
nopl   (%rax)
movaps 0x10(%rsp),%xmm3
ucomiss %xmm3,%xmm0
mov    0x4(%rsp),%eax
mov    0x8(%rsp),%ecx
movaps %xmm3,%xmm2
cmpnless %xmm0,%xmm2
andps  %xmm2,%xmm3
andnps %xmm0,%xmm2
orps   %xmm2,%xmm3
movaps %xmm3,0x10(%rsp)
cmovae %eax,%r12d
cmovae %ecx,%ebx
ucomiss %xmm0,%xmm1
movaps %xmm0,%xmm2
cmpnless %xmm1,%xmm2
andps  %xmm2,%xmm1
andnps %xmm0,%xmm2
orps   %xmm1,%xmm2
movaps %xmm2,0x20(%rsp)
cmovae %eax,%r13d
cmovae %ecx,%ebp
mov    %r14,%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0xffffffff,0x4(%rsp)
je     1222 <main+0x102>
mov    %r14,%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xe6a(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movaps %xmm0,%xmm1
sub    $0x1,%r15d
jb     1180 <main+0x60>
movaps 0x20(%rsp),%xmm1
jmp    1180 <main+0x60>
movaps 0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0x10(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x10(%rsp)
lea    0xe25(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0xffffffff,%r13d
cmp    $0xb,%r13d
ja     12a1 <main+0x181>
lea    0xe2a(%rip),%rdi
lea    0xda0(%rip),%rax
movslq (%rax,%r13,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xe1d(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xded(%rip),%rdi
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %ebp,%ebp
lea    0xdee(%rip),%rdi
xor    %ebx,%ebx
xor    %r12d,%r12d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe53(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe4c(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
add    $0xffffffff,%r12d
cmp    $0xb,%r12d
ja     12e7 <main+0x1c7>
movslq %r12d,%rax
lea    0xd57(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe0d(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd88(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xd89(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xd8a(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xd88(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xd86(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xd84(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xd8c(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xd8a(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xd88(%rip),%rdi
jmp    129a <main+0x17a>
lea    0xd5e(%rip),%rdi
jmp    129a <main+0x17a>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [29 x i8] c"Minimum Price $%6.2f \00"
@.str.3 = [10 x i8] c"January \00"
@.str.4 = [10 x i8] c"February \00"
@.str.5 = [10 x i8] c"March \00"
@.str.6 = [10 x i8] c"April \00"
@.str.7 = [10 x i8] c"May \00"
@.str.8 = [10 x i8] c"June \00"
@.str.9 = [10 x i8] c"July \00"
@.str.10 = [10 x i8] c"August \00"
@.str.11 = [10 x i8] c"September\00"
@.str.12 = [10 x i8] c"October \00"
@.str.13 = [10 x i8] c"November \00"
@.str.14 = [10 x i8] c"December \00"
@.str.15 = [9 x i8] c" %d\0A\00"
@.str.16 = [29 x i8] c"Maximum Price $%6.2f \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 1, i32* %7
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
br label %13
13: ; preds = %39, %0
%14 = load i32, i32* %5
%15 = icmp ne i32 %14, -1
br i1 %15, label %16, label %43
16: ; preds = %13
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %8)
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%19 = load i32, i32* %11
%20 = icmp slt i32 %19, 1
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = load float, float* %2
store float %22, float* %4
br label %23
23: ; preds = %21, %16
%24 = load float, float* %2
%25 = load float, float* %3
%26 = fcmp oge float %24, %25
br i1 %26, label %27, label %31
27: ; preds = %23
%28 = load float, float* %2
store float %28, float* %3
%29 = load i32, i32* %5
store i32 %29, i32* %6
%30 = load i32, i32* %8
store i32 %30, i32* %9
br label %31
31: ; preds = %27, %23
%32 = load float, float* %2
%33 = load float, float* %4
%34 = fcmp ole float %32, %33
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load float, float* %2
store float %36, float* %4
%37 = load i32, i32* %5
store i32 %37, i32* %7
%38 = load i32, i32* %8
store i32 %38, i32* %10
br label %39
39: ; preds = %35, %31
%40 = load i32, i32* %11
%41 = add nsw i32 %40, 1
store i32 %41, i32* %11
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
br label %13
43: ; preds = %13
%44 = load float, float* %4
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %45)
%47 = load i32, i32* %7
switch i32 %47, label %72 [
i32 1, label %48
i32 2, label %50
i32 3, label %52
i32 4, label %54
i32 5, label %56
i32 6, label %58
i32 7, label %60
i32 8, label %62
i32 9, label %64
i32 10, label %66
i32 11, label %68
i32 12, label %70
]
48: ; preds = %43
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %73
50: ; preds = %43
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %73
52: ; preds = %43
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %73
54: ; preds = %43
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
br label %73
56: ; preds = %43
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
br label %73
58: ; preds = %43
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
br label %73
60: ; preds = %43
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
br label %73
62: ; preds = %43
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
br label %73
64: ; preds = %43
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
br label %73
66: ; preds = %43
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
br label %73
68: ; preds = %43
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %73
70: ; preds = %43
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0))
br label %73
72: ; preds = %43
br label %73
73: ; preds = %72, %70, %68, %66, %64, %62, %60, %58, %56, %54, %52, %50, %48
%74 = load i32, i32* %10
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %74)
%76 = load float, float* %3
%77 = fpext float %76 to double
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0), double %77)
%79 = load i32, i32* %6
switch i32 %79, label %104 [
i32 1, label %80
i32 2, label %82
i32 3, label %84
i32 4, label %86
i32 5, label %88
i32 6, label %90
i32 7, label %92
i32 8, label %94
i32 9, label %96
i32 10, label %98
i32 11, label %100
i32 12, label %102
]
80: ; preds = %73
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %105
82: ; preds = %73
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %105
84: ; preds = %73
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %105
86: ; preds = %73
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
br label %105
88: ; preds = %73
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
br label %105
90: ; preds = %73
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
br label %105
92: ; preds = %73
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
br label %105
94: ; preds = %73
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
br label %105
96: ; preds = %73
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
br label %105
98: ; preds = %73
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
br label %105
100: ; preds = %73
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %105
102: ; preds = %73
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0))
br label %105
104: ; preds = %73
br label %105
105: ; preds = %104, %102, %100, %98, %96, %94, %92, %90, %88, %86, %84, %82, %80
%106 = load i32, i32* %9
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %106)
%108 = load i32, i32* %1
ret i32 %108
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [29 x i8] c"Minimum Price $%6.2f \00"
@.str.3 = [10 x i8] c"January \00"
@.str.4 = [10 x i8] c"February \00"
@.str.5 = [10 x i8] c"March \00"
@.str.6 = [10 x i8] c"April \00"
@.str.7 = [10 x i8] c"May \00"
@.str.8 = [10 x i8] c"June \00"
@.str.9 = [10 x i8] c"July \00"
@.str.10 = [10 x i8] c"August \00"
@.str.11 = [10 x i8] c"September\00"
@.str.12 = [10 x i8] c"October \00"
@.str.13 = [10 x i8] c"November \00"
@.str.14 = [10 x i8] c"December \00"
@.str.15 = [9 x i8] c" %d\0A\00"
@.str.16 = [29 x i8] c"Maximum Price $%6.2f \00"
@reltable.main = [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.3 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.4 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.5 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.6 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.7 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.8 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.9 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.10 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.11 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.12 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.13 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.14 to i64), i64 ptrtoint ([12 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca float
%2 = alloca i32
%3 = alloca i32
%4 = bitcast float* %1 to i8*
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast i32* %3 to i8*
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double 0.000000e+00)
br label %54
12: ; preds = %0, %12
%13 = phi i32 [ %35, %12 ], [ 0, %0 ]
%14 = phi i32 [ %34, %12 ], [ 0, %0 ]
%15 = phi i32 [ %30, %12 ], [ 0, %0 ]
%16 = phi i32 [ %33, %12 ], [ 1, %0 ]
%17 = phi i32 [ %29, %12 ], [ 0, %0 ]
%18 = phi float [ %32, %12 ], [ 0.000000e+00, %0 ]
%19 = phi float [ %28, %12 ], [ 0.000000e+00, %0 ]
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%22 = icmp eq i32 %13, 0
%23 = load float, float* %1
%24 = select i1 %22, float %23, float %18
%25 = fcmp ult float %23, %19
%26 = load i32, i32* %2
%27 = load i32, i32* %3
%28 = select i1 %25, float %19, float %23
%29 = select i1 %25, i32 %17, i32 %26
%30 = select i1 %25, i32 %15, i32 %27
%31 = fcmp ugt float %23, %24
%32 = select i1 %31, float %24, float %23
%33 = select i1 %31, i32 %16, i32 %26
%34 = select i1 %31, i32 %14, i32 %27
%35 = add nuw nsw i32 %13, 1
%36 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%37 = load i32, i32* %2
%38 = icmp eq i32 %37, -1
br i1 %38, label %39, label %12
39: ; preds = %12
%40 = fpext float %32 to double
%41 = fpext float %28 to double
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %40)
switch i32 %33, label %61 [
i32 1, label %54
i32 2, label %43
i32 3, label %44
i32 4, label %45
i32 5, label %46
i32 6, label %47
i32 7, label %48
i32 8, label %49
i32 9, label %50
i32 10, label %51
i32 11, label %52
i32 12, label %53
]
43: ; preds = %39
br label %54
44: ; preds = %39
br label %54
45: ; preds = %39
br label %54
46: ; preds = %39
br label %54
47: ; preds = %39
br label %54
48: ; preds = %39
br label %54
49: ; preds = %39
br label %54
50: ; preds = %39
br label %54
51: ; preds = %39
br label %54
52: ; preds = %39
br label %54
53: ; preds = %39
br label %54
54: ; preds = %39, %10, %43, %44, %45, %46, %47, %48, %49, %50, %51, %52, %53
%55 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), %53 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), %52 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), %51 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), %50 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), %49 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), %48 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), %47 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), %46 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), %45 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), %44 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %43 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %10 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %39 ]
%56 = phi i32 [ %34, %53 ], [ %34, %52 ], [ %34, %51 ], [ %34, %50 ], [ %34, %49 ], [ %34, %48 ], [ %34, %47 ], [ %34, %46 ], [ %34, %45 ], [ %34, %44 ], [ %34, %43 ], [ 0, %10 ], [ %34, %39 ]
%57 = phi i32 [ %30, %53 ], [ %30, %52 ], [ %30, %51 ], [ %30, %50 ], [ %30, %49 ], [ %30, %48 ], [ %30, %47 ], [ %30, %46 ], [ %30, %45 ], [ %30, %44 ], [ %30, %43 ], [ 0, %10 ], [ %30, %39 ]
%58 = phi i32 [ %29, %53 ], [ %29, %52 ], [ %29, %51 ], [ %29, %50 ], [ %29, %49 ], [ %29, %48 ], [ %29, %47 ], [ %29, %46 ], [ %29, %45 ], [ %29, %44 ], [ %29, %43 ], [ 0, %10 ], [ %29, %39 ]
%59 = phi double [ %41, %53 ], [ %41, %52 ], [ %41, %51 ], [ %41, %50 ], [ %41, %49 ], [ %41, %48 ], [ %41, %47 ], [ %41, %46 ], [ %41, %45 ], [ %41, %44 ], [ %41, %43 ], [ 0.000000e+00, %10 ], [ %41, %39 ]
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %55)
br label %61
61: ; preds = %54, %39
%62 = phi i32 [ %34, %39 ], [ %56, %54 ]
%63 = phi i32 [ %30, %39 ], [ %57, %54 ]
%64 = phi i32 [ %29, %39 ], [ %58, %54 ]
%65 = phi double [ %41, %39 ], [ %59, %54 ]
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %62)
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0), double %65)
%68 = add i32 %64, -1
%69 = icmp ult i32 %68, 12
br i1 %69, label %70, label %75
70: ; preds = %61
%71 = sext i32 %68 to i64
%72 = shl i64 %71, 2
%73 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.main to i8*), i64 %72)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %73)
br label %75
75: ; preds = %61, %70
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %63)
ret i32 0
}