#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 isValidSudoku(char **, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  char *board[9] = {"3....4...", "....1.8..", ".72......",
                    "..5......", ".4.......", "......3..",
                    "........1", "13...5...", "....5..2."};
  printf("%d\n", isValidSudoku(board, 9, 9));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0x2c86(%rip),%rsi
mov    $0x48,%edx
call   1050 <memcpy@plt>
lea    -0x60(%rbp),%rdi
mov    $0x9,%edx
mov    %edx,%esi
call   1030 <isValidSudoku@plt>
mov    %eax,%esi
lea    0xeed(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    0x2ce5(%rip),%rax
mov    %rax,0x40(%rsp)
movaps 0x2cc9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2cad(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2c91(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2c75(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x9,%esi
mov    $0x9,%edx
call   1030 <isValidSudoku@plt>
lea    0xee2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"3....4...\00"
@.str.1 = [10 x i8] c"....1.8..\00"
@.str.2 = [10 x i8] c".72......\00"
@.str.3 = [10 x i8] c"..5......\00"
@.str.4 = [10 x i8] c".4.......\00"
@.str.5 = [10 x i8] c"......3..\00"
@.str.6 = [10 x i8] c"........1\00"
@.str.7 = [10 x i8] c"13...5...\00"
@.str.8 = [10 x i8] c"....5..2.\00"
@__const.main.board = [9 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i32 0, i32 0)]
@.str.9 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [9 x i8*]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast [9 x i8*]* %5 to i8*
%7 = getelementptr inbounds [9 x i8*], [9 x i8*]* %5, i64 0, i64 0
%8 = call i32 @isValidSudoku(i8** %7, i32 9, i32 9)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"3....4...\00"
@.str.1 = [10 x i8] c"....1.8..\00"
@.str.2 = [10 x i8] c".72......\00"
@.str.3 = [10 x i8] c"..5......\00"
@.str.4 = [10 x i8] c".4.......\00"
@.str.5 = [10 x i8] c"......3..\00"
@.str.6 = [10 x i8] c"........1\00"
@.str.7 = [10 x i8] c"13...5...\00"
@.str.8 = [10 x i8] c"....5..2.\00"
@__const.main.board = [9 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i32 0, i32 0)]
@.str.9 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x i8*]
%4 = bitcast [9 x i8*]* %3 to i8*
%5 = getelementptr inbounds [9 x i8*], [9 x i8*]* %3, i64 0, i64 0
%6 = call i32 @isValidSudoku(i8** %5, i32 9, i32 9)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %6)
ret i32 0
}