#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *, char *,
                           char *, ...);
void printHeadings(char *outfile) {
  FILE *rank;
  rank = fopen(outfile, "w");
  fprintf(rank, "%33s %10s %32s %20s\n", " ", "Overall", "Home", "Away");
  fprintf(rank,
          "%3s %-20s %2s %2s %2s %4s %4s %7s %7s %8s %2s %2s %4s %4s %4s %2s "
          "%2s %4s %4s\n",
          "Rnk", "Team", "W", "L", "T", "PF", "PA", "RATE", "SOS", "W", "L",
          "T", "PF", "PA", "W", "L", "T", "PF", "PA");
  fprintf(rank,
          "%3s %-20s %2s %2s %2s %4s %4s %7s %7s %8s %2s %2s %4s %4s %4s %2s "
          "%2s %4s %4s\n",
          "---", "----", "-", "-", "-", "--", "--", "------", "------", "-",
          "-", "-", "--", "--", "-", "-", "-", "--", "--");
  fclose(rank);
  return;
}


x86 assembly (clang, -O0):
<printHeadings>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x90,%rsp
mov    %rdi,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xe9d(%rip),%rsi
lea    0xeab(%rip),%rdx
lea    0xea6(%rip),%rcx
lea    0xea7(%rip),%r8
lea    0xea5(%rip),%r9
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xe98(%rip),%rsi
lea    0xee0(%rip),%rdx
lea    0xedd(%rip),%rcx
lea    0xedb(%rip),%r14
lea    0xed6(%rip),%rbx
lea    0xed1(%rip),%r11
lea    0xecc(%rip),%r10
lea    0xec8(%rip),%rax
lea    0xec4(%rip),%r12
lea    0xec2(%rip),%r15
mov    %r14,%r8
mov    %rbx,%r9
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14,0x28(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
mov    %r14,0x50(%rsp)
mov    %rbx,0x58(%rsp)
mov    %r11,0x60(%rsp)
mov    %r10,0x68(%rsp)
mov    %rax,0x70(%rsp)
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xdf7(%rip),%rsi
lea    0xe60(%rip),%rdx
lea    0xe58(%rip),%rcx
lea    0xe54(%rip),%r10
lea    0xe4c(%rip),%rax
lea    0xe41(%rip),%r11
mov    %r10,%r8
mov    %r10,%r9
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %r10,0x30(%rsp)
mov    %r10,0x38(%rsp)
mov    %rax,0x40(%rsp)
mov    %rax,0x48(%rsp)
mov    %r10,0x50(%rsp)
mov    %r10,0x58(%rsp)
mov    %r10,0x60(%rsp)
mov    %rax,0x68(%rsp)
mov    %rax,0x70(%rsp)
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x90,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHeadings>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xec0(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%r12
lea    0xeb3(%rip),%rsi
lea    0xec1(%rip),%rdx
lea    0xebc(%rip),%rcx
lea    0xebd(%rip),%r8
lea    0xebb(%rip),%r9
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
sub    $0x8,%rsp
lea    0xf0c(%rip),%r15
lea    0xf02(%rip),%r11
lea    0xef9(%rip),%r10
lea    0xef0(%rip),%r9
lea    0xee7(%rip),%r8
lea    0xef1(%rip),%rbx
lea    0xee5(%rip),%r13
lea    0xe7a(%rip),%r14
lea    0xec2(%rip),%rdx
lea    0xebf(%rip),%rcx
mov    %r12,%rdi
mov    %r14,%rsi
mov    $0x0,%eax
push   %r15
push   %r11
push   %r10
push   %r9
push   %r8
push   %r15
push   %r11
push   %r10
push   %r9
push   %r8
push   %rbx
push   %r13
push   %r15
push   %r11
push   %r10
call   1040 <fprintf@plt>
add    $0x78,%rsp
lea    0xea5(%rip),%rbx
lea    0xe9f(%rip),%r8
lea    0xe93(%rip),%r10
lea    0xe8f(%rip),%rdx
lea    0xe87(%rip),%rcx
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r8,%r9
mov    $0x0,%eax
push   %rbx
push   %rbx
push   %r8
push   %r8
push   %r8
push   %rbx
push   %rbx
push   %r8
push   %r8
push   %r8
push   %r10
push   %r10
push   %rbx
push   %rbx
push   %r8
call   1040 <fprintf@plt>
add    $0x80,%rsp
mov    %r12,%rdi
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [21 x i8] c"%33s %10s %32s %20s\0A\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [8 x i8] c"Overall\00"
@.str.4 = [5 x i8] c"Home\00"
@.str.5 = [5 x i8] c"Away\00"
@.str.6 = [79 x i8] c"%3s %-20s %2s %2s %2s %4s %4s %7s %7s %8s %2s %2s %4s %4s %4s %2s %2s %4s %4s\0A\00"
@.str.7 = [4 x i8] c"Rnk\00"
@.str.8 = [5 x i8] c"Team\00"
@.str.9 = [2 x i8] c"W\00"
@.str.10 = [2 x i8] c"L\00"
@.str.11 = [2 x i8] c"T\00"
@.str.12 = [3 x i8] c"PF\00"
@.str.13 = [3 x i8] c"PA\00"
@.str.14 = [5 x i8] c"RATE\00"
@.str.15 = [4 x i8] c"SOS\00"
@.str.16 = [4 x i8] c"---\00"
@.str.17 = [5 x i8] c"----\00"
@.str.18 = [2 x i8] c"-\00"
@.str.19 = [3 x i8] c"--\00"
@.str.20 = [7 x i8] c"------\00"
define void @printHeadings(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 (i32*, i8*, i8*, i8*, i8*, i8*, ...) @fprintf(i32* %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%8 = load i32*, i32** %3
%9 = call i32 (i32*, i8*, i8*, i8*, i8*, i8*, ...) @fprintf(i32* %8, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%10 = load i32*, i32** %3
%11 = call i32 (i32*, i8*, i8*, i8*, i8*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
%12 = load i32*, i32** %3
%13 = call i32 @fclose(i32* %12)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [21 x i8] c"%33s %10s %32s %20s\0A\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [8 x i8] c"Overall\00"
@.str.4 = [5 x i8] c"Home\00"
@.str.5 = [5 x i8] c"Away\00"
@.str.6 = [79 x i8] c"%3s %-20s %2s %2s %2s %4s %4s %7s %7s %8s %2s %2s %4s %4s %4s %2s %2s %4s %4s\0A\00"
@.str.7 = [4 x i8] c"Rnk\00"
@.str.8 = [5 x i8] c"Team\00"
@.str.9 = [2 x i8] c"W\00"
@.str.10 = [2 x i8] c"L\00"
@.str.11 = [2 x i8] c"T\00"
@.str.12 = [3 x i8] c"PF\00"
@.str.13 = [3 x i8] c"PA\00"
@.str.14 = [5 x i8] c"RATE\00"
@.str.15 = [4 x i8] c"SOS\00"
@.str.16 = [4 x i8] c"---\00"
@.str.17 = [5 x i8] c"----\00"
@.str.18 = [2 x i8] c"-\00"
@.str.19 = [3 x i8] c"--\00"
@.str.20 = [7 x i8] c"------\00"
define void @printHeadings(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32*, i8*, i8*, i8*, i8*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%4 = tail call i32 (i32*, i8*, i8*, i8*, i8*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%5 = tail call i32 (i32*, i8*, i8*, i8*, i8*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
%6 = tail call i32 @fclose(i32* %2)
ret void
}