#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 */
scalar_t__ malloc(int);
char **init_solution(void) {
  char **solution;
  int i;
  solution = (char **)malloc(sizeof(char *) * 10);
  i = 0;
  while (i <= 9) {
    solution[i] = (char *)malloc(sizeof(char) * 10);
    solution[i][9] = '\0';
    i++;
  }
  solution[9] = 0;
  return (solution);
}


x86 assembly (clang, -O0):
<init_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x50,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jg     116e <init_solution+0x5e>
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movb   $0x0,0x9(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <init_solution+0x1d>
mov    -0x8(%rbp),%rax
movq   $0x0,0x48(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_solution>:
push   %rbx
mov    $0x50,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
movb   $0x0,0x9(%rax)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x8(%rbx)
movb   $0x0,0x9(%rax)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x10(%rbx)
movb   $0x0,0x9(%rax)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x18(%rbx)
movb   $0x0,0x9(%rax)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x20(%rbx)
movb   $0x0,0x9(%rax)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x28(%rbx)
movb   $0x0,0x9(%rax)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x30(%rbx)
movb   $0x0,0x9(%rax)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x38(%rbx)
movb   $0x0,0x9(%rax)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,0x40(%rbx)
movb   $0x0,0x9(%rax)
mov    $0xa,%edi
call   1030 <malloc@plt>
movb   $0x0,0x9(%rax)
movq   $0x0,0x48(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8** @init_solution() {
%1 = alloca i8**
%2 = alloca i32
%3 = call i64 @malloc(i32 80)
%4 = inttoptr i64 %3 to i8**
store i8** %4, i8*** %1
store i32 0, i32* %2
br label %5
5: ; preds = %8, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 9
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = call i64 @malloc(i32 10)
%10 = inttoptr i64 %9 to i8*
%11 = load i8**, i8*** %1
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
store i8* %10, i8** %14
%15 = load i8**, i8*** %1
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i64 9
store i8 0, i8* %20
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %5
23: ; preds = %5
%24 = load i8**, i8*** %1
%25 = getelementptr inbounds i8*, i8** %24, i64 9
store i8* null, i8** %25
%26 = load i8**, i8*** %1
ret i8** %26
}

LLVM IR (-O2):
define i8** @init_solution() {
%1 = tail call i64 @malloc(i32 80)
%2 = inttoptr i64 %1 to i8**
%3 = tail call i64 @malloc(i32 10)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 9
store i8 0, i8* %5
%6 = tail call i64 @malloc(i32 10)
%7 = inttoptr i64 %6 to i8*
%8 = getelementptr inbounds i8*, i8** %2, i64 1
store i8* %7, i8** %8
%9 = getelementptr inbounds i8, i8* %7, i64 9
store i8 0, i8* %9
%10 = tail call i64 @malloc(i32 10)
%11 = inttoptr i64 %10 to i8*
%12 = getelementptr inbounds i8*, i8** %2, i64 2
store i8* %11, i8** %12
%13 = getelementptr inbounds i8, i8* %11, i64 9
store i8 0, i8* %13
%14 = tail call i64 @malloc(i32 10)
%15 = inttoptr i64 %14 to i8*
%16 = getelementptr inbounds i8*, i8** %2, i64 3
store i8* %15, i8** %16
%17 = getelementptr inbounds i8, i8* %15, i64 9
store i8 0, i8* %17
%18 = tail call i64 @malloc(i32 10)
%19 = inttoptr i64 %18 to i8*
%20 = getelementptr inbounds i8*, i8** %2, i64 4
store i8* %19, i8** %20
%21 = getelementptr inbounds i8, i8* %19, i64 9
store i8 0, i8* %21
%22 = tail call i64 @malloc(i32 10)
%23 = inttoptr i64 %22 to i8*
%24 = getelementptr inbounds i8*, i8** %2, i64 5
store i8* %23, i8** %24
%25 = getelementptr inbounds i8, i8* %23, i64 9
store i8 0, i8* %25
%26 = tail call i64 @malloc(i32 10)
%27 = inttoptr i64 %26 to i8*
%28 = getelementptr inbounds i8*, i8** %2, i64 6
store i8* %27, i8** %28
%29 = getelementptr inbounds i8, i8* %27, i64 9
store i8 0, i8* %29
%30 = tail call i64 @malloc(i32 10)
%31 = inttoptr i64 %30 to i8*
%32 = getelementptr inbounds i8*, i8** %2, i64 7
store i8* %31, i8** %32
%33 = getelementptr inbounds i8, i8* %31, i64 9
store i8 0, i8* %33
%34 = tail call i64 @malloc(i32 10)
%35 = inttoptr i64 %34 to i8*
%36 = getelementptr inbounds i8*, i8** %2, i64 8
store i8* %35, i8** %36
%37 = getelementptr inbounds i8, i8* %35, i64 9
store i8 0, i8* %37
%38 = tail call i64 @malloc(i32 10)
%39 = inttoptr i64 %38 to i8*
%40 = getelementptr inbounds i8*, i8** %2, i64 9
%41 = getelementptr inbounds i8, i8* %39, i64 9
store i8 0, i8* %41
store i8* null, i8** %40
ret i8** %2
}