#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*/ printf(char *, char, char);
void showpuzzle(char puzzle[][5]) {
  int i, j;
  for (i = 0; i < 5; i++)
    for (j = 0; j < 5; j++)
      printf("%c%c", puzzle[i][j], j == 4 ? '\n' : ' ');
}


x86 assembly (clang, -O0):
<showpuzzle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    119a <showpuzzle+0x8a>
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    1187 <showpuzzle+0x77>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%esi
mov    $0x20,%eax
mov    $0xa,%edx
cmp    $0x4,%esi
cmove  %edx,%eax
lea    0xe92(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <showpuzzle+0x24>
jmp    118c <showpuzzle+0x7c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <showpuzzle+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showpuzzle>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0x4,%ebx
lea    0xedc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl -0x4(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0x20,%edx
call   1030 <printf@plt>
movsbl -0x3(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0x20,%edx
call   1030 <printf@plt>
movsbl -0x2(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0x20,%edx
call   1030 <printf@plt>
movsbl -0x1(%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0x20,%edx
call   1030 <printf@plt>
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
mov    $0xa,%edx
call   1030 <printf@plt>
add    $0x5,%rbx
cmp    $0x1d,%rbx
jne    1130 <showpuzzle+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%c%c\00"
define void @showpuzzle([5 x i8]* %0) {
%2 = alloca [5 x i8]*
%3 = alloca i32
%4 = alloca i32
store [5 x i8]* %0, [5 x i8]** %2
store i32 0, i32* %3
br label %5
5: ; preds = %31, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %34
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %27, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %30
12: ; preds = %9
%13 = load [5 x i8]*, [5 x i8]** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %13, i64 %15
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [5 x i8], [5 x i8]* %16, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = load i32, i32* %4
%22 = icmp eq i32 %21, 4
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 10, i32 32
%25 = trunc i32 %24 to i8
%26 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %20, i8 signext %25)
br label %27
27: ; preds = %12
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %9
30: ; preds = %9
br label %31
31: ; preds = %30
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
br label %5
34: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%c%c\00"
define void @showpuzzle([5 x i8]* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %19, %2 ]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 0
%5 = load i8, i8* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %5, i8 signext 32)
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 1
%8 = load i8, i8* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %8, i8 signext 32)
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 2
%11 = load i8, i8* %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %11, i8 signext 32)
%13 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 3
%14 = load i8, i8* %13
%15 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %14, i8 signext 32)
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 %3, i64 4
%17 = load i8, i8* %16
%18 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %17, i8 signext 10)
%19 = add nuw nsw i64 %3, 1
%20 = icmp eq i64 %19, 5
br i1 %20, label %21, label %2
21: ; preds = %2
ret void
}