#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 *);
int main(void) {
  float officeChair, fileCab, desk, bookcase, subtotal, total;
  float subtot1, subtot2, subtot3, subtot4;
  int orderInput;
  printf("\nCSCE 1030.001\n");
  printf("Homework #3\n");
  printf("Alan Hodgson\n");
  printf("ajh0213\n");
  printf("alanhodgson@my.unt.edu\n\n");
  officeChair = 59.99;
  fileCab = 29.99;
  desk = 99.99;
  bookcase = 44.99;
  printf("Welcome to the online office store!!\n\n");
menu:
  printf("1:\tOffice Chairs\t$59.99 each\n");
  printf("2:\tFile Cabinets\t$29.99 each\n");
  printf("3:\tDesks        \t$99.99 each\n");
  printf("4:\tBookcases    \t$44.99 each\n");
  printf("5:\tCheckout\n");
  printf("Enter the number of the product you wish to purchase: ");
  scanf("%d", &orderInput);
  if (orderInput > 0 && orderInput < 6) {
    switch (orderInput) {
    case 1: {
      int p = 0, i;
      printf("Enter the number of Office Chairs to purchase: ");
      scanf("%d", &p);
      for (i = 0; i < p; i++) {
        subtotal += officeChair;
        subtot1 += officeChair;
      }
      printf("Current subtotal: %.02f\n\n", subtotal);
      goto menu;
    }
    case 2: {
      int p = 0, i;
      printf("Enter the number of File Cabinets to purchase: ");
      scanf("%d", &p);
      for (i = 0; i < p; i++) {
        subtotal += fileCab;
        subtot2 += fileCab;
      }
      printf("Current subtotal: %.02f\n\n", subtotal);
      goto menu;
    }
    case 3: {
      int p = 0, i;
      printf("Enter the number of Desks to purchase: ");
      scanf("%d", &p);
      for (i = 0; i < p; i++) {
        subtotal += desk;
        subtot3 += desk;
      }
      printf("Current subtotal: %.02f\n\n", subtotal);
      goto menu;
    }
    case 4: {
      int p = 0, i;
      printf("Enter the number of Bookcases to purchase: ");
      scanf("%d", &p);
      for (i = 0; i < p; i++) {
        subtotal += bookcase;
        subtot4 += bookcase;
      }
      printf("Current subtotal: %.02f\n\n", subtotal);
      goto menu;
    }
    default: {
      printf("\n**************************************\n");
      break;
    }
    }
  } else {
    printf("\nInvalid Input! Returning to the menu\n\n");
    goto menu;
  }
  printf("\nThank you for purchasing from the online store!!\n");
  printf("\nSubtotal for Office Chairs: %.02f", subtot1);
  printf("\nSubtotal for File Cabinets: %.02f", subtot2);
  printf("\nSubtotal for Desks: %.02f", subtot3);
  printf("\nSubtotal for Bookcases: %.02f\n", subtot4);
  printf("\nGrand Subtotal is: $%.02f\n", subtotal);
  if (subtotal > 500) {
    printf("Discount Added: - 10%%\n");
    subtotal -= (subtotal * .10);
  } else {
    subtotal = subtotal;
  }
  total = subtotal + (subtotal * .0825) + 25.00;
  printf("Tax rate: + 8.25%%\n");
  printf("Shipping cost: + $25\n");
  printf("\nGRAND TOTAL(tax and shipping included): $%.02f\n\n", total);
  printf("\n**************************************\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xe8f(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe7e(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe6d(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe5c(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5e(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x30(%rbp)
jle    146b <main+0x34b>
cmpl   $0x6,-0x30(%rbp)
jge    146b <main+0x34b>
mov    -0x30(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0x3,%eax
ja     1458 <main+0x338>
mov    -0x58(%rbp),%rax
lea    0xde1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x34(%rbp)
lea    0xf0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
lea    -0x34(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    12bc <main+0x19c>
movss  -0x8(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1284 <main+0x164>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xed7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
movl   $0x0,-0x3c(%rbp)
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7c(%rip),%rdi
lea    -0x3c(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    133c <main+0x21c>
movss  -0xc(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1304 <main+0x1e4>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe57(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
movl   $0x0,-0x44(%rbp)
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdfc(%rip),%rdi
lea    -0x44(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    13bc <main+0x29c>
movss  -0x10(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1384 <main+0x264>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
movl   $0x0,-0x4c(%rbp)
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd7c(%rip),%rdi
lea    -0x4c(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    143c <main+0x31c>
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
addss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1404 <main+0x2e4>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd57(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    147e <main+0x35e>
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b7 <main+0x97>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe29(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe35(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe41(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe45(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
movss  0xb04(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    156a <main+0x44a>
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xac4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1574 <main+0x454>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xa9a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xa82(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdcd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xc5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0x10ee(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f1(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f1(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f2(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ee(%rip),%rdi
call   1030 <puts@plt>
lea    0x10fa(%rip),%rdi
call   1030 <puts@plt>
lea    0x114e(%rip),%r12
lea    0x1164(%rip),%r13
lea    0x117a(%rip),%rbx
lea    0xe8e(%rip),%rbp
lea    0xebe(%rip),%r14
lea    0x24(%rsp),%r15
jmp    11bc <main+0x8c>
lea    0x116a(%rip),%rdi
call   1030 <puts@plt>
lea    0x10de(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ef(%rip),%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    0x24(%rsp),%eax
lea    -0x1(%rax),%ecx
cmp    $0x4,%ecx
ja     11b0 <main+0x80>
cmp    $0x4,%eax
jne    1310 <main+0x1e0>
movl   $0x0,0xc(%rsp)
lea    0xee7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    1264 <main+0x134>
lea    -0x1(%rcx),%edx
mov    %ecx,%eax
and    $0x7,%eax
cmp    $0x7,%edx
jae    1272 <main+0x142>
movss  0x8(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0xd9e(%rip),%xmm2
jmp    12d5 <main+0x1a5>
movss  0x8(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
jmp    12ed <main+0x1bd>
and    $0xfffffff8,%ecx
movss  0x8(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0xd77(%rip),%xmm2
nopl   0x0(%rax)
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
add    $0xfffffff8,%ecx
jne    1290 <main+0x160>
test   %eax,%eax
je     12ed <main+0x1bd>
nopl   0x0(%rax)
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
add    $0xffffffff,%eax
jne    12e0 <main+0x1b0>
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0x8(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xd96(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    11bc <main+0x8c>
cmp    $0x3,%eax
je     13e2 <main+0x2b2>
cmp    $0x2,%eax
je     14a8 <main+0x378>
cmp    $0x1,%eax
jne    15ad <main+0x47d>
movl   $0x0,0xc(%rsp)
lea    0xd30(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    1568 <main+0x438>
lea    -0x1(%rcx),%edx
mov    %ecx,%eax
and    $0x7,%eax
cmp    $0x7,%edx
movss  0x8(%rsp),%xmm0
movss  0x1c(%rsp),%xmm1
movss  0xc93(%rip),%xmm2
jb     13c5 <main+0x295>
and    $0xfffffff8,%ecx
xchg   %ax,%ax
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
add    $0xfffffff8,%ecx
jne    1380 <main+0x250>
test   %eax,%eax
je     1574 <main+0x444>
nopl   (%rax)
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
add    $0xffffffff,%eax
jne    13d0 <main+0x2a0>
jmp    1574 <main+0x444>
movl   $0x0,0xc(%rsp)
lea    0xcf3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    157f <main+0x44f>
lea    -0x1(%rcx),%edx
mov    %ecx,%eax
and    $0x7,%eax
cmp    $0x7,%edx
movss  0x8(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
movss  0xbd4(%rip),%xmm2
jb     1485 <main+0x355>
and    $0xfffffff8,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
add    $0xfffffff8,%ecx
jne    1440 <main+0x310>
test   %eax,%eax
je     149d <main+0x36d>
nopl   0x0(%rax)
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
add    $0xffffffff,%eax
jne    1490 <main+0x360>
movss  %xmm1,0x20(%rsp)
jmp    12f3 <main+0x1c3>
movl   $0x0,0xc(%rsp)
lea    0xbfd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ecx
test   %ecx,%ecx
jle    1596 <main+0x466>
lea    -0x1(%rcx),%edx
mov    %ecx,%eax
and    $0x7,%eax
cmp    $0x7,%edx
movss  0x8(%rsp),%xmm0
movss  0x18(%rsp),%xmm1
movss  0xb12(%rip),%xmm2
jb     1545 <main+0x415>
and    $0xfffffff8,%ecx
nopl   0x0(%rax,%rax,1)
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
add    $0xfffffff8,%ecx
jne    1500 <main+0x3d0>
test   %eax,%eax
je     155d <main+0x42d>
nopl   0x0(%rax)
addss  %xmm2,%xmm0
addss  %xmm2,%xmm1
add    $0xffffffff,%eax
jne    1550 <main+0x420>
movss  %xmm1,0x18(%rsp)
jmp    12f3 <main+0x1c3>
movss  0x8(%rsp),%xmm0
movss  0x1c(%rsp),%xmm1
movss  %xmm1,0x1c(%rsp)
jmp    12f3 <main+0x1c3>
movss  0x8(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
movss  %xmm1,0x20(%rsp)
jmp    12f3 <main+0x1c3>
movss  0x8(%rsp),%xmm0
movss  0x18(%rsp),%xmm1
movss  %xmm1,0x18(%rsp)
jmp    12f3 <main+0x1c3>
lea    0xddb(%rip),%rdi
call   1030 <puts@plt>
lea    0xd88(%rip),%rdi
call   1030 <puts@plt>
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb62(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb6d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb78(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb7b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb83(%rip),%rdi
movsd  %xmm0,0x10(%rsp)
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
ucomiss 0x9c0(%rip),%xmm0
jbe    1683 <main+0x553>
lea    0xb7c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x9b0(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
jmp    1689 <main+0x559>
movsd  0x10(%rsp),%xmm1
movsd  0x98f(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
addsd  0x987(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
lea    0xb3b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xcba(%rip),%rdi
call   1030 <puts@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb2b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xcab(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"\0ACSCE 1030.001\0A\00"
@.str.1 = [13 x i8] c"Homework\0A\00"
@.str.2 = [14 x i8] c"Alan Hodgson\0A\00"
@.str.3 = [9 x i8] c"ajh0213\0A\00"
@.str.4 = [25 x i8] c"alanhodgson@my.unt.edu\0A\0A\00"
@.str.5 = [39 x i8] c"Welcome to the online office store!!\0A\0A\00"
@.str.6 = [30 x i8] c"1:\09Office Chairs\09$59.99 each\0A\00"
@.str.7 = [30 x i8] c"2:\09File Cabinets\09$29.99 each\0A\00"
@.str.8 = [30 x i8] c"3:\09Desks \09$99.99 each\0A\00"
@.str.9 = [30 x i8] c"4:\09Bookcases \09$44.99 each\0A\00"
@.str.10 = [13 x i8] c"5:\09Checkout\0A\00"
@.str.11 = [55 x i8] c"Enter the number of the product you wish to purchase: \00"
@.str.12 = [3 x i8] c"%d\00"
@.str.13 = [48 x i8] c"Enter the number of Office Chairs to purchase: \00"
@.str.14 = [26 x i8] c"Current subtotal: %.02f\0A\0A\00"
@.str.15 = [48 x i8] c"Enter the number of File Cabinets to purchase: \00"
@.str.16 = [40 x i8] c"Enter the number of Desks to purchase: \00"
@.str.17 = [44 x i8] c"Enter the number of Bookcases to purchase: \00"
@.str.18 = [41 x i8] c"\0A**************************************\0A\00"
@.str.19 = [40 x i8] c"\0AInvalid Input! Returning to the menu\0A\0A\00"
@.str.20 = [51 x i8] c"\0AThank you for purchasing from the online store!!\0A\00"
@.str.21 = [35 x i8] c"\0ASubtotal for Office Chairs: %.02f\00"
@.str.22 = [35 x i8] c"\0ASubtotal for File Cabinets: %.02f\00"
@.str.23 = [27 x i8] c"\0ASubtotal for Desks: %.02f\00"
@.str.24 = [32 x i8] c"\0ASubtotal for Bookcases: %.02f\0A\00"
@.str.25 = [28 x i8] c"\0AGrand Subtotal is: $%.02f\0A\00"
@.str.26 = [24 x i8] c"Discount Added: - 10%%\0A\00"
@.str.27 = [20 x i8] c"Tax rate: + 8.25%%\0A\00"
@.str.28 = [22 x i8] c"Shipping cost: + $25\0A\00"
@.str.29 = [50 x i8] c"\0AGRAND TOTAL(tax and shipping included): $%.02f\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 0, i32* %1
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
store float 0x404DFEB860000000, float* %2
store float 0x403DFD70A0000000, float* %3
store float 0x4058FF5C20000000, float* %4
store float 0x40467EB860000000, float* %5
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0))
br label %27
27: ; preds = %129, %122, %101, %80, %59, %0
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.11, i64 0, i64 0))
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %12)
%35 = load i32, i32* %12
%36 = icmp sgt i32 %35, 0
br i1 %36, label %37, label %129
37: ; preds = %27
%38 = load i32, i32* %12
%39 = icmp slt i32 %38, 6
br i1 %39, label %40, label %129
40: ; preds = %37
%41 = load i32, i32* %12
switch i32 %41, label %126 [
i32 1, label %42
i32 2, label %63
i32 3, label %84
i32 4, label %105
]
42: ; preds = %40
store i32 0, i32* %13
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
%44 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %13)
store i32 0, i32* %14
br label %45
45: ; preds = %56, %42
%46 = load i32, i32* %14
%47 = load i32, i32* %13
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %59
49: ; preds = %45
%50 = load float, float* %2
%51 = load float, float* %6
%52 = fadd float %51, %50
store float %52, float* %6
%53 = load float, float* %2
%54 = load float, float* %8
%55 = fadd float %54, %53
store float %55, float* %8
br label %56
56: ; preds = %49
%57 = load i32, i32* %14
%58 = add nsw i32 %57, 1
store i32 %58, i32* %14
br label %45
59: ; preds = %45
%60 = load float, float* %6
%61 = fpext float %60 to double
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), double %61)
br label %27
63: ; preds = %40
store i32 0, i32* %15
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.15, i64 0, i64 0))
%65 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %15)
store i32 0, i32* %16
br label %66
66: ; preds = %77, %63
%67 = load i32, i32* %16
%68 = load i32, i32* %15
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %80
70: ; preds = %66
%71 = load float, float* %3
%72 = load float, float* %6
%73 = fadd float %72, %71
store float %73, float* %6
%74 = load float, float* %3
%75 = load float, float* %9
%76 = fadd float %75, %74
store float %76, float* %9
br label %77
77: ; preds = %70
%78 = load i32, i32* %16
%79 = add nsw i32 %78, 1
store i32 %79, i32* %16
br label %66
80: ; preds = %66
%81 = load float, float* %6
%82 = fpext float %81 to double
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), double %82)
br label %27
84: ; preds = %40
store i32 0, i32* %17
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
%86 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %17)
store i32 0, i32* %18
br label %87
87: ; preds = %98, %84
%88 = load i32, i32* %18
%89 = load i32, i32* %17
%90 = icmp slt i32 %88, %89
br i1 %90, label %91, label %101
91: ; preds = %87
%92 = load float, float* %4
%93 = load float, float* %6
%94 = fadd float %93, %92
store float %94, float* %6
%95 = load float, float* %4
%96 = load float, float* %10
%97 = fadd float %96, %95
store float %97, float* %10
br label %98
98: ; preds = %91
%99 = load i32, i32* %18
%100 = add nsw i32 %99, 1
store i32 %100, i32* %18
br label %87
101: ; preds = %87
%102 = load float, float* %6
%103 = fpext float %102 to double
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), double %103)
br label %27
105: ; preds = %40
store i32 0, i32* %19
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.17, i64 0, i64 0))
%107 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %19)
store i32 0, i32* %20
br label %108
108: ; preds = %119, %105
%109 = load i32, i32* %20
%110 = load i32, i32* %19
%111 = icmp slt i32 %109, %110
br i1 %111, label %112, label %122
112: ; preds = %108
%113 = load float, float* %5
%114 = load float, float* %6
%115 = fadd float %114, %113
store float %115, float* %6
%116 = load float, float* %5
%117 = load float, float* %11
%118 = fadd float %117, %116
store float %118, float* %11
br label %119
119: ; preds = %112
%120 = load i32, i32* %20
%121 = add nsw i32 %120, 1
store i32 %121, i32* %20
br label %108
122: ; preds = %108
%123 = load float, float* %6
%124 = fpext float %123 to double
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), double %124)
br label %27
126: ; preds = %40
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.18, i64 0, i64 0))
br label %128
128: ; preds = %126
br label %131
129: ; preds = %37, %27
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
br label %27
131: ; preds = %128
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.20, i64 0, i64 0))
%133 = load float, float* %8
%134 = fpext float %133 to double
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.21, i64 0, i64 0), double %134)
%136 = load float, float* %9
%137 = fpext float %136 to double
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.22, i64 0, i64 0), double %137)
%139 = load float, float* %10
%140 = fpext float %139 to double
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), double %140)
%142 = load float, float* %11
%143 = fpext float %142 to double
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.24, i64 0, i64 0), double %143)
%145 = load float, float* %6
%146 = fpext float %145 to double
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.25, i64 0, i64 0), double %146)
%148 = load float, float* %6
%149 = fcmp ogt float %148, 5.000000e+02
br i1 %149, label %150, label %159
150: ; preds = %131
%151 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.26, i64 0, i64 0))
%152 = load float, float* %6
%153 = fpext float %152 to double
%154 = load float, float* %6
%155 = fpext float %154 to double
%156 = fneg double %153
%157 = call double @llvm.fmuladd.f64(double %156, double 1.000000e-01, double %155)
%158 = fptrunc double %157 to float
store float %158, float* %6
br label %161
159: ; preds = %131
%160 = load float, float* %6
store float %160, float* %6
br label %161
161: ; preds = %159, %150
%162 = load float, float* %6
%163 = fpext float %162 to double
%164 = load float, float* %6
%165 = fpext float %164 to double
%166 = call double @llvm.fmuladd.f64(double %165, double 8.250000e-02, double %163)
%167 = fadd double %166, 2.500000e+01
%168 = fptrunc double %167 to float
store float %168, float* %7
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.27, i64 0, i64 0))
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.28, i64 0, i64 0))
%171 = load float, float* %7
%172 = fpext float %171 to double
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.29, i64 0, i64 0), double %172)
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.18, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.11 = [55 x i8] c"Enter the number of the product you wish to purchase: \00"
@.str.12 = [3 x i8] c"%d\00"
@.str.13 = [48 x i8] c"Enter the number of Office Chairs to purchase: \00"
@.str.14 = [26 x i8] c"Current subtotal: %.02f\0A\0A\00"
@.str.15 = [48 x i8] c"Enter the number of File Cabinets to purchase: \00"
@.str.16 = [40 x i8] c"Enter the number of Desks to purchase: \00"
@.str.17 = [44 x i8] c"Enter the number of Bookcases to purchase: \00"
@.str.21 = [35 x i8] c"\0ASubtotal for Office Chairs: %.02f\00"
@.str.22 = [35 x i8] c"\0ASubtotal for File Cabinets: %.02f\00"
@.str.23 = [27 x i8] c"\0ASubtotal for Desks: %.02f\00"
@.str.24 = [32 x i8] c"\0ASubtotal for Bookcases: %.02f\0A\00"
@.str.25 = [28 x i8] c"\0AGrand Subtotal is: $%.02f\0A\00"
@.str.26 = [24 x i8] c"Discount Added: - 10%%\0A\00"
@.str.27 = [20 x i8] c"Tax rate: + 8.25%%\0A\00"
@.str.29 = [50 x i8] c"\0AGRAND TOTAL(tax and shipping included): $%.02f\0A\0A\00"
@str = [15 x i8] c"\0ACSCE 1030.001\00"
@str.30 = [12 x i8] c"Homework\00"
@str.31 = [13 x i8] c"Alan Hodgson\00"
@str.32 = [8 x i8] c"ajh0213\00"
@str.33 = [24 x i8] c"alanhodgson@my.unt.edu\0A\00"
@str.34 = [38 x i8] c"Welcome to the online office store!!\0A\00"
@str.35 = [29 x i8] c"1:\09Office Chairs\09$59.99 each\00"
@str.36 = [29 x i8] c"2:\09File Cabinets\09$29.99 each\00"
@str.37 = [29 x i8] c"3:\09Desks \09$99.99 each\00"
@str.38 = [29 x i8] c"4:\09Bookcases \09$44.99 each\00"
@str.39 = [12 x i8] c"5:\09Checkout\00"
@str.40 = [39 x i8] c"\0AInvalid Input! Returning to the menu\0A\00"
@str.42 = [50 x i8] c"\0AThank you for purchasing from the online store!!\00"
@str.43 = [21 x i8] c"Shipping cost: + $25\00"
@str.44 = [40 x i8] c"\0A**************************************\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.30, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.31, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.32, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.33, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.34, i64 0, i64 0))
%13 = bitcast i32* %5 to i8*
%14 = bitcast i32* %4 to i8*
%15 = bitcast i32* %3 to i8*
%16 = bitcast i32* %2 to i8*
br label %17
17: ; preds = %0, %94
%18 = phi float [ undef, %0 ], [ %95, %94 ]
%19 = phi float [ undef, %0 ], [ %96, %94 ]
%20 = phi float [ undef, %0 ], [ %25, %94 ]
%21 = phi float [ undef, %0 ], [ %30, %94 ]
%22 = phi float [ undef, %0 ], [ %34, %94 ]
br label %23
23: ; preds = %17, %146
%24 = phi float [ %18, %17 ], [ %147, %146 ]
%25 = phi float [ %20, %17 ], [ %148, %146 ]
%26 = phi float [ %21, %17 ], [ %30, %146 ]
%27 = phi float [ %22, %17 ], [ %34, %146 ]
br label %28
28: ; preds = %23, %198
%29 = phi float [ %24, %23 ], [ %199, %198 ]
%30 = phi float [ %26, %23 ], [ %200, %198 ]
%31 = phi float [ %27, %23 ], [ %34, %198 ]
br label %32
32: ; preds = %28, %250
%33 = phi float [ %251, %250 ], [ %29, %28 ]
%34 = phi float [ %252, %250 ], [ %31, %28 ]
br label %35
35: ; preds = %32, %269
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.35, i64 0, i64 0))
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.36, i64 0, i64 0))
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.37, i64 0, i64 0))
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.38, i64 0, i64 0))
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.39, i64 0, i64 0))
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.11, i64 0, i64 0))
%42 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %1)
%43 = load i32, i32* %1
%44 = add i32 %43, -1
%45 = icmp ult i32 %44, 5
br i1 %45, label %46, label %269
46: ; preds = %35
switch i32 %43, label %255 [
i32 1, label %47
i32 2, label %99
i32 3, label %151
i32 4, label %203
]
47: ; preds = %46
store i32 0, i32* %2
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %2)
%50 = load i32, i32* %2
%51 = icmp sgt i32 %50, 0
br i1 %51, label %52, label %94
52: ; preds = %47
%53 = add i32 %50, -1
%54 = and i32 %50, 7
%55 = icmp ult i32 %53, 7
br i1 %55, label %80, label %56
56: ; preds = %52
%57 = and i32 %50, -8
br label %58
58: ; preds = %58, %56
%59 = phi float [ %19, %56 ], [ %77, %58 ]
%60 = phi float [ %33, %56 ], [ %76, %58 ]
%61 = phi i32 [ 0, %56 ], [ %78, %58 ]
%62 = fadd float %60, 0x404DFEB860000000
%63 = fadd float %59, 0x404DFEB860000000
%64 = fadd float %62, 0x404DFEB860000000
%65 = fadd float %63, 0x404DFEB860000000
%66 = fadd float %64, 0x404DFEB860000000
%67 = fadd float %65, 0x404DFEB860000000
%68 = fadd float %66, 0x404DFEB860000000
%69 = fadd float %67, 0x404DFEB860000000
%70 = fadd float %68, 0x404DFEB860000000
%71 = fadd float %69, 0x404DFEB860000000
%72 = fadd float %70, 0x404DFEB860000000
%73 = fadd float %71, 0x404DFEB860000000
%74 = fadd float %72, 0x404DFEB860000000
%75 = fadd float %73, 0x404DFEB860000000
%76 = fadd float %74, 0x404DFEB860000000
%77 = fadd float %75, 0x404DFEB860000000
%78 = add i32 %61, 8
%79 = icmp eq i32 %78, %57
br i1 %79, label %80, label %58
80: ; preds = %58, %52
%81 = phi float [ undef, %52 ], [ %76, %58 ]
%82 = phi float [ undef, %52 ], [ %77, %58 ]
%83 = phi float [ %19, %52 ], [ %77, %58 ]
%84 = phi float [ %33, %52 ], [ %76, %58 ]
%85 = icmp eq i32 %54, 0
br i1 %85, label %94, label %86
86: ; preds = %80, %86
%87 = phi float [ %91, %86 ], [ %83, %80 ]
%88 = phi float [ %90, %86 ], [ %84, %80 ]
%89 = phi i32 [ %92, %86 ], [ 0, %80 ]
%90 = fadd float %88, 0x404DFEB860000000
%91 = fadd float %87, 0x404DFEB860000000
%92 = add i32 %89, 1
%93 = icmp eq i32 %92, %54
br i1 %93, label %94, label %86
94: ; preds = %80, %86, %47
%95 = phi float [ %33, %47 ], [ %81, %80 ], [ %90, %86 ]
%96 = phi float [ %19, %47 ], [ %82, %80 ], [ %91, %86 ]
%97 = fpext float %95 to double
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), double %97)
br label %17
99: ; preds = %46
store i32 0, i32* %3
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.15, i64 0, i64 0))
%101 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %3)
%102 = load i32, i32* %3
%103 = icmp sgt i32 %102, 0
br i1 %103, label %104, label %146
104: ; preds = %99
%105 = add i32 %102, -1
%106 = and i32 %102, 7
%107 = icmp ult i32 %105, 7
br i1 %107, label %132, label %108
108: ; preds = %104
%109 = and i32 %102, -8
br label %110
110: ; preds = %110, %108
%111 = phi float [ %25, %108 ], [ %129, %110 ]
%112 = phi float [ %33, %108 ], [ %128, %110 ]
%113 = phi i32 [ 0, %108 ], [ %130, %110 ]
%114 = fadd float %112, 0x403DFD70A0000000
%115 = fadd float %111, 0x403DFD70A0000000
%116 = fadd float %114, 0x403DFD70A0000000
%117 = fadd float %115, 0x403DFD70A0000000
%118 = fadd float %116, 0x403DFD70A0000000
%119 = fadd float %117, 0x403DFD70A0000000
%120 = fadd float %118, 0x403DFD70A0000000
%121 = fadd float %119, 0x403DFD70A0000000
%122 = fadd float %120, 0x403DFD70A0000000
%123 = fadd float %121, 0x403DFD70A0000000
%124 = fadd float %122, 0x403DFD70A0000000
%125 = fadd float %123, 0x403DFD70A0000000
%126 = fadd float %124, 0x403DFD70A0000000
%127 = fadd float %125, 0x403DFD70A0000000
%128 = fadd float %126, 0x403DFD70A0000000
%129 = fadd float %127, 0x403DFD70A0000000
%130 = add i32 %113, 8
%131 = icmp eq i32 %130, %109
br i1 %131, label %132, label %110
132: ; preds = %110, %104
%133 = phi float [ undef, %104 ], [ %128, %110 ]
%134 = phi float [ undef, %104 ], [ %129, %110 ]
%135 = phi float [ %25, %104 ], [ %129, %110 ]
%136 = phi float [ %33, %104 ], [ %128, %110 ]
%137 = icmp eq i32 %106, 0
br i1 %137, label %146, label %138
138: ; preds = %132, %138
%139 = phi float [ %143, %138 ], [ %135, %132 ]
%140 = phi float [ %142, %138 ], [ %136, %132 ]
%141 = phi i32 [ %144, %138 ], [ 0, %132 ]
%142 = fadd float %140, 0x403DFD70A0000000
%143 = fadd float %139, 0x403DFD70A0000000
%144 = add i32 %141, 1
%145 = icmp eq i32 %144, %106
br i1 %145, label %146, label %138
146: ; preds = %132, %138, %99
%147 = phi float [ %33, %99 ], [ %133, %132 ], [ %142, %138 ]
%148 = phi float [ %25, %99 ], [ %134, %132 ], [ %143, %138 ]
%149 = fpext float %147 to double
%150 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), double %149)
br label %23
151: ; preds = %46
store i32 0, i32* %4
%152 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.16, i64 0, i64 0))
%153 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %4)
%154 = load i32, i32* %4
%155 = icmp sgt i32 %154, 0
br i1 %155, label %156, label %198
156: ; preds = %151
%157 = add i32 %154, -1
%158 = and i32 %154, 7
%159 = icmp ult i32 %157, 7
br i1 %159, label %184, label %160
160: ; preds = %156
%161 = and i32 %154, -8
br label %162
162: ; preds = %162, %160
%163 = phi float [ %30, %160 ], [ %181, %162 ]
%164 = phi float [ %33, %160 ], [ %180, %162 ]
%165 = phi i32 [ 0, %160 ], [ %182, %162 ]
%166 = fadd float %164, 0x4058FF5C20000000
%167 = fadd float %163, 0x4058FF5C20000000
%168 = fadd float %166, 0x4058FF5C20000000
%169 = fadd float %167, 0x4058FF5C20000000
%170 = fadd float %168, 0x4058FF5C20000000
%171 = fadd float %169, 0x4058FF5C20000000
%172 = fadd float %170, 0x4058FF5C20000000
%173 = fadd float %171, 0x4058FF5C20000000
%174 = fadd float %172, 0x4058FF5C20000000
%175 = fadd float %173, 0x4058FF5C20000000
%176 = fadd float %174, 0x4058FF5C20000000
%177 = fadd float %175, 0x4058FF5C20000000
%178 = fadd float %176, 0x4058FF5C20000000
%179 = fadd float %177, 0x4058FF5C20000000
%180 = fadd float %178, 0x4058FF5C20000000
%181 = fadd float %179, 0x4058FF5C20000000
%182 = add i32 %165, 8
%183 = icmp eq i32 %182, %161
br i1 %183, label %184, label %162
184: ; preds = %162, %156
%185 = phi float [ undef, %156 ], [ %180, %162 ]
%186 = phi float [ undef, %156 ], [ %181, %162 ]
%187 = phi float [ %30, %156 ], [ %181, %162 ]
%188 = phi float [ %33, %156 ], [ %180, %162 ]
%189 = icmp eq i32 %158, 0
br i1 %189, label %198, label %190
190: ; preds = %184, %190
%191 = phi float [ %195, %190 ], [ %187, %184 ]
%192 = phi float [ %194, %190 ], [ %188, %184 ]
%193 = phi i32 [ %196, %190 ], [ 0, %184 ]
%194 = fadd float %192, 0x4058FF5C20000000
%195 = fadd float %191, 0x4058FF5C20000000
%196 = add i32 %193, 1
%197 = icmp eq i32 %196, %158
br i1 %197, label %198, label %190
198: ; preds = %184, %190, %151
%199 = phi float [ %33, %151 ], [ %185, %184 ], [ %194, %190 ]
%200 = phi float [ %30, %151 ], [ %186, %184 ], [ %195, %190 ]
%201 = fpext float %199 to double
%202 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), double %201)
br label %28
203: ; preds = %46
store i32 0, i32* %5
%204 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.17, i64 0, i64 0))
%205 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %5)
%206 = load i32, i32* %5
%207 = icmp sgt i32 %206, 0
br i1 %207, label %208, label %250
208: ; preds = %203
%209 = add i32 %206, -1
%210 = and i32 %206, 7
%211 = icmp ult i32 %209, 7
br i1 %211, label %236, label %212
212: ; preds = %208
%213 = and i32 %206, -8
br label %214
214: ; preds = %214, %212
%215 = phi float [ %34, %212 ], [ %233, %214 ]
%216 = phi float [ %33, %212 ], [ %232, %214 ]
%217 = phi i32 [ 0, %212 ], [ %234, %214 ]
%218 = fadd float %216, 0x40467EB860000000
%219 = fadd float %215, 0x40467EB860000000
%220 = fadd float %218, 0x40467EB860000000
%221 = fadd float %219, 0x40467EB860000000
%222 = fadd float %220, 0x40467EB860000000
%223 = fadd float %221, 0x40467EB860000000
%224 = fadd float %222, 0x40467EB860000000
%225 = fadd float %223, 0x40467EB860000000
%226 = fadd float %224, 0x40467EB860000000
%227 = fadd float %225, 0x40467EB860000000
%228 = fadd float %226, 0x40467EB860000000
%229 = fadd float %227, 0x40467EB860000000
%230 = fadd float %228, 0x40467EB860000000
%231 = fadd float %229, 0x40467EB860000000
%232 = fadd float %230, 0x40467EB860000000
%233 = fadd float %231, 0x40467EB860000000
%234 = add i32 %217, 8
%235 = icmp eq i32 %234, %213
br i1 %235, label %236, label %214
236: ; preds = %214, %208
%237 = phi float [ undef, %208 ], [ %232, %214 ]
%238 = phi float [ undef, %208 ], [ %233, %214 ]
%239 = phi float [ %34, %208 ], [ %233, %214 ]
%240 = phi float [ %33, %208 ], [ %232, %214 ]
%241 = icmp eq i32 %210, 0
br i1 %241, label %250, label %242
242: ; preds = %236, %242
%243 = phi float [ %247, %242 ], [ %239, %236 ]
%244 = phi float [ %246, %242 ], [ %240, %236 ]
%245 = phi i32 [ %248, %242 ], [ 0, %236 ]
%246 = fadd float %244, 0x40467EB860000000
%247 = fadd float %243, 0x40467EB860000000
%248 = add i32 %245, 1
%249 = icmp eq i32 %248, %210
br i1 %249, label %250, label %242
250: ; preds = %236, %242, %203
%251 = phi float [ %33, %203 ], [ %237, %236 ], [ %246, %242 ]
%252 = phi float [ %34, %203 ], [ %238, %236 ], [ %247, %242 ]
%253 = fpext float %251 to double
%254 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), double %253)
br label %32
255: ; preds = %46
%256 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.44, i64 0, i64 0))
%257 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.42, i64 0, i64 0))
%258 = fpext float %19 to double
%259 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.21, i64 0, i64 0), double %258)
%260 = fpext float %25 to double
%261 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.22, i64 0, i64 0), double %260)
%262 = fpext float %30 to double
%263 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.23, i64 0, i64 0), double %262)
%264 = fpext float %34 to double
%265 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.24, i64 0, i64 0), double %264)
%266 = fpext float %33 to double
%267 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.25, i64 0, i64 0), double %266)
%268 = fcmp ogt float %33, 5.000000e+02
br i1 %268, label %271, label %277
269: ; preds = %35
%270 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.40, i64 0, i64 0))
br label %35
271: ; preds = %255
%272 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.26, i64 0, i64 0))
%273 = fneg double %266
%274 = call double @llvm.fmuladd.f64(double %273, double 1.000000e-01, double %266)
%275 = fptrunc double %274 to float
%276 = fpext float %275 to double
br label %277
277: ; preds = %255, %271
%278 = phi double [ %266, %255 ], [ %276, %271 ]
%279 = call double @llvm.fmuladd.f64(double %278, double 8.250000e-02, double %278)
%280 = fadd double %279, 2.500000e+01
%281 = fptrunc double %280 to float
%282 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.27, i64 0, i64 0))
%283 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.43, i64 0, i64 0))
%284 = fpext float %281 to double
%285 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.29, i64 0, i64 0), double %284)
%286 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.44, i64 0, i64 0))
ret i32 0
}