#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*/ print_board(int **);
int /*<<< orphan*/ sscanf(char *, char *, int *, int *, int *, int *, int *,
                          int *, int *, int *, int *);
void board_print_from_string(char *board_string) {
  int board[3][3];
  sscanf(board_string, "%d-%d-%d-%d-%d-%d-%d-%d-%d", &board[0][0], &board[0][1],
         &board[0][2], &board[1][0], &board[1][1], &board[1][2], &board[2][0],
         &board[2][1], &board[2][2]);
  print_board(board);
}


x86 assembly (clang, -O0):
<board_print_from_string>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x40(%rbp),%rdx
lea    -0x40(%rbp),%rcx
add    $0x4,%rcx
lea    -0x40(%rbp),%r8
add    $0x8,%r8
lea    -0x40(%rbp),%r9
add    $0xc,%r9
lea    -0x40(%rbp),%r14
add    $0xc,%r14
add    $0x4,%r14
lea    -0x40(%rbp),%rbx
add    $0xc,%rbx
add    $0x8,%rbx
lea    -0x40(%rbp),%r11
add    $0x18,%r11
lea    -0x40(%rbp),%r10
add    $0x18,%r10
add    $0x4,%r10
lea    -0x40(%rbp),%rax
add    $0x18,%rax
add    $0x8,%rax
lea    0xe72(%rip),%rsi
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1040 <sscanf@plt>
lea    -0x40(%rbp),%rdi
call   1030 <print_board@plt>
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_print_from_string>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
lea    0x4(%rsp),%rcx
lea    0x8(%rsp),%r8
lea    0xc(%rsp),%r9
lea    0x10(%rsp),%r10
lea    0x14(%rsp),%r11
lea    0x18(%rsp),%r14
lea    0x1c(%rsp),%r15
lea    0x20(%rsp),%rax
sub    $0x8,%rsp
lea    0xea4(%rip),%rsi
lea    0x8(%rsp),%rbx
mov    %rbx,%rdx
push   %rax
push   %r15
push   %r14
push   %r11
push   %r10
call   1040 <sscanf@plt>
add    $0x30,%rsp
mov    %rbx,%rdi
call   1030 <print_board@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [27 x i8] c"%d-%d-%d-%d-%d-%d-%d-%d-%d\00"
define void @board_print_from_string(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x [3 x i32]]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 0
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%7 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 0
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 1
%9 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 0
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 2
%11 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 1
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%13 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 1
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %13, i64 0, i64 1
%15 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 1
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %15, i64 0, i64 2
%17 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 2
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %17, i64 0, i64 0
%19 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 2
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %19, i64 0, i64 1
%21 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 2
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %21, i64 0, i64 2
%23 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %8, i32* %10, i32* %12, i32* %14, i32* %16, i32* %18, i32* %20, i32* %22)
%24 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %3, i64 0, i64 0
%25 = bitcast [3 x i32]* %24 to i32**
%26 = call i32 @print_board(i32** %25)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"%d-%d-%d-%d-%d-%d-%d-%d-%d\00"
define void @board_print_from_string(i8* nocapture %0) {
%2 = alloca [3 x [3 x i32]]
%3 = bitcast [3 x [3 x i32]]* %2 to i8*
%4 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0, i64 0
%5 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0, i64 1
%6 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 0, i64 2
%7 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1, i64 0
%8 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1, i64 1
%9 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1, i64 2
%10 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2, i64 0
%11 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2, i64 1
%12 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2, i64 2
%13 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %12)
%14 = bitcast [3 x [3 x i32]]* %2 to i32**
%15 = call i32 @print_board(i32** %14)
ret void
}