#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 *, ...);
main() {
  int n;
  double gm, od;
  printf("1: Carbon Monoxide\n");
  printf("2: Hydrocarbons\n");
  printf("3: Nitrogen Oxide\n");
  printf("4: Nonmethane Hydrocarbon\n");
  printf("Please enter the pollutant number\n");
  scanf("%d", &n);
  printf("Please enter the number of grams emitted per mile\n");
  scanf("%lf", &gm);
  printf("Please enter the odometre reading\n");
  scanf("%lf", &od);
  if ((n == 1) && (gm <= .31) && (od <= 50000))
    printf("Emission under permitted level of .031 grams/mile");
  else if ((n == 1) && (gm > .31) && (od <= 50000))
    printf("Emission exceed permitted level of .031 grams/mile");
  else if ((n == 1) && (gm <= .39) && (od > 50000))
    printf("Emission under permitted level of .039 grams/mile");
  else if ((n == 1) && (gm > .39) && (od > 50000))
    printf("Emission exceed permitted level of .039 grams/mile");
  if ((n == 2) && (gm <= .31) && (od <= 50000))
    printf("Emission under permitted level of .031 grams/mile");
  else if ((n == 2) && (gm > .31) && (od <= 50000))
    printf("Emission exceed permitted level of .031 grams/mile");
  else if ((n == 2) && (gm <= .39) && (od > 50000))
    printf("Emission under permitted level of .039 grams/mile");
  else if ((n == 2) && (gm > .39) && (od > 50000))
    printf("Emission exceed permitted level of .039 grams/mile");
  if ((n == 3) && (gm <= .31) && (od <= 50000))
    printf("Emission under permitted level of .031 grams/mile");
  else if ((n == 3) && (gm > .31) && (od <= 50000))
    printf("Emission exceed permitted level of .031 grams/mile");
  else if ((n == 3) && (gm <= .39) && (od > 50000))
    printf("Emission under permitted level of .039 grams/mile");
  else if ((n == 3) && (gm > .39) && (od > 50000))
    printf("Emission exceed permitted level of .039 grams/mile");
  if ((n == 4) && (gm <= .31) && (od <= 50000))
    printf("Emission under permitted level of .031 grams/mile");
  else if ((n == 4) && (gm > .31) && (od <= 50000))
    printf("Emission exceed permitted level of .031 grams/mile");
  else if ((n == 4) && (gm <= .39) && (od > 50000))
    printf("Emission under permitted level of .039 grams/mile");
  else if ((n == 4) && (gm > .39) && (od > 50000))
    printf("Emission exceed permitted level of .039 grams/mile");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xf0d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xf26(%rip),%rdi
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    11fa <main+0xda>
movsd  0xe35(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11fa <main+0xda>
movsd  0xe2a(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     11fa <main+0xda>
lea    0xefb(%rip),%rdi
call   1030 <printf@plt>
jmp    12d7 <main+0x1b7>
cmpl   $0x1,-0x8(%rbp)
jne    123f <main+0x11f>
movsd  -0x10(%rbp),%xmm0
movsd  0xdef(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    123f <main+0x11f>
movsd  0xde5(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     123f <main+0x11f>
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
jmp    12d2 <main+0x1b2>
cmpl   $0x1,-0x8(%rbp)
jne    1284 <main+0x164>
movsd  0xdbf(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1284 <main+0x164>
movsd  -0x18(%rbp),%xmm0
movsd  0xd9f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1284 <main+0x164>
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
jmp    12cd <main+0x1ad>
cmpl   $0x1,-0x8(%rbp)
jne    12c8 <main+0x1a8>
movsd  -0x10(%rbp),%xmm0
movsd  0xd75(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12c8 <main+0x1a8>
movsd  -0x18(%rbp),%xmm0
movsd  0xd56(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12c8 <main+0x1a8>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
jmp    12cd <main+0x1ad>
jmp    12d2 <main+0x1b2>
jmp    12d7 <main+0x1b7>
cmpl   $0x2,-0x8(%rbp)
jne    1318 <main+0x1f8>
movsd  0xd17(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1318 <main+0x1f8>
movsd  0xd0c(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1318 <main+0x1f8>
lea    0xddd(%rip),%rdi
call   1030 <printf@plt>
jmp    13f5 <main+0x2d5>
cmpl   $0x2,-0x8(%rbp)
jne    135d <main+0x23d>
movsd  -0x10(%rbp),%xmm0
movsd  0xcd1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    135d <main+0x23d>
movsd  0xcc7(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     135d <main+0x23d>
lea    0xdca(%rip),%rdi
call   1030 <printf@plt>
jmp    13f0 <main+0x2d0>
cmpl   $0x2,-0x8(%rbp)
jne    13a2 <main+0x282>
movsd  0xca1(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     13a2 <main+0x282>
movsd  -0x18(%rbp),%xmm0
movsd  0xc81(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13a2 <main+0x282>
lea    0xdb8(%rip),%rdi
call   1030 <printf@plt>
jmp    13eb <main+0x2cb>
cmpl   $0x2,-0x8(%rbp)
jne    13e6 <main+0x2c6>
movsd  -0x10(%rbp),%xmm0
movsd  0xc57(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13e6 <main+0x2c6>
movsd  -0x18(%rbp),%xmm0
movsd  0xc38(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13e6 <main+0x2c6>
lea    0xda1(%rip),%rdi
call   1030 <printf@plt>
jmp    13eb <main+0x2cb>
jmp    13f0 <main+0x2d0>
jmp    13f5 <main+0x2d5>
cmpl   $0x3,-0x8(%rbp)
jne    1436 <main+0x316>
movsd  0xbf9(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1436 <main+0x316>
movsd  0xbee(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1436 <main+0x316>
lea    0xcbf(%rip),%rdi
call   1030 <printf@plt>
jmp    1513 <main+0x3f3>
cmpl   $0x3,-0x8(%rbp)
jne    147b <main+0x35b>
movsd  -0x10(%rbp),%xmm0
movsd  0xbb3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    147b <main+0x35b>
movsd  0xba9(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     147b <main+0x35b>
lea    0xcac(%rip),%rdi
call   1030 <printf@plt>
jmp    150e <main+0x3ee>
cmpl   $0x3,-0x8(%rbp)
jne    14c0 <main+0x3a0>
movsd  0xb83(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     14c0 <main+0x3a0>
movsd  -0x18(%rbp),%xmm0
movsd  0xb63(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14c0 <main+0x3a0>
lea    0xc9a(%rip),%rdi
call   1030 <printf@plt>
jmp    1509 <main+0x3e9>
cmpl   $0x3,-0x8(%rbp)
jne    1504 <main+0x3e4>
movsd  -0x10(%rbp),%xmm0
movsd  0xb39(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1504 <main+0x3e4>
movsd  -0x18(%rbp),%xmm0
movsd  0xb1a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1504 <main+0x3e4>
lea    0xc83(%rip),%rdi
call   1030 <printf@plt>
jmp    1509 <main+0x3e9>
jmp    150e <main+0x3ee>
jmp    1513 <main+0x3f3>
cmpl   $0x4,-0x8(%rbp)
jne    1554 <main+0x434>
movsd  0xadb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1554 <main+0x434>
movsd  0xad0(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1554 <main+0x434>
lea    0xba1(%rip),%rdi
call   1030 <printf@plt>
jmp    1631 <main+0x511>
cmpl   $0x4,-0x8(%rbp)
jne    1599 <main+0x479>
movsd  -0x10(%rbp),%xmm0
movsd  0xa95(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1599 <main+0x479>
movsd  0xa8b(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1599 <main+0x479>
lea    0xb8e(%rip),%rdi
call   1030 <printf@plt>
jmp    162c <main+0x50c>
cmpl   $0x4,-0x8(%rbp)
jne    15de <main+0x4be>
movsd  0xa65(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     15de <main+0x4be>
movsd  -0x18(%rbp),%xmm0
movsd  0xa45(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15de <main+0x4be>
lea    0xb7c(%rip),%rdi
call   1030 <printf@plt>
jmp    1627 <main+0x507>
cmpl   $0x4,-0x8(%rbp)
jne    1622 <main+0x502>
movsd  -0x10(%rbp),%xmm0
movsd  0xa1b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1622 <main+0x502>
movsd  -0x18(%rbp),%xmm0
movsd  0x9fc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1622 <main+0x502>
lea    0xb65(%rip),%rdi
call   1030 <printf@plt>
jmp    1627 <main+0x507>
jmp    162c <main+0x50c>
jmp    1631 <main+0x511>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xfad(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb8(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbe(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcc(%rip),%rdi
call   1030 <puts@plt>
lea    0xea0(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xfcf(%rip),%rdi
call   1030 <puts@plt>
lea    0xe84(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xfdf(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
cmp    $0x1,%eax
jne    11fb <main+0xcb>
movsd  0xe22(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     11fb <main+0xcb>
movsd  0xe1c(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     11fb <main+0xcb>
lea    0xe26(%rip),%rdi
jmp    1267 <main+0x137>
cmp    $0x1,%eax
jne    1221 <main+0xf1>
ucomisd 0xdf8(%rip),%xmm1
jbe    1221 <main+0xf1>
movsd  0xdf6(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     1221 <main+0xf1>
lea    0xe32(%rip),%rdi
jmp    1267 <main+0x137>
cmp    $0x1,%eax
jne    1247 <main+0x117>
movsd  0xde2(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     1247 <main+0x117>
ucomisd 0xdcc(%rip),%xmm0
jbe    1247 <main+0x117>
lea    0xe3f(%rip),%rdi
jmp    1267 <main+0x137>
cmp    $0x1,%eax
jne    126c <main+0x13c>
ucomisd 0xdbc(%rip),%xmm1
jbe    126c <main+0x13c>
ucomisd 0xdaa(%rip),%xmm0
jbe    126c <main+0x13c>
lea    0xe4f(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
cmp    $0x2,%eax
jne    12a6 <main+0x176>
movsd  0xd77(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     12a6 <main+0x176>
movsd  0xd71(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     12a6 <main+0x176>
lea    0xd7b(%rip),%rdi
jmp    1312 <main+0x1e2>
cmp    $0x2,%eax
jne    12cc <main+0x19c>
ucomisd 0xd4d(%rip),%xmm1
jbe    12cc <main+0x19c>
movsd  0xd4b(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     12cc <main+0x19c>
lea    0xd87(%rip),%rdi
jmp    1312 <main+0x1e2>
cmp    $0x2,%eax
jne    12f2 <main+0x1c2>
movsd  0xd37(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     12f2 <main+0x1c2>
ucomisd 0xd21(%rip),%xmm0
jbe    12f2 <main+0x1c2>
lea    0xd94(%rip),%rdi
jmp    1312 <main+0x1e2>
cmp    $0x2,%eax
jne    1317 <main+0x1e7>
ucomisd 0xd11(%rip),%xmm1
jbe    1317 <main+0x1e7>
ucomisd 0xcff(%rip),%xmm0
jbe    1317 <main+0x1e7>
lea    0xda4(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
cmp    $0x3,%eax
jne    1351 <main+0x221>
movsd  0xccc(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     1351 <main+0x221>
movsd  0xcc6(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     1351 <main+0x221>
lea    0xcd0(%rip),%rdi
jmp    13bd <main+0x28d>
cmp    $0x3,%eax
jne    1377 <main+0x247>
ucomisd 0xca2(%rip),%xmm1
jbe    1377 <main+0x247>
movsd  0xca0(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     1377 <main+0x247>
lea    0xcdc(%rip),%rdi
jmp    13bd <main+0x28d>
cmp    $0x3,%eax
jne    139d <main+0x26d>
movsd  0xc8c(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     139d <main+0x26d>
ucomisd 0xc76(%rip),%xmm0
jbe    139d <main+0x26d>
lea    0xce9(%rip),%rdi
jmp    13bd <main+0x28d>
cmp    $0x3,%eax
jne    13c2 <main+0x292>
ucomisd 0xc66(%rip),%xmm1
jbe    13c2 <main+0x292>
ucomisd 0xc54(%rip),%xmm0
jbe    13c2 <main+0x292>
lea    0xcf9(%rip),%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
cmp    $0x4,%eax
jne    13fc <main+0x2cc>
movsd  0xc21(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     13fc <main+0x2cc>
movsd  0xc1b(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     13fc <main+0x2cc>
lea    0xc25(%rip),%rdi
jmp    1468 <main+0x338>
cmp    $0x4,%eax
jne    1422 <main+0x2f2>
ucomisd 0xbf7(%rip),%xmm1
jbe    1422 <main+0x2f2>
movsd  0xbf5(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     1422 <main+0x2f2>
lea    0xc31(%rip),%rdi
jmp    1468 <main+0x338>
cmp    $0x4,%eax
jne    1448 <main+0x318>
movsd  0xbe1(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     1448 <main+0x318>
ucomisd 0xbcb(%rip),%xmm0
jbe    1448 <main+0x318>
lea    0xc3e(%rip),%rdi
jmp    1468 <main+0x338>
cmp    $0x4,%eax
jne    146d <main+0x33d>
ucomisd 0xbbb(%rip),%xmm1
jbe    146d <main+0x33d>
ucomisd 0xba9(%rip),%xmm0
jbe    146d <main+0x33d>
lea    0xc4e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str.5 = [3 x i8] c"%d\00"
@.str.7 = [4 x i8] c"%lf\00"
@.str.9 = [50 x i8] c"Emission under permitted level of .031 grams/mile\00"
@.str.10 = [51 x i8] c"Emission exceed permitted level of .031 grams/mile\00"
@.str.11 = [50 x i8] c"Emission under permitted level of .039 grams/mile\00"
@.str.12 = [51 x i8] c"Emission exceed permitted level of .039 grams/mile\00"
@str = [19 x i8] c"1: Carbon Monoxide\00"
@str.13 = [16 x i8] c"2: Hydrocarbons\00"
@str.14 = [18 x i8] c"3: Nitrogen Oxide\00"
@str.15 = [26 x i8] c"4: Nonmethane Hydrocarbon\00"
@str.16 = [34 x i8] c"Please enter the pollutant number\00"
@str.17 = [50 x i8] c"Please enter the number of grams emitted per mile\00"
@str.18 = [34 x i8] c"Please enter the odometre reading\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = bitcast i32* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.14, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.15, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.16, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.17, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %2)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.18, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), double* %3)
%17 = load i32, i32* %1
%18 = icmp eq i32 %17, 1
%19 = load double, double* %2
%20 = fcmp ole double %19, 3.100000e-01
%21 = select i1 %18, i1 %20, i1 false
%22 = load double, double* %3
%23 = fcmp ole double %22, 5.000000e+04
%24 = select i1 %21, i1 %23, i1 false
br i1 %24, label %38, label %25
25: ; preds = %0
%26 = fcmp ogt double %19, 3.100000e-01
%27 = select i1 %18, i1 %26, i1 false
%28 = select i1 %27, i1 %23, i1 false
br i1 %28, label %38, label %29
29: ; preds = %25
%30 = fcmp ole double %19, 3.900000e-01
%31 = select i1 %18, i1 %30, i1 false
%32 = fcmp ogt double %22, 5.000000e+04
%33 = select i1 %31, i1 %32, i1 false
br i1 %33, label %38, label %34
34: ; preds = %29
%35 = fcmp ogt double %19, 3.900000e-01
%36 = select i1 %18, i1 %35, i1 false
%37 = select i1 %36, i1 %32, i1 false
br i1 %37, label %38, label %41
38: ; preds = %34, %29, %25, %0
%39 = phi i8* [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), %0 ], [ getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0), %25 ], [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), %29 ], [ getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0), %34 ]
%40 = call i32 @printf(i8* dereferenceable(1) %39)
br label %41
41: ; preds = %38, %34
%42 = load i32, i32* %1
%43 = icmp eq i32 %42, 2
%44 = load double, double* %2
%45 = fcmp ole double %44, 3.100000e-01
%46 = select i1 %43, i1 %45, i1 false
%47 = load double, double* %3
%48 = fcmp ole double %47, 5.000000e+04
%49 = select i1 %46, i1 %48, i1 false
br i1 %49, label %63, label %50
50: ; preds = %41
%51 = fcmp ogt double %44, 3.100000e-01
%52 = select i1 %43, i1 %51, i1 false
%53 = select i1 %52, i1 %48, i1 false
br i1 %53, label %63, label %54
54: ; preds = %50
%55 = fcmp ole double %44, 3.900000e-01
%56 = select i1 %43, i1 %55, i1 false
%57 = fcmp ogt double %47, 5.000000e+04
%58 = select i1 %56, i1 %57, i1 false
br i1 %58, label %63, label %59
59: ; preds = %54
%60 = fcmp ogt double %44, 3.900000e-01
%61 = select i1 %43, i1 %60, i1 false
%62 = select i1 %61, i1 %57, i1 false
br i1 %62, label %63, label %66
63: ; preds = %59, %54, %50, %41
%64 = phi i8* [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), %41 ], [ getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0), %50 ], [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), %54 ], [ getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0), %59 ]
%65 = call i32 @printf(i8* dereferenceable(1) %64)
br label %66
66: ; preds = %63, %59
%67 = load i32, i32* %1
%68 = icmp eq i32 %67, 3
%69 = load double, double* %2
%70 = fcmp ole double %69, 3.100000e-01
%71 = select i1 %68, i1 %70, i1 false
%72 = load double, double* %3
%73 = fcmp ole double %72, 5.000000e+04
%74 = select i1 %71, i1 %73, i1 false
br i1 %74, label %88, label %75
75: ; preds = %66
%76 = fcmp ogt double %69, 3.100000e-01
%77 = select i1 %68, i1 %76, i1 false
%78 = select i1 %77, i1 %73, i1 false
br i1 %78, label %88, label %79
79: ; preds = %75
%80 = fcmp ole double %69, 3.900000e-01
%81 = select i1 %68, i1 %80, i1 false
%82 = fcmp ogt double %72, 5.000000e+04
%83 = select i1 %81, i1 %82, i1 false
br i1 %83, label %88, label %84
84: ; preds = %79
%85 = fcmp ogt double %69, 3.900000e-01
%86 = select i1 %68, i1 %85, i1 false
%87 = select i1 %86, i1 %82, i1 false
br i1 %87, label %88, label %91
88: ; preds = %84, %79, %75, %66
%89 = phi i8* [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), %66 ], [ getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0), %75 ], [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), %79 ], [ getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0), %84 ]
%90 = call i32 @printf(i8* dereferenceable(1) %89)
br label %91
91: ; preds = %88, %84
%92 = load i32, i32* %1
%93 = icmp eq i32 %92, 4
%94 = load double, double* %2
%95 = fcmp ole double %94, 3.100000e-01
%96 = select i1 %93, i1 %95, i1 false
%97 = load double, double* %3
%98 = fcmp ole double %97, 5.000000e+04
%99 = select i1 %96, i1 %98, i1 false
br i1 %99, label %113, label %100
100: ; preds = %91
%101 = fcmp ogt double %94, 3.100000e-01
%102 = select i1 %93, i1 %101, i1 false
%103 = select i1 %102, i1 %98, i1 false
br i1 %103, label %113, label %104
104: ; preds = %100
%105 = fcmp ole double %94, 3.900000e-01
%106 = select i1 %93, i1 %105, i1 false
%107 = fcmp ogt double %97, 5.000000e+04
%108 = select i1 %106, i1 %107, i1 false
br i1 %108, label %113, label %109
109: ; preds = %104
%110 = fcmp ogt double %94, 3.900000e-01
%111 = select i1 %93, i1 %110, i1 false
%112 = select i1 %111, i1 %107, i1 false
br i1 %112, label %113, label %116
113: ; preds = %109, %104, %100, %91
%114 = phi i8* [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), %91 ], [ getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0), %100 ], [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), %104 ], [ getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0), %109 ]
%115 = call i32 @printf(i8* dereferenceable(1) %114)
br label %116
116: ; preds = %113, %109
ret i32 0
}