#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stdin;
char *strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(void) {
  char answer;
  int employeecount;
  int silly;
  char result[52 + 1];
  float TAXRATE;
  FILE *reportFile;
  reportFile = fopen("report.txt", "wt");
  if (reportFile == NULL) {
    printf(" File open request has failed \n");
    printf(" Terminating application \n");
    fflush(stdin);
    getchar();
    exit(-100);
  }
  float payratetotal, hourstotal, grosstotal, taxtotal, finaltotal;
  float payrateavg, hoursavg, grossavg, taxavg, finalavg;
  char DIVIDER[86 + 1] = "     "
                         "====================================================="
                         "===========================\n";
  struct employees {
    char firstname[10 + 1];
    char lastname[20 + 1];
    float payrate;
    float hours;
    float gross;
    float tax;
    float net;
  } emp[9];
  TAXRATE = 0.15;
  employeecount = 0;
  payratetotal = hourstotal = grosstotal = taxtotal = finaltotal = payrateavg =
      hoursavg = grossavg = taxavg = finalavg = 0;
  do {
    if (employeecount == 10) {
      break;
    }
    printf("Enter employee's first name ");
    scanf("%s", emp[employeecount].firstname);
    printf("Enter employee's last name ");
    scanf("%s", emp[employeecount].lastname);
    printf("Enter hourly pay rate ");
    scanf("%f", &(emp[employeecount].payrate));
    printf("Enter hours worked this pay period");
    scanf("%f", &(emp[employeecount].hours));
    if (emp[employeecount].hours <= 40)
      emp[employeecount].gross =
          emp[employeecount].hours * emp[employeecount].payrate;
    else
      emp[employeecount].gross =
          40 * emp[employeecount].payrate +
          1.5 * emp[employeecount].payrate * (emp[employeecount].hours - 40);
    emp[employeecount].tax = emp[employeecount].gross * TAXRATE;
    emp[employeecount].net = emp[employeecount].gross - emp[employeecount].tax;
    employeecount++;
    printf(" Do you have another employee (Y / N) ?");
    fflush(stdin);
    scanf("%c", &answer);
  } while (answer == 'Y' || answer == 'y');
  printf("     Name                   Pay Rate     Hours     Gross Pay     Tax "
         "Paid     Net Pay\n");
  fprintf(reportFile, "     Name                   Pay Rate     Hours     "
                      "Gross Pay     Tax Paid     Net Pay\n");
  fprintf(reportFile, DIVIDER);
  for (silly = 0; silly < employeecount; silly++) {
    strcpy(result, emp[silly].lastname);
    strcat(strcat(result, ", "), emp[silly].firstname);
    printf("     %-23s%7.2f%11.2f%14.2f%13.2f%12.2f\n", result,
           emp[silly].payrate, emp[silly].hours, emp[silly].gross,
           emp[silly].tax, emp[silly].net);
    fprintf(reportFile, "     %-23s%7.2f%11.2f%14.2f%13.2f%12.2f\n", result,
            emp[silly].payrate, emp[silly].hours, emp[silly].gross,
            emp[silly].tax, emp[silly].net);
    hourstotal += emp[silly].hours;
    payratetotal += emp[silly].payrate;
    grosstotal += emp[silly].gross;
    taxtotal += emp[silly].tax;
    finaltotal += emp[silly].net;
  }
  payrateavg = payratetotal / employeecount;
  hoursavg = hourstotal / employeecount;
  grossavg = grosstotal / employeecount;
  taxavg = taxtotal / employeecount;
  finalavg = finaltotal / employeecount;
  printf("\n");
  printf("     %-23s%7.2f%11.2f%14.2f%13.2f%12.2f\n", "Totals", payratetotal,
         hourstotal, grosstotal, taxtotal, finaltotal);
  printf("     %-23s%7.2f%11.2f%14.2f%13.2f%12.2f\n", "Averages", payrateavg,
         hoursavg, grossavg, taxavg, finalavg);
  fprintf(reportFile, "\n");
  fprintf(reportFile, "     %-23s%7.2f%11.2f%14.2f%13.2f%12.2f\n", "Totals",
          payratetotal, hourstotal, grosstotal, taxtotal, finaltotal);
  fprintf(reportFile, "     %-23s%7.2f%11.2f%14.2f%13.2f%12.2f\n", "Averages",
          payrateavg, hoursavg, grossavg, taxavg, finalavg);
  fflush(stdin);
  getchar();
  fclose(reportFile);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe47(%rip),%rdi
lea    0xe4b(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
jne    121f <main+0x6f>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0xffffff9c,%edi
call   10d0 <exit@plt>
lea    -0xe0(%rbp),%rdi
lea    0xf63(%rip),%rsi
mov    $0x57,%edx
call   1080 <memcpy@plt>
movss  0xdc1(%rip),%xmm0
movss  %xmm0,-0x54(%rbp)
movl   $0x0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x84(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x7c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x74(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
cmpl   $0xa,-0xc(%rbp)
jne    12b0 <main+0x100>
jmp    154e <main+0x39e>
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movslq -0xc(%rbp),%rax
lea    -0x2c0(%rbp),%rsi
imul   $0x34,%rax,%rax
add    %rax,%rsi
lea    0xd9f(%rip),%rdi
call   10a0 <scanf@plt>
lea    0xd96(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movslq -0xc(%rbp),%rax
lea    -0x2c0(%rbp),%rsi
imul   $0x34,%rax,%rax
add    %rax,%rsi
add    $0xb,%rsi
lea    0xd6f(%rip),%rdi
call   10a0 <scanf@plt>
lea    0xd82(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movslq -0xc(%rbp),%rax
lea    -0x2c0(%rbp),%rsi
imul   $0x34,%rax,%rax
add    %rax,%rsi
add    $0x20,%rsi
lea    0xd75(%rip),%rdi
call   10a0 <scanf@plt>
lea    0xd6c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movslq -0xc(%rbp),%rax
lea    -0x2c0(%rbp),%rsi
imul   $0x34,%rax,%rax
add    %rax,%rsi
add    $0x24,%rsi
lea    0xd45(%rip),%rdi
call   10a0 <scanf@plt>
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0xc7e(%rip),%xmm0
ucomiss 0x24(%rax),%xmm0
jb     13da <main+0x22a>
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x24(%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
mulss  0x20(%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  %xmm0,0x28(%rax)
jmp    146e <main+0x2be>
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0xc10(%rip),%xmm0
mulss  0x20(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x20(%rax),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xbe8(%rip),%xmm0
mulsd  %xmm2,%xmm0
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x24(%rax),%xmm2
movss  0xbc1(%rip),%xmm3
subss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  %xmm0,0x28(%rax)
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x28(%rax),%xmm0
mulss  -0x54(%rbp),%xmm0
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  %xmm0,0x2c(%rax)
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x28(%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
subss  0x2c(%rax),%xmm0
movslq -0xc(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  %xmm0,0x30(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xbdc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2ae4(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
lea    0xbe8(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   10a0 <scanf@plt>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x59,%ecx
mov    %al,-0x2c1(%rbp)
je     1540 <main+0x390>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
sete   %al
mov    %al,-0x2c1(%rbp)
mov    -0x2c1(%rbp),%al
test   $0x1,%al
jne    12a1 <main+0xf1>
lea    0xba8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x60(%rbp),%rdi
lea    0xb96(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x60(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    17c5 <main+0x615>
lea    -0x50(%rbp),%rdi
movslq -0x10(%rbp),%rax
lea    -0x2c0(%rbp),%rsi
imul   $0x34,%rax,%rax
add    %rax,%rsi
add    $0xb,%rsi
call   1030 <strcpy@plt>
lea    -0x50(%rbp),%rdi
lea    0xb97(%rip),%rsi
call   10c0 <strcat@plt>
mov    %rax,%rdi
movslq -0x10(%rbp),%rax
lea    -0x2c0(%rbp),%rsi
imul   $0x34,%rax,%rax
add    %rax,%rsi
call   10c0 <strcat@plt>
lea    -0x50(%rbp),%rsi
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x20(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x24(%rax),%xmm1
cvtss2sd %xmm1,%xmm1
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x28(%rax),%xmm2
cvtss2sd %xmm2,%xmm2
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x2c(%rax),%xmm3
cvtss2sd %xmm3,%xmm3
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x30(%rax),%xmm4
cvtss2sd %xmm4,%xmm4
lea    0xae9(%rip),%rdi
mov    $0x5,%al
call   1050 <printf@plt>
mov    -0x60(%rbp),%rdi
lea    -0x50(%rbp),%rdx
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x20(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x24(%rax),%xmm1
cvtss2sd %xmm1,%xmm1
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x28(%rax),%xmm2
cvtss2sd %xmm2,%xmm2
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x2c(%rax),%xmm3
cvtss2sd %xmm3,%xmm3
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x30(%rax),%xmm4
cvtss2sd %xmm4,%xmm4
lea    0xa4c(%rip),%rsi
mov    $0x5,%al
call   1070 <fprintf@plt>
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x24(%rax),%xmm0
addss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x20(%rax),%xmm0
addss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x28(%rax),%xmm0
addss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x6c(%rbp)
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x2c(%rax),%xmm0
addss  -0x70(%rbp),%xmm0
movss  %xmm0,-0x70(%rbp)
movslq -0x10(%rbp),%rcx
lea    -0x2c0(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movss  0x30(%rax),%xmm0
addss  -0x74(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1587 <main+0x3d7>
movss  -0x64(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x68(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x7c(%rbp)
movss  -0x6c(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x70(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x74(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x88(%rbp)
ff
lea    0x80b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movss  -0x64(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x68(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x6c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x70(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x74(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
lea    0x8eb(%rip),%rdi
lea    0x90d(%rip),%rsi
mov    $0x5,%al
call   1050 <printf@plt>
movss  -0x78(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x7c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x80(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x84(%rbp),%xmm3
ff
cvtss2sd %xmm3,%xmm3
movss  -0x88(%rbp),%xmm4
ff
cvtss2sd %xmm4,%xmm4
lea    0x8a3(%rip),%rdi
lea    0x8cc(%rip),%rsi
mov    $0x5,%al
call   1050 <printf@plt>
mov    -0x60(%rbp),%rdi
lea    0x76f(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x60(%rbp),%rdi
movss  -0x64(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x68(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x6c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x70(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x74(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
lea    0x84b(%rip),%rsi
lea    0x86d(%rip),%rdx
mov    $0x5,%al
call   1070 <fprintf@plt>
mov    -0x60(%rbp),%rdi
movss  -0x78(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x7c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x80(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x84(%rbp),%xmm3
ff
cvtss2sd %xmm3,%xmm3
movss  -0x88(%rbp),%xmm4
ff
cvtss2sd %xmm4,%xmm4
lea    0x7ff(%rip),%rsi
lea    0x828(%rip),%rdx
mov    $0x5,%al
call   1070 <fprintf@plt>
mov    0x267b(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    -0x60(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x2d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x328,%rsp
lea    0xe10(%rip),%rdi
lea    0xe14(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,0xa8(%rsp)
test   %rax,%rax
je     1737 <main+0x547>
movaps 0x1004(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xfe5(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xfc6(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xfa7(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xf88(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movabs $0xa3d3d3d3d3d3d,%rax
mov    %rax,0xff(%rsp)
lea    0xdba(%rip),%rbx
lea    0xde9(%rip),%rbp
lea    0xe30(%rip),%r12
lea    0xf(%rsp),%r13
xor    %r14d,%r14d
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xd6f(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    (%rsp,%r14,1),%rsi
add    $0x150,%rsi
mov    %rbx,%rdi
call   10d0 <scanf@plt>
lea    0xd6e(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    (%rsp,%r14,1),%rsi
add    $0x15b,%rsi
mov    %rbx,%rdi
call   10d0 <scanf@plt>
lea    0xd69(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    (%rsp,%r14,1),%rsi
add    $0x170,%rsi
mov    %rbp,%rdi
call   10d0 <scanf@plt>
lea    0xd62(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    (%rsp,%r14,1),%rsi
add    $0x174,%rsi
mov    %rbp,%rdi
call   10d0 <scanf@plt>
movss  0x170(%rsp,%r14,1),%xmm1
movss  0x174(%rsp,%r14,1),%xmm0
movss  0xcb0(%rip),%xmm3
ucomiss %xmm0,%xmm3
jae    1390 <main+0x1a0>
xorps  %xmm2,%xmm2
cvtss2sd %xmm1,%xmm2
mulss  %xmm3,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xca4(%rip),%xmm2
addss  0xc90(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
jmp    1394 <main+0x1a4>
cs nopw 0x0(%rax,%rax,1)
mulss  %xmm1,%xmm0
movss  %xmm0,0x178(%rsp,%r14,1)
movaps %xmm0,%xmm1
mulss  0xc5f(%rip),%xmm1
movss  %xmm1,0x17c(%rsp,%r14,1)
subss  %xmm1,%xmm0
movss  %xmm0,0x180(%rsp,%r14,1)
add    $0x1,%r15
lea    0xcd3(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    0x2c0e(%rip),%rax
mov    (%rax),%edi
call   10c0 <fflush@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   10d0 <scanf@plt>
movzbl 0xf(%rsp),%eax
and    $0xdf,%al
cmp    $0x59,%al
jne    140b <main+0x21b>
lea    0x34(%r14),%rax
cmp    $0x1d4,%r14
mov    %rax,%r14
jne    12b0 <main+0xc0>
lea    0xd4b(%rip),%rdi
call   1050 <puts@plt>
lea    0xcac(%rip),%rdi
mov    $0x56,%esi
mov    $0x1,%edx
mov    0xa8(%rsp),%r13
mov    %r13,%rcx
call   1110 <fwrite@plt>
lea    0xb0(%rsp),%rsi
mov    %r13,%rdi
xor    %eax,%eax
call   10b0 <fprintf@plt>
xorps  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
lea    0x150(%rsp),%rbx
lea    0x110(%rsp),%r12
lea    0xcbc(%rip),%r14
mov    %r15,%rbp
nopl   0x0(%rax,%rax,1)
movss  %xmm2,0x10(%rsp)
movaps %xmm1,0x20(%rsp)
lea    0xb(%rbx),%rsi
mov    %r12,%rdi
call   1040 <strcpy@plt>
mov    %r12,%rdi
call   1070 <strlen@plt>
movw   $0x202c,0x110(%rsp,%rax,1)
movb   $0x0,0x112(%rsp,%rax,1)
mov    %r12,%rdi
mov    %rbx,%rsi
call   10f0 <strcat@plt>
movss  0x20(%rbx),%xmm0
movss  0x24(%rbx),%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movss  0x28(%rbx),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x2c(%rbx),%xmm3
cvtss2sd %xmm3,%xmm3
movss  0x30(%rbx),%xmm4
cvtss2sd %xmm4,%xmm4
mov    %r14,%rdi
mov    %r12,%rsi
mov    $0x5,%al
call   1080 <printf@plt>
movss  0x20(%rbx),%xmm0
movss  0x24(%rbx),%xmm1
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movss  0x28(%rbx),%xmm2
cvtss2sd %xmm2,%xmm2
movss  0x2c(%rbx),%xmm3
cvtss2sd %xmm3,%xmm3
movss  0x30(%rbx),%xmm4
cvtss2sd %xmm4,%xmm4
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    $0x5,%al
call   10b0 <fprintf@plt>
movss  0x10(%rsp),%xmm2
movaps 0x20(%rsp),%xmm1
addss  0x20(%rbx),%xmm2
movups 0x24(%rbx),%xmm0
addps  %xmm0,%xmm1
add    $0x34,%rbx
add    $0xffffffffffffffff,%rbp
jne    1470 <main+0x280>
xorps  %xmm0,%xmm0
cvtsi2ss %r15d,%xmm0
movapd %xmm2,%xmm3
divss  %xmm0,%xmm3
movss  %xmm3,0x18(%rsp)
movaps %xmm1,%xmm3
divss  %xmm0,%xmm3
movaps %xmm3,0x90(%rsp)
movaps %xmm1,%xmm3
shufps $0x55,%xmm1,%xmm3
movaps %xmm3,0x70(%rsp)
divss  %xmm0,%xmm3
movaps %xmm3,0x80(%rsp)
movaps %xmm1,%xmm3
unpckhpd %xmm1,%xmm3
movaps %xmm3,0x60(%rsp)
divss  %xmm0,%xmm3
movaps %xmm3,0x40(%rsp)
movaps %xmm1,%xmm3
shufps $0xff,%xmm1,%xmm3
movaps %xmm3,0x50(%rsp)
divss  %xmm0,%xmm3
movaps %xmm3,0x30(%rsp)
mov    $0xa,%edi
movaps %xmm1,0x20(%rsp)
movss  %xmm2,0x10(%rsp)
call   1030 <putchar@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movaps 0x20(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x20(%rsp)
movaps 0x70(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
movsd  %xmm2,0x70(%rsp)
movaps 0x60(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
movsd  %xmm3,0x60(%rsp)
movaps 0x50(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
movsd  %xmm4,0x50(%rsp)
lea    0xb0d(%rip),%rbx
lea    0xb2f(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x5,%al
call   1080 <printf@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
movaps 0x90(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x90(%rsp)
movaps 0x80(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
movsd  %xmm2,0x80(%rsp)
movaps 0x40(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
movsd  %xmm3,0x40(%rsp)
movaps 0x30(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
movsd  %xmm4,0x30(%rsp)
lea    0xaca(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x5,%al
call   1080 <printf@plt>
mov    $0xa,%edi
mov    %r13,%rsi
call   1090 <fputc@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
movsd  0x10(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x70(%rsp),%xmm2
movsd  0x60(%rsp),%xmm3
movsd  0x50(%rsp),%xmm4
mov    $0x5,%al
call   10b0 <fprintf@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
movsd  0x18(%rsp),%xmm0
movsd  0x90(%rsp),%xmm1
movsd  0x80(%rsp),%xmm2
movsd  0x40(%rsp),%xmm3
movsd  0x30(%rsp),%xmm4
mov    $0x5,%al
call   10b0 <fprintf@plt>
mov    0x28db(%rip),%rax
mov    (%rax),%edi
call   10c0 <fflush@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    %r13,%rdi
call   1060 <fclose@plt>
xor    %eax,%eax
add    $0x328,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa75(%rip),%rdi
call   1050 <puts@plt>
lea    0xa88(%rip),%rdi
call   1050 <puts@plt>
mov    0x2892(%rip),%rax
mov    (%rax),%edi
call   10c0 <fflush@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    $0xffffff9c,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
%struct.employees = type { [11 x i8], [21 x i8], float, float, float, float, float }
@.str = [11 x i8] c"report.txt\00"
@.str.1 = [3 x i8] c"wt\00"
@.str.2 = [32 x i8] c" File open request has failed \0A\00"
@.str.3 = [27 x i8] c" Terminating application \0A\00"
@stdin = global i32 0
@__const.main.DIVIDER = [87 x i8] c" ================================================================================\0A\00"
@.str.4 = [29 x i8] c"Enter employee's first name \00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [28 x i8] c"Enter employee's last name \00"
@.str.7 = [23 x i8] c"Enter hourly pay rate \00"
@.str.8 = [3 x i8] c"%f\00"
@.str.9 = [35 x i8] c"Enter hours worked this pay period\00"
@.str.10 = [40 x i8] c" Do you have another employee (Y / N) ?\00"
@.str.11 = [3 x i8] c"%c\00"
@.str.12 = [87 x i8] c" Name Pay Rate Hours Gross Pay Tax Paid Net Pay\0A\00"
@.str.13 = [3 x i8] c", \00"
@.str.14 = [41 x i8] c" %-23s%7.2f%11.2f%14.2f%13.2f%12.2f\0A\00"
@.str.15 = [2 x i8] c"\0A\00"
@.str.16 = [7 x i8] c"Totals\00"
@.str.17 = [9 x i8] c"Averages\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca [53 x i8]
%6 = alloca float
%7 = alloca i32*
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca [87 x i8]
%19 = alloca [9 x %struct.employees]
store i32 0, i32* %1
%20 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %20, i32** %7
%21 = load i32*, i32** %7
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %30
23: ; preds = %0
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%26 = load i32, i32* @stdin
%27 = call i32 @fflush(i32 %26)
%28 = call i32 (...) @getchar()
%29 = call i32 @exit(i32 -100)
unreachable
30: ; preds = %0
%31 = bitcast [87 x i8]* %18 to i8*
store float 0x3FC3333340000000, float* %6
store i32 0, i32* %3
store float 0.000000e+00, float* %17
store float 0.000000e+00, float* %16
store float 0.000000e+00, float* %15
store float 0.000000e+00, float* %14
store float 0.000000e+00, float* %13
store float 0.000000e+00, float* %12
store float 0.000000e+00, float* %11
store float 0.000000e+00, float* %10
store float 0.000000e+00, float* %9
store float 0.000000e+00, float* %8
br label %32
32: ; preds = %156, %30
%33 = load i32, i32* %3
%34 = icmp eq i32 %33, 10
br i1 %34, label %35, label %36
35: ; preds = %32
br label %158
36: ; preds = %32
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%38 = load i32, i32* %3
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %39
%41 = getelementptr inbounds %struct.employees, %struct.employees* %40, i32 0, i32 0
%42 = getelementptr inbounds [11 x i8], [11 x i8]* %41, i64 0, i64 0
%43 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %42)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%45 = load i32, i32* %3
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %46
%48 = getelementptr inbounds %struct.employees, %struct.employees* %47, i32 0, i32 1
%49 = getelementptr inbounds [21 x i8], [21 x i8]* %48, i64 0, i64 0
%50 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %49)
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%52 = load i32, i32* %3
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %53
%55 = getelementptr inbounds %struct.employees, %struct.employees* %54, i32 0, i32 2
%56 = bitcast float* %55 to i8*
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %56)
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
%59 = load i32, i32* %3
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %60
%62 = getelementptr inbounds %struct.employees, %struct.employees* %61, i32 0, i32 3
%63 = bitcast float* %62 to i8*
%64 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %63)
%65 = load i32, i32* %3
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %66
%68 = getelementptr inbounds %struct.employees, %struct.employees* %67, i32 0, i32 3
%69 = load float, float* %68
%70 = fcmp ole float %69, 4.000000e+01
br i1 %70, label %71, label %87
71: ; preds = %36
%72 = load i32, i32* %3
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %73
%75 = getelementptr inbounds %struct.employees, %struct.employees* %74, i32 0, i32 3
%76 = load float, float* %75
%77 = load i32, i32* %3
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %78
%80 = getelementptr inbounds %struct.employees, %struct.employees* %79, i32 0, i32 2
%81 = load float, float* %80
%82 = fmul float %76, %81
%83 = load i32, i32* %3
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %84
%86 = getelementptr inbounds %struct.employees, %struct.employees* %85, i32 0, i32 4
store float %82, float* %86
br label %115
87: ; preds = %36
%88 = load i32, i32* %3
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %89
%91 = getelementptr inbounds %struct.employees, %struct.employees* %90, i32 0, i32 2
%92 = load float, float* %91
%93 = fmul float 4.000000e+01, %92
%94 = fpext float %93 to double
%95 = load i32, i32* %3
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %96
%98 = getelementptr inbounds %struct.employees, %struct.employees* %97, i32 0, i32 2
%99 = load float, float* %98
%100 = fpext float %99 to double
%101 = fmul double 1.500000e+00, %100
%102 = load i32, i32* %3
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %103
%105 = getelementptr inbounds %struct.employees, %struct.employees* %104, i32 0, i32 3
%106 = load float, float* %105
%107 = fsub float %106, 4.000000e+01
%108 = fpext float %107 to double
%109 = call double @llvm.fmuladd.f64(double %101, double %108, double %94)
%110 = fptrunc double %109 to float
%111 = load i32, i32* %3
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %112
%114 = getelementptr inbounds %struct.employees, %struct.employees* %113, i32 0, i32 4
store float %110, float* %114
br label %115
115: ; preds = %87, %71
%116 = load i32, i32* %3
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %117
%119 = getelementptr inbounds %struct.employees, %struct.employees* %118, i32 0, i32 4
%120 = load float, float* %119
%121 = load float, float* %6
%122 = fmul float %120, %121
%123 = load i32, i32* %3
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %124
%126 = getelementptr inbounds %struct.employees, %struct.employees* %125, i32 0, i32 5
store float %122, float* %126
%127 = load i32, i32* %3
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %128
%130 = getelementptr inbounds %struct.employees, %struct.employees* %129, i32 0, i32 4
%131 = load float, float* %130
%132 = load i32, i32* %3
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %133
%135 = getelementptr inbounds %struct.employees, %struct.employees* %134, i32 0, i32 5
%136 = load float, float* %135
%137 = fsub float %131, %136
%138 = load i32, i32* %3
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %139
%141 = getelementptr inbounds %struct.employees, %struct.employees* %140, i32 0, i32 6
store float %137, float* %141
%142 = load i32, i32* %3
%143 = add nsw i32 %142, 1
store i32 %143, i32* %3
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%145 = load i32, i32* @stdin
%146 = call i32 @fflush(i32 %145)
%147 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %2)
br label %148
148: ; preds = %115
%149 = load i8, i8* %2
%150 = sext i8 %149 to i32
%151 = icmp eq i32 %150, 89
br i1 %151, label %156, label %152
152: ; preds = %148
%153 = load i8, i8* %2
%154 = sext i8 %153 to i32
%155 = icmp eq i32 %154, 121
br label %156
156: ; preds = %152, %148
%157 = phi i1 [ true, %148 ], [ %155, %152 ]
br i1 %157, label %32, label %158
158: ; preds = %156, %35
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.12, i64 0, i64 0))
%160 = load i32*, i32** %7
%161 = call i32 (i32*, i8*, ...) @fprintf(i32* %160, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.12, i64 0, i64 0))
%162 = load i32*, i32** %7
%163 = getelementptr inbounds [87 x i8], [87 x i8]* %18, i64 0, i64 0
%164 = call i32 (i32*, i8*, ...) @fprintf(i32* %162, i8* %163)
store i32 0, i32* %4
br label %165
165: ; preds = %285, %158
%166 = load i32, i32* %4
%167 = load i32, i32* %3
%168 = icmp slt i32 %166, %167
br i1 %168, label %169, label %288
169: ; preds = %165
%170 = getelementptr inbounds [53 x i8], [53 x i8]* %5, i64 0, i64 0
%171 = load i32, i32* %4
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %172
%174 = getelementptr inbounds %struct.employees, %struct.employees* %173, i32 0, i32 1
%175 = getelementptr inbounds [21 x i8], [21 x i8]* %174, i64 0, i64 0
%176 = call i32 @strcpy(i8* %170, i8* %175)
%177 = getelementptr inbounds [53 x i8], [53 x i8]* %5, i64 0, i64 0
%178 = call i8* @strcat(i8* %177, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%179 = load i32, i32* %4
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %180
%182 = getelementptr inbounds %struct.employees, %struct.employees* %181, i32 0, i32 0
%183 = getelementptr inbounds [11 x i8], [11 x i8]* %182, i64 0, i64 0
%184 = call i8* @strcat(i8* %178, i8* %183)
%185 = getelementptr inbounds [53 x i8], [53 x i8]* %5, i64 0, i64 0
%186 = load i32, i32* %4
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %187
%189 = getelementptr inbounds %struct.employees, %struct.employees* %188, i32 0, i32 2
%190 = load float, float* %189
%191 = fpext float %190 to double
%192 = load i32, i32* %4
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %193
%195 = getelementptr inbounds %struct.employees, %struct.employees* %194, i32 0, i32 3
%196 = load float, float* %195
%197 = fpext float %196 to double
%198 = load i32, i32* %4
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %199
%201 = getelementptr inbounds %struct.employees, %struct.employees* %200, i32 0, i32 4
%202 = load float, float* %201
%203 = fpext float %202 to double
%204 = load i32, i32* %4
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %205
%207 = getelementptr inbounds %struct.employees, %struct.employees* %206, i32 0, i32 5
%208 = load float, float* %207
%209 = fpext float %208 to double
%210 = load i32, i32* %4
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %211
%213 = getelementptr inbounds %struct.employees, %struct.employees* %212, i32 0, i32 6
%214 = load float, float* %213
%215 = fpext float %214 to double
%216 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* %185, double %191, double %197, double %203, double %209, double %215)
%217 = load i32*, i32** %7
%218 = getelementptr inbounds [53 x i8], [53 x i8]* %5, i64 0, i64 0
%219 = load i32, i32* %4
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %220
%222 = getelementptr inbounds %struct.employees, %struct.employees* %221, i32 0, i32 2
%223 = load float, float* %222
%224 = fpext float %223 to double
%225 = load i32, i32* %4
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %226
%228 = getelementptr inbounds %struct.employees, %struct.employees* %227, i32 0, i32 3
%229 = load float, float* %228
%230 = fpext float %229 to double
%231 = load i32, i32* %4
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %232
%234 = getelementptr inbounds %struct.employees, %struct.employees* %233, i32 0, i32 4
%235 = load float, float* %234
%236 = fpext float %235 to double
%237 = load i32, i32* %4
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %238
%240 = getelementptr inbounds %struct.employees, %struct.employees* %239, i32 0, i32 5
%241 = load float, float* %240
%242 = fpext float %241 to double
%243 = load i32, i32* %4
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %244
%246 = getelementptr inbounds %struct.employees, %struct.employees* %245, i32 0, i32 6
%247 = load float, float* %246
%248 = fpext float %247 to double
%249 = call i32 (i32*, i8*, ...) @fprintf(i32* %217, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* %218, double %224, double %230, double %236, double %242, double %248)
%250 = load i32, i32* %4
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %251
%253 = getelementptr inbounds %struct.employees, %struct.employees* %252, i32 0, i32 3
%254 = load float, float* %253
%255 = load float, float* %9
%256 = fadd float %255, %254
store float %256, float* %9
%257 = load i32, i32* %4
%258 = sext i32 %257 to i64
%259 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %258
%260 = getelementptr inbounds %struct.employees, %struct.employees* %259, i32 0, i32 2
%261 = load float, float* %260
%262 = load float, float* %8
%263 = fadd float %262, %261
store float %263, float* %8
%264 = load i32, i32* %4
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %265
%267 = getelementptr inbounds %struct.employees, %struct.employees* %266, i32 0, i32 4
%268 = load float, float* %267
%269 = load float, float* %10
%270 = fadd float %269, %268
store float %270, float* %10
%271 = load i32, i32* %4
%272 = sext i32 %271 to i64
%273 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %272
%274 = getelementptr inbounds %struct.employees, %struct.employees* %273, i32 0, i32 5
%275 = load float, float* %274
%276 = load float, float* %11
%277 = fadd float %276, %275
store float %277, float* %11
%278 = load i32, i32* %4
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %19, i64 0, i64 %279
%281 = getelementptr inbounds %struct.employees, %struct.employees* %280, i32 0, i32 6
%282 = load float, float* %281
%283 = load float, float* %12
%284 = fadd float %283, %282
store float %284, float* %12
br label %285
285: ; preds = %169
%286 = load i32, i32* %4
%287 = add nsw i32 %286, 1
store i32 %287, i32* %4
br label %165
288: ; preds = %165
%289 = load float, float* %8
%290 = load i32, i32* %3
%291 = sitofp i32 %290 to float
%292 = fdiv float %289, %291
store float %292, float* %13
%293 = load float, float* %9
%294 = load i32, i32* %3
%295 = sitofp i32 %294 to float
%296 = fdiv float %293, %295
store float %296, float* %14
%297 = load float, float* %10
%298 = load i32, i32* %3
%299 = sitofp i32 %298 to float
%300 = fdiv float %297, %299
store float %300, float* %15
%301 = load float, float* %11
%302 = load i32, i32* %3
%303 = sitofp i32 %302 to float
%304 = fdiv float %301, %303
store float %304, float* %16
%305 = load float, float* %12
%306 = load i32, i32* %3
%307 = sitofp i32 %306 to float
%308 = fdiv float %305, %307
store float %308, float* %17
%309 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%310 = load float, float* %8
%311 = fpext float %310 to double
%312 = load float, float* %9
%313 = fpext float %312 to double
%314 = load float, float* %10
%315 = fpext float %314 to double
%316 = load float, float* %11
%317 = fpext float %316 to double
%318 = load float, float* %12
%319 = fpext float %318 to double
%320 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), double %311, double %313, double %315, double %317, double %319)
%321 = load float, float* %13
%322 = fpext float %321 to double
%323 = load float, float* %14
%324 = fpext float %323 to double
%325 = load float, float* %15
%326 = fpext float %325 to double
%327 = load float, float* %16
%328 = fpext float %327 to double
%329 = load float, float* %17
%330 = fpext float %329 to double
%331 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), double %322, double %324, double %326, double %328, double %330)
%332 = load i32*, i32** %7
%333 = call i32 (i32*, i8*, ...) @fprintf(i32* %332, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%334 = load i32*, i32** %7
%335 = load float, float* %8
%336 = fpext float %335 to double
%337 = load float, float* %9
%338 = fpext float %337 to double
%339 = load float, float* %10
%340 = fpext float %339 to double
%341 = load float, float* %11
%342 = fpext float %341 to double
%343 = load float, float* %12
%344 = fpext float %343 to double
%345 = call i32 (i32*, i8*, ...) @fprintf(i32* %334, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), double %336, double %338, double %340, double %342, double %344)
%346 = load i32*, i32** %7
%347 = load float, float* %13
%348 = fpext float %347 to double
%349 = load float, float* %14
%350 = fpext float %349 to double
%351 = load float, float* %15
%352 = fpext float %351 to double
%353 = load float, float* %16
%354 = fpext float %353 to double
%355 = load float, float* %17
%356 = fpext float %355 to double
%357 = call i32 (i32*, i8*, ...) @fprintf(i32* %346, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), double %348, double %350, double %352, double %354, double %356)
%358 = load i32, i32* @stdin
%359 = call i32 @fflush(i32 %358)
%360 = call i32 (...) @getchar()
%361 = load i32*, i32** %7
%362 = call i32 @fclose(i32* %361)
ret i32 0
}

LLVM IR (-O2):
%struct.employees = type { [11 x i8], [21 x i8], float, float, float, float, float }
@.str = [11 x i8] c"report.txt\00"
@.str.1 = [3 x i8] c"wt\00"
@stdin = global i32 0
@__const.main.DIVIDER = [87 x i8] c" ================================================================================\0A\00"
@.str.4 = [29 x i8] c"Enter employee's first name \00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [28 x i8] c"Enter employee's last name \00"
@.str.7 = [23 x i8] c"Enter hourly pay rate \00"
@.str.8 = [3 x i8] c"%f\00"
@.str.9 = [35 x i8] c"Enter hours worked this pay period\00"
@.str.10 = [40 x i8] c" Do you have another employee (Y / N) ?\00"
@.str.11 = [3 x i8] c"%c\00"
@.str.12 = [87 x i8] c" Name Pay Rate Hours Gross Pay Tax Paid Net Pay\0A\00"
@.str.13 = [3 x i8] c", \00"
@.str.14 = [41 x i8] c" %-23s%7.2f%11.2f%14.2f%13.2f%12.2f\0A\00"
@.str.16 = [7 x i8] c"Totals\00"
@.str.17 = [9 x i8] c"Averages\00"
@str = [86 x i8] c" Name Pay Rate Hours Gross Pay Tax Paid Net Pay\00"
@str.18 = [31 x i8] c" File open request has failed \00"
@str.19 = [26 x i8] c" Terminating application \00"
define i32 @main() {
%1 = alloca i8
%2 = alloca [53 x i8]
%3 = alloca [87 x i8]
%4 = alloca [9 x %struct.employees]
%5 = getelementptr inbounds [53 x i8], [53 x i8]* %2, i64 0, i64 0
%6 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %15
8: ; preds = %0
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.19, i64 0, i64 0))
%11 = load i32, i32* @stdin
%12 = tail call i32 @fflush(i32 %11)
%13 = tail call i32 (...) @getchar()
%14 = tail call i32 @exit(i32 -100)
unreachable
15: ; preds = %0
%16 = getelementptr inbounds [87 x i8], [87 x i8]* %3, i64 0, i64 0
%17 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 0, i32 0, i64 0
br label %18
18: ; preds = %15, %48
%19 = phi i64 [ 0, %15 ], [ %55, %48 ]
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%21 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %19, i32 0, i64 0
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %21)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%24 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %19, i32 1, i64 0
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %24)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%27 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %19, i32 2
%28 = bitcast float* %27 to i8*
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %28)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
%31 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %19, i32 3
%32 = bitcast float* %31 to i8*
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %32)
%34 = load float, float* %31
%35 = fcmp ugt float %34, 4.000000e+01
%36 = load float, float* %27
br i1 %35, label %39, label %37
37: ; preds = %18
%38 = fmul float %34, %36
br label %48
39: ; preds = %18
%40 = fmul float %36, 4.000000e+01
%41 = fpext float %40 to double
%42 = fpext float %36 to double
%43 = fmul double %42, 1.500000e+00
%44 = fadd float %34, -4.000000e+01
%45 = fpext float %44 to double
%46 = call double @llvm.fmuladd.f64(double %43, double %45, double %41)
%47 = fptrunc double %46 to float
br label %48
48: ; preds = %39, %37
%49 = phi float [ %47, %39 ], [ %38, %37 ]
%50 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %19, i32 4
store float %49, float* %50
%51 = fmul float %49, 0x3FC3333340000000
%52 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %19, i32 5
store float %51, float* %52
%53 = fsub float %49, %51
%54 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %19, i32 6
store float %53, float* %54
%55 = add nuw nsw i64 %19, 1
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%57 = load i32, i32* @stdin
%58 = call i32 @fflush(i32 %57)
%59 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %1)
%60 = load i8, i8* %1
%61 = and i8 %60, -33
%62 = icmp ne i8 %61, 89
%63 = icmp eq i64 %55, 10
%64 = select i1 %62, i1 true, i1 %63
br i1 %64, label %65, label %18
65: ; preds = %48
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str, i64 0, i64 0))
%67 = call i64 @fwrite(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.12, i64 0, i64 0), i64 86, i64 1, i32* %6)
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %6, i8* %16)
%69 = add nuw i64 %19, 1
%70 = and i64 %69, 4294967295
br label %71
71: ; preds = %65, %71
%72 = phi i64 [ 0, %65 ], [ %113, %71 ]
%73 = phi float [ 0.000000e+00, %65 ], [ %109, %71 ]
%74 = phi <4 x float> [ zeroinitializer, %65 ], [ %112, %71 ]
%75 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %72, i32 1, i64 0
%76 = call i32 @strcpy(i8* %5, i8* %75)
%77 = call i64 @strlen(i8* %5)
%78 = getelementptr [53 x i8], [53 x i8]* %2, i64 0, i64 %77
%79 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %72, i32 0, i64 0
%80 = call i8* @strcat(i8* %5, i8* %79)
%81 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %72, i32 2
%82 = load float, float* %81
%83 = fpext float %82 to double
%84 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %72, i32 3
%85 = load float, float* %84
%86 = fpext float %85 to double
%87 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %72, i32 4
%88 = load float, float* %87
%89 = fpext float %88 to double
%90 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %72, i32 5
%91 = load float, float* %90
%92 = fpext float %91 to double
%93 = getelementptr inbounds [9 x %struct.employees], [9 x %struct.employees]* %4, i64 0, i64 %72, i32 6
%94 = load float, float* %93
%95 = fpext float %94 to double
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* %5, double %83, double %86, double %89, double %92, double %95)
%97 = load float, float* %81
%98 = fpext float %97 to double
%99 = load float, float* %84
%100 = fpext float %99 to double
%101 = load float, float* %87
%102 = fpext float %101 to double
%103 = load float, float* %90
%104 = fpext float %103 to double
%105 = load float, float* %93
%106 = fpext float %105 to double
%107 = call i32 (i32*, i8*, ...) @fprintf(i32* %6, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* %5, double %98, double %100, double %102, double %104, double %106)
%108 = load float, float* %81
%109 = fadd float %73, %108
%110 = bitcast float* %84 to <4 x float>*
%111 = load <4 x float>, <4 x float>* %110
%112 = fadd <4 x float> %74, %111
%113 = add nuw nsw i64 %72, 1
%114 = icmp eq i64 %113, %70
br i1 %114, label %115, label %71
115: ; preds = %71
%116 = trunc i64 %55 to i32
%117 = sitofp i32 %116 to float
%118 = fdiv float %109, %117
%119 = extractelement <4 x float> %112, i64 0
%120 = fdiv float %119, %117
%121 = extractelement <4 x float> %112, i64 1
%122 = fdiv float %121, %117
%123 = extractelement <4 x float> %112, i64 2
%124 = fdiv float %123, %117
%125 = extractelement <4 x float> %112, i64 3
%126 = fdiv float %125, %117
%127 = call i32 @putchar(i32 10)
%128 = fpext float %109 to double
%129 = fpext float %119 to double
%130 = fpext float %121 to double
%131 = fpext float %123 to double
%132 = fpext float %125 to double
%133 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), double %128, double %129, double %130, double %131, double %132)
%134 = fpext float %118 to double
%135 = fpext float %120 to double
%136 = fpext float %122 to double
%137 = fpext float %124 to double
%138 = fpext float %126 to double
%139 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), double %134, double %135, double %136, double %137, double %138)
%140 = call i32 @fputc(i32 10, i32* %6)
%141 = call i32 (i32*, i8*, ...) @fprintf(i32* %6, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), double %128, double %129, double %130, double %131, double %132)
%142 = call i32 (i32*, i8*, ...) @fprintf(i32* %6, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0), double %134, double %135, double %136, double %137, double %138)
%143 = load i32, i32* @stdin
%144 = call i32 @fflush(i32 %143)
%145 = call i32 (...) @getchar()
%146 = call i32 @fclose(i32* %6)
ret i32 0
}