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

/* Variables and functions */
int counter;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int,
                           unsigned char *);
int /*<<< orphan*/ *stderr;
void outputWord(FILE *outFile, unsigned char *phrase, uint len) {
  static counter = 0;
  fprintf(outFile, "%9d %9d %s\n", counter, len, phrase);
  fprintf(stderr, "%9d %9d %s\n", counter, len, phrase);
  counter++;
}


x86 assembly (clang, -O0):
<outputWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2f03(%rip),%edx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%rdi
mov    0x2ee0(%rip),%edx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xea2(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ec7(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ebe(%rip)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outputWord>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    0x2f10(%rip),%edx
lea    0xed9(%rip),%r15
mov    %r15,%rsi
mov    %ebx,%ecx
mov    %r14,%r8
call   1030 <fprintf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%rdi
mov    0x2eec(%rip),%edx
mov    %r15,%rsi
mov    %ebx,%ecx
mov    %r14,%r8
call   1030 <fprintf@plt>
addl   $0x1,0x2ed8(%rip)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@outputWord.counter = internal global i32 0
@.str = [12 x i8] c"%9d %9d %s\0A\00"
@stderr = global i32* null
@counter = global i32 0
define void @outputWord(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* @outputWord.counter
%9 = load i32, i32* %6
%10 = load i8*, i8** %5
%11 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i8* %10)
%12 = load i32*, i32** @stderr
%13 = load i32, i32* @outputWord.counter
%14 = load i32, i32* %6
%15 = load i8*, i8** %5
%16 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i8* %15)
%17 = load i32, i32* @outputWord.counter
%18 = add nsw i32 %17, 1
store i32 %18, i32* @outputWord.counter
ret void
}

LLVM IR (-O2):
@outputWord.counter = internal unnamed_addr global i32 0
@.str = [12 x i8] c"%9d %9d %s\0A\00"
@stderr = global i32* null
@counter = global i32 0
define void @outputWord(i32* nocapture %0, i8* %1, i32 %2) {
%4 = load i32, i32* @outputWord.counter
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %2, i8* %1)
%6 = load i32*, i32** @stderr
%7 = load i32, i32* @outputWord.counter
%8 = tail call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %2, i8* %1)
%9 = load i32, i32* @outputWord.counter
%10 = add nsw i32 %9, 1
store i32 %10, i32* @outputWord.counter
ret void
}