#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*/ printCode(int *);
int /*<<< orphan*/ printf(char *, ...);
void showSolution10(int *arr) {
  printf("      %2d\n", arr[2]);
  printf("        \\\n");
  printf("       _%2d  %2d\n", arr[3], arr[4]);
  printf("   _%2d    \\ /\n", arr[1]);
  printf("%2d   |    %2d\n", arr[0], arr[5]);
  printf("    %2d _  /\n", arr[9]);
  printf("     |  %2d _\n", arr[7]);
  printf("    %2d      %2d\n", arr[8], arr[6]);
  printf("\n");
  printCode(arr);
}


x86 assembly (clang, -O0):
<showSolution10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
lea    0xf27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edx
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%edx
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%esi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%edx
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <printCode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showSolution10>:
push   %rbx
mov    %rdi,%rbx
mov    0x8(%rdi),%esi
lea    0xf08(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xf05(%rip),%rdi
call   1050 <puts@plt>
mov    0xc(%rbx),%esi
mov    0x10(%rbx),%edx
lea    0xe92(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x4(%rbx),%esi
lea    0xe93(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%rbx),%esi
mov    0x14(%rbx),%edx
lea    0xe90(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x24(%rbx),%esi
lea    0xe8f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1c(%rbx),%esi
lea    0xe8c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x18(%rbx),%edx
mov    0x20(%rbx),%esi
lea    0xe87(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printCode@plt>

LLVM IR (-O0):
@.str = [11 x i8] c" %2d\0A\00"
@.str.1 = [11 x i8] c" \\\0A\00"
@.str.2 = [18 x i8] c" _%2d %2d\0A\00"
@.str.3 = [16 x i8] c" _%2d \\ /\0A\00"
@.str.4 = [16 x i8] c"%2d | %2d\0A\00"
@.str.5 = [14 x i8] c" %2d _ /\0A\00"
@.str.6 = [15 x i8] c" | %2d _\0A\00"
@.str.7 = [18 x i8] c" %2d %2d\0A\00"
@.str.8 = [2 x i8] c"\0A\00"
define void @showSolution10(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 3
%10 = load i32, i32* %9
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 4
%13 = load i32, i32* %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %13)
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 0
%21 = load i32, i32* %20
%22 = load i32*, i32** %2
%23 = getelementptr inbounds i32, i32* %22, i64 5
%24 = load i32, i32* %23
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %21, i32 %24)
%26 = load i32*, i32** %2
%27 = getelementptr inbounds i32, i32* %26, i64 9
%28 = load i32, i32* %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %28)
%30 = load i32*, i32** %2
%31 = getelementptr inbounds i32, i32* %30, i64 7
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %32)
%34 = load i32*, i32** %2
%35 = getelementptr inbounds i32, i32* %34, i64 8
%36 = load i32, i32* %35
%37 = load i32*, i32** %2
%38 = getelementptr inbounds i32, i32* %37, i64 6
%39 = load i32, i32* %38
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %36, i32 %39)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%42 = load i32*, i32** %2
%43 = call i32 @printCode(i32* %42)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c" %2d\0A\00"
@.str.2 = [18 x i8] c" _%2d %2d\0A\00"
@.str.3 = [16 x i8] c" _%2d \\ /\0A\00"
@.str.4 = [16 x i8] c"%2d | %2d\0A\00"
@.str.5 = [14 x i8] c" %2d _ /\0A\00"
@.str.6 = [15 x i8] c" | %2d _\0A\00"
@.str.7 = [18 x i8] c" %2d %2d\0A\00"
@str = [10 x i8] c" \\\00"
define void @showSolution10(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%6 = getelementptr inbounds i32, i32* %0, i64 3
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %0, i64 4
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %9)
%11 = getelementptr inbounds i32, i32* %0, i64 1
%12 = load i32, i32* %11
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %0
%15 = getelementptr inbounds i32, i32* %0, i64 5
%16 = load i32, i32* %15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %14, i32 %16)
%18 = getelementptr inbounds i32, i32* %0, i64 9
%19 = load i32, i32* %18
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds i32, i32* %0, i64 7
%22 = load i32, i32* %21
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds i32, i32* %0, i64 8
%25 = load i32, i32* %24
%26 = getelementptr inbounds i32, i32* %0, i64 6
%27 = load i32, i32* %26
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i32 %25, i32 %27)
%29 = tail call i32 @putchar(i32 10)
%30 = tail call i32 @printCode(i32* %0)
ret void
}