#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) {
  int numDay;
  float high;
  float low;
  char condition;
  float average;
  float subtotal;
  const int symbols = 20;
  int i;
  int j;
  printf("Weather Analyzer\n");
  printf("=================\n");
  do {
    printf("Please enter a positive number of days: ");
    scanf("%d", &numDay);
  } while (numDay <= 0);
  for (i = 1; i <= numDay; i++) {
    printf("DAY: %d\n", i);
    printf("Enter today's high: ");
    scanf("%f", &high);
    do {
      printf("Enter today's low: ");
      scanf("%f", &low);
      if (low > high)
        printf("Invalid Input! Must be <= than high temperature.\n");
    } while (low > high);
    printf(
        "Enter today's conditions (s: sunny, c: cloudy, p: precipicitation): ");
    scanf(" %c", &condition);
    average = (high + low) / 2;
    printf("Today's average temperature is: %.2f\n", average);
    if (condition == 's') {
      for (j = 0; j < symbols; j++)
        printf("@");
    } else if (condition == 'c') {
      for (j = 0; j < symbols; j++)
        printf("~");
    } else if (condition == 'p' && average <= 0) {
      for (j = 0; j < symbols; j++)
        printf("*");
    } else {
      for (j = 0; j < symbols; j++)
        printf(";");
    }
    printf("\n");
    subtotal += average;
    average = 0;
  }
  printf("Average for all %d days is: %.2f degrees.\n", numDay,
         subtotal / numDay);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x20(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1152 <main+0x32>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     139c <main+0x27c>
mov    -0x24(%rbp),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9e(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    11fd <main+0xdd>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1202 <main+0xe2>
movss  -0x10(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
ja     11c0 <main+0xa0>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    -0x11(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0xdbd(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x73,%eax
jne    12a2 <main+0x182>
movl   $0x0,-0x28(%rbp)
cmpl   $0x14,-0x28(%rbp)
jge    129d <main+0x17d>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1277 <main+0x157>
jmp    1369 <main+0x249>
movsbl -0x11(%rbp),%eax
cmp    $0x63,%eax
jne    12e1 <main+0x1c1>
movl   $0x0,-0x28(%rbp)
cmpl   $0x14,-0x28(%rbp)
jge    12dc <main+0x1bc>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12b6 <main+0x196>
jmp    1364 <main+0x244>
movsbl -0x11(%rbp),%eax
cmp    $0x70,%eax
jne    132d <main+0x20d>
xorps  %xmm0,%xmm0
ucomiss -0x18(%rbp),%xmm0
jb     132d <main+0x20d>
movl   $0x0,-0x28(%rbp)
cmpl   $0x14,-0x28(%rbp)
jge    1328 <main+0x208>
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1302 <main+0x1e2>
jmp    135f <main+0x23f>
movl   $0x0,-0x28(%rbp)
cmpl   $0x14,-0x28(%rbp)
jge    135a <main+0x23a>
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1334 <main+0x214>
jmp    135f <main+0x23f>
jmp    1364 <main+0x244>
jmp    1369 <main+0x249>
lea    0xd4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1183 <main+0x63>
mov    -0x8(%rbp),%esi
movss  -0x1c(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd7b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xfae(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb3(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9b(%rip),%r14
lea    0xebd(%rip),%rbp
lea    0x10(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0x10(%rsp)
jle    1180 <main+0x40>
mov    $0x1,%r12d
lea    0xea7(%rip),%rbx
lea    0xea3(%rip),%rbp
lea    0x4(%rsp),%r14
lea    0xf68(%rip),%r15
jmp    12bd <main+0x17d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
ucomiss 0xc(%rsp),%xmm0
mov    $0x3b,%r13d
mov    $0x2a,%ecx
cmovae %ecx,%r13d
cmp    $0x70,%al
mov    $0x3b,%eax
cmovne %eax,%r13d
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    %r13d,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  0x14(%rsp),%xmm1
addss  0xc(%rsp),%xmm1
lea    0x1(%r12),%eax
mov    0x10(%rsp),%esi
cmp    %esi,%r12d
mov    %eax,%r12d
jge    13cb <main+0x28b>
movss  %xmm1,0x14(%rsp)
lea    0xd6a(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd62(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
jmp    1305 <main+0x1c5>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
ucomiss %xmm1,%xmm0
jbe    1350 <main+0x210>
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
ucomiss %xmm1,%xmm0
jbe    1300 <main+0x1c0>
mov    %r15,%rdi
call   1040 <puts@plt>
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
jmp    1300 <main+0x1c0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xd12(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd49(%rip),%rdi
lea    0x3(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
movss  0x8(%rsp),%xmm0
addss  0x4(%rsp),%xmm0
mulss  0xc7b(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xd1c(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x3(%rsp),%al
cmp    $0x63,%al
je     13c0 <main+0x280>
cmp    $0x73,%al
jne    11d0 <main+0x90>
mov    $0x40,%r13d
jmp    11f2 <main+0xb2>
nopl   0x0(%rax,%rax,1)
mov    $0x7e,%r13d
jmp    11f2 <main+0xb2>
xorps  %xmm0,%xmm0
cvtsi2ss %esi,%xmm0
divss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xcf4(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Weather Analyzer\0A\00"
@.str.1 = [19 x i8] c"=================\0A\00"
@.str.2 = [41 x i8] c"Please enter a positive number of days: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [9 x i8] c"DAY: %d\0A\00"
@.str.5 = [21 x i8] c"Enter today's high: \00"
@.str.6 = [3 x i8] c"%f\00"
@.str.7 = [20 x i8] c"Enter today's low: \00"
@.str.8 = [50 x i8] c"Invalid Input! Must be <= than high temperature.\0A\00"
@.str.9 = [69 x i8] c"Enter today's conditions (s: sunny, c: cloudy, p: precipicitation): \00"
@.str.10 = [4 x i8] c" %c\00"
@.str.11 = [38 x i8] c"Today's average temperature is: %.2f\0A\00"
@.str.12 = [2 x i8] c"@\00"
@.str.13 = [2 x i8] c"~\00"
@.str.14 = [2 x i8] c"*\00"
@.str.15 = [2 x i8] c";\00"
@.str.16 = [2 x i8] c"\0A\00"
@.str.17 = [43 x i8] c"Average for all %d days is: %.2f degrees.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca i8
%6 = alloca float
%7 = alloca float
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
store i32 20, i32* %8
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %16, %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
br label %16
16: ; preds = %13
%17 = load i32, i32* %2
%18 = icmp sle i32 %17, 0
br i1 %18, label %13, label %19
19: ; preds = %16
store i32 1, i32* %9
br label %20
20: ; preds = %113, %19
%21 = load i32, i32* %9
%22 = load i32, i32* %2
%23 = icmp sle i32 %21, %22
br i1 %23, label %24, label %116
24: ; preds = %20
%25 = load i32, i32* %9
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %3)
br label %29
29: ; preds = %38, %24
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %4)
%32 = load float, float* %4
%33 = load float, float* %3
%34 = fcmp ogt float %32, %33
br i1 %34, label %35, label %37
35: ; preds = %29
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0))
br label %37
37: ; preds = %35, %29
br label %38
38: ; preds = %37
%39 = load float, float* %4
%40 = load float, float* %3
%41 = fcmp ogt float %39, %40
br i1 %41, label %29, label %42
42: ; preds = %38
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.9, i64 0, i64 0))
%44 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %5)
%45 = load float, float* %3
%46 = load float, float* %4
%47 = fadd float %45, %46
%48 = fdiv float %47, 2.000000e+00
store float %48, float* %6
%49 = load float, float* %6
%50 = fpext float %49 to double
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), double %50)
%52 = load i8, i8* %5
%53 = sext i8 %52 to i32
%54 = icmp eq i32 %53, 115
br i1 %54, label %55, label %65
55: ; preds = %42
store i32 0, i32* %10
br label %56
56: ; preds = %61, %55
%57 = load i32, i32* %10
%58 = icmp slt i32 %57, 20
br i1 %58, label %59, label %64
59: ; preds = %56
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %61
61: ; preds = %59
%62 = load i32, i32* %10
%63 = add nsw i32 %62, 1
store i32 %63, i32* %10
br label %56
64: ; preds = %56
br label %108
65: ; preds = %42
%66 = load i8, i8* %5
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 99
br i1 %68, label %69, label %79
69: ; preds = %65
store i32 0, i32* %10
br label %70
70: ; preds = %75, %69
%71 = load i32, i32* %10
%72 = icmp slt i32 %71, 20
br i1 %72, label %73, label %78
73: ; preds = %70
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
br label %75
75: ; preds = %73
%76 = load i32, i32* %10
%77 = add nsw i32 %76, 1
store i32 %77, i32* %10
br label %70
78: ; preds = %70
br label %107
79: ; preds = %65
%80 = load i8, i8* %5
%81 = sext i8 %80 to i32
%82 = icmp eq i32 %81, 112
br i1 %82, label %83, label %96
83: ; preds = %79
%84 = load float, float* %6
%85 = fcmp ole float %84, 0.000000e+00
br i1 %85, label %86, label %96
86: ; preds = %83
store i32 0, i32* %10
br label %87
87: ; preds = %92, %86
%88 = load i32, i32* %10
%89 = icmp slt i32 %88, 20
br i1 %89, label %90, label %95
90: ; preds = %87
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %92
92: ; preds = %90
%93 = load i32, i32* %10
%94 = add nsw i32 %93, 1
store i32 %94, i32* %10
br label %87
95: ; preds = %87
br label %106
96: ; preds = %83, %79
store i32 0, i32* %10
br label %97
97: ; preds = %102, %96
%98 = load i32, i32* %10
%99 = icmp slt i32 %98, 20
br i1 %99, label %100, label %105
100: ; preds = %97
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %102
102: ; preds = %100
%103 = load i32, i32* %10
%104 = add nsw i32 %103, 1
store i32 %104, i32* %10
br label %97
105: ; preds = %97
br label %106
106: ; preds = %105, %95
br label %107
107: ; preds = %106, %78
br label %108
108: ; preds = %107, %64
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%110 = load float, float* %6
%111 = load float, float* %7
%112 = fadd float %111, %110
store float %112, float* %7
store float 0.000000e+00, float* %6
br label %113
113: ; preds = %108
%114 = load i32, i32* %9
%115 = add nsw i32 %114, 1
store i32 %115, i32* %9
br label %20
116: ; preds = %20
%117 = load i32, i32* %2
%118 = load float, float* %7
%119 = load i32, i32* %2
%120 = sitofp i32 %119 to float
%121 = fdiv float %118, %120
%122 = fpext float %121 to double
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.17, i64 0, i64 0), i32 %117, double %122)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [41 x i8] c"Please enter a positive number of days: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [9 x i8] c"DAY: %d\0A\00"
@.str.5 = [21 x i8] c"Enter today's high: \00"
@.str.6 = [3 x i8] c"%f\00"
@.str.7 = [20 x i8] c"Enter today's low: \00"
@.str.9 = [69 x i8] c"Enter today's conditions (s: sunny, c: cloudy, p: precipicitation): \00"
@.str.10 = [4 x i8] c" %c\00"
@.str.11 = [38 x i8] c"Today's average temperature is: %.2f\0A\00"
@.str.17 = [43 x i8] c"Average for all %d days is: %.2f degrees.\0A\00"
@str = [17 x i8] c"Weather Analyzer\00"
@str.18 = [18 x i8] c"=================\00"
@str.19 = [49 x i8] c"Invalid Input! Must be <= than high temperature.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i8
%5 = bitcast i32* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
br label %10
10: ; preds = %10, %0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%13 = load i32, i32* %1
%14 = icmp slt i32 %13, 1
br i1 %14, label %10, label %15
15: ; preds = %10, %51
%16 = phi i32 [ %75, %51 ], [ 1, %10 ]
%17 = phi float [ %74, %51 ], [ undef, %10 ]
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %2)
br label %21
21: ; preds = %31, %15
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), float* %3)
%24 = load float, float* %3
%25 = load float, float* %2
%26 = fcmp ogt float %24, %25
br i1 %26, label %27, label %31
27: ; preds = %21
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.19, i64 0, i64 0))
%29 = load float, float* %3
%30 = load float, float* %2
br label %31
31: ; preds = %21, %27
%32 = phi float [ %25, %21 ], [ %30, %27 ]
%33 = phi float [ %24, %21 ], [ %29, %27 ]
%34 = fcmp ogt float %33, %32
br i1 %34, label %21, label %35
35: ; preds = %31
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.9, i64 0, i64 0))
%37 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %4)
%38 = load float, float* %2
%39 = load float, float* %3
%40 = fadd float %38, %39
%41 = fmul float %40, 5.000000e-01
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), double %42)
%44 = load i8, i8* %4
switch i8 %44, label %46 [
i8 115, label %45
i8 99, label %51
]
45: ; preds = %35
br label %51
46: ; preds = %35
%47 = icmp eq i8 %44, 112
%48 = fcmp ole float %41, 0.000000e+00
%49 = select i1 %47, i1 %48, i1 false
%50 = select i1 %49, i32 42, i32 59
br label %51
51: ; preds = %46, %35, %45
%52 = phi i32 [ 64, %45 ], [ 126, %35 ], [ %50, %46 ]
%53 = call i32 @putchar(i32 %52)
%54 = call i32 @putchar(i32 %52)
%55 = call i32 @putchar(i32 %52)
%56 = call i32 @putchar(i32 %52)
%57 = call i32 @putchar(i32 %52)
%58 = call i32 @putchar(i32 %52)
%59 = call i32 @putchar(i32 %52)
%60 = call i32 @putchar(i32 %52)
%61 = call i32 @putchar(i32 %52)
%62 = call i32 @putchar(i32 %52)
%63 = call i32 @putchar(i32 %52)
%64 = call i32 @putchar(i32 %52)
%65 = call i32 @putchar(i32 %52)
%66 = call i32 @putchar(i32 %52)
%67 = call i32 @putchar(i32 %52)
%68 = call i32 @putchar(i32 %52)
%69 = call i32 @putchar(i32 %52)
%70 = call i32 @putchar(i32 %52)
%71 = call i32 @putchar(i32 %52)
%72 = call i32 @putchar(i32 %52)
%73 = call i32 @putchar(i32 10)
%74 = fadd float %17, %41
%75 = add nuw nsw i32 %16, 1
%76 = load i32, i32* %1
%77 = icmp slt i32 %16, %76
br i1 %77, label %15, label %78
78: ; preds = %51
%79 = sitofp i32 %76 to float
%80 = fdiv float %74, %79
%81 = fpext float %80 to double
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.17, i64 0, i64 0), i32 %76, double %81)
ret i32 0
}