void WriteBoard(N, Top, Middle, Bottom) int N;
int *Top, *Middle, *Bottom;
{
  int j;
  move(1, 0);
  WriteLetters();
  WriteLine(N, Top);
  for (j = N - 1; j >= 2; j--)
    WriteLine(j, Middle);
  WriteLine(1, Bottom);
  WriteLetters();
}


x86 assembly (clang, -O0):
<WriteBoard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <move@plt>
mov    $0x0,%al
call   1030 <WriteLetters@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <WriteLine@plt>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x2,-0x24(%rbp)
jl     1199 <WriteBoard+0x69>
mov    -0x24(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <WriteLine@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1173 <WriteBoard+0x43>
mov    -0x20(%rbp),%rsi
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <WriteLine@plt>
mov    $0x0,%al
call   1030 <WriteLetters@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteBoard>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %edi,%ebx
mov    $0x1,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <move@plt>
xor    %eax,%eax
call   1030 <WriteLetters@plt>
mov    %ebx,%edi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <WriteLine@plt>
cmp    $0x3,%ebx
jl     1185 <WriteBoard+0x55>
add    $0x1,%ebx
nopl   0x0(%rax)
lea    -0x2(%rbx),%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <WriteLine@plt>
add    $0xffffffff,%ebx
cmp    $0x3,%ebx
ja     1170 <WriteBoard+0x40>
mov    $0x1,%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <WriteLine@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <WriteLetters@plt>

LLVM IR (-O0):
define void @WriteBoard(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%10 = call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 1, i32 0)
%11 = call i32 (...) @WriteLetters()
%12 = load i32, i32* %5
%13 = load i32*, i32** %6
%14 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @WriteLine to i32 (i32, i32*, ...)*)(i32 %12, i32* %13)
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 1
store i32 %16, i32* %9
br label %17
17: ; preds = %24, %4
%18 = load i32, i32* %9
%19 = icmp sge i32 %18, 2
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = load i32, i32* %9
%22 = load i32*, i32** %7
%23 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @WriteLine to i32 (i32, i32*, ...)*)(i32 %21, i32* %22)
br label %24
24: ; preds = %20
%25 = load i32, i32* %9
%26 = add nsw i32 %25, -1
store i32 %26, i32* %9
br label %17
27: ; preds = %17
%28 = load i32*, i32** %8
%29 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @WriteLine to i32 (i32, i32*, ...)*)(i32 1, i32* %28)
%30 = call i32 (...) @WriteLetters()
ret void
}

LLVM IR (-O2):
define void @WriteBoard(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 1, i32 0)
%6 = tail call i32 (...) @WriteLetters()
%7 = tail call i32 (i32, i32*, ...) bitcast (i32 (...)* @WriteLine to i32 (i32, i32*, ...)*)(i32 %0, i32* %1)
%8 = icmp sgt i32 %0, 2
br i1 %8, label %9, label %14
9: ; preds = %4, %9
%10 = phi i32 [ %11, %9 ], [ %0, %4 ]
%11 = add nsw i32 %10, -1
%12 = tail call i32 (i32, i32*, ...) bitcast (i32 (...)* @WriteLine to i32 (i32, i32*, ...)*)(i32 %11, i32* %2)
%13 = icmp ugt i32 %10, 3
br i1 %13, label %9, label %14
14: ; preds = %9, %4
%15 = tail call i32 (i32, i32*, ...) bitcast (i32 (...)* @WriteLine to i32 (i32, i32*, ...)*)(i32 1, i32* %3)
%16 = tail call i32 (...) @WriteLetters()
ret void
}