#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 *);
void printTurtleMoves(int turtleMoves[][20]) {
  int i, j;
  for (i = 0; i < 20; i++) {
    for (j = 0; j < 20; j++) {
      if (turtleMoves[i][j] == 1)
        printf("*");
      else
        printf(" ");
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<printTurtleMoves>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    11a5 <printTurtleMoves+0x95>
movl   $0x0,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    118b <printTurtleMoves+0x7b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    116c <printTurtleMoves+0x5c>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
jmp    1178 <printTurtleMoves+0x68>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    117d <printTurtleMoves+0x6d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <printTurtleMoves+0x24>
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <printTurtleMoves+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTurtleMoves>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    $0x4c,%ebx
mov    $0x2a,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpl   $0x1,-0x4c(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x48(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x44(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x40(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x3c(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x38(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x34(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x30(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x2c(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x28(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x24(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x20(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x1c(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x18(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x14(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x10(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0xc(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x8(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,-0x4(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpl   $0x1,(%r14,%rbx,1)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x50,%rbx
cmp    $0x68c,%rbx
jne    1130 <printTurtleMoves+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @printTurtleMoves([20 x i32]* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %105, %2 ]
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 0
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 1
%7 = select i1 %6, i32 42, i32 32
%8 = tail call i32 @putchar(i32 %7)
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 1
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 1
%12 = select i1 %11, i32 42, i32 32
%13 = tail call i32 @putchar(i32 %12)
%14 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 2
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, 1
%17 = select i1 %16, i32 42, i32 32
%18 = tail call i32 @putchar(i32 %17)
%19 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 3
%20 = load i32, i32* %19
%21 = icmp eq i32 %20, 1
%22 = select i1 %21, i32 42, i32 32
%23 = tail call i32 @putchar(i32 %22)
%24 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 4
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, 1
%27 = select i1 %26, i32 42, i32 32
%28 = tail call i32 @putchar(i32 %27)
%29 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 5
%30 = load i32, i32* %29
%31 = icmp eq i32 %30, 1
%32 = select i1 %31, i32 42, i32 32
%33 = tail call i32 @putchar(i32 %32)
%34 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 6
%35 = load i32, i32* %34
%36 = icmp eq i32 %35, 1
%37 = select i1 %36, i32 42, i32 32
%38 = tail call i32 @putchar(i32 %37)
%39 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 7
%40 = load i32, i32* %39
%41 = icmp eq i32 %40, 1
%42 = select i1 %41, i32 42, i32 32
%43 = tail call i32 @putchar(i32 %42)
%44 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 8
%45 = load i32, i32* %44
%46 = icmp eq i32 %45, 1
%47 = select i1 %46, i32 42, i32 32
%48 = tail call i32 @putchar(i32 %47)
%49 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 9
%50 = load i32, i32* %49
%51 = icmp eq i32 %50, 1
%52 = select i1 %51, i32 42, i32 32
%53 = tail call i32 @putchar(i32 %52)
%54 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 10
%55 = load i32, i32* %54
%56 = icmp eq i32 %55, 1
%57 = select i1 %56, i32 42, i32 32
%58 = tail call i32 @putchar(i32 %57)
%59 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 11
%60 = load i32, i32* %59
%61 = icmp eq i32 %60, 1
%62 = select i1 %61, i32 42, i32 32
%63 = tail call i32 @putchar(i32 %62)
%64 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 12
%65 = load i32, i32* %64
%66 = icmp eq i32 %65, 1
%67 = select i1 %66, i32 42, i32 32
%68 = tail call i32 @putchar(i32 %67)
%69 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 13
%70 = load i32, i32* %69
%71 = icmp eq i32 %70, 1
%72 = select i1 %71, i32 42, i32 32
%73 = tail call i32 @putchar(i32 %72)
%74 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 14
%75 = load i32, i32* %74
%76 = icmp eq i32 %75, 1
%77 = select i1 %76, i32 42, i32 32
%78 = tail call i32 @putchar(i32 %77)
%79 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 15
%80 = load i32, i32* %79
%81 = icmp eq i32 %80, 1
%82 = select i1 %81, i32 42, i32 32
%83 = tail call i32 @putchar(i32 %82)
%84 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 16
%85 = load i32, i32* %84
%86 = icmp eq i32 %85, 1
%87 = select i1 %86, i32 42, i32 32
%88 = tail call i32 @putchar(i32 %87)
%89 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 17
%90 = load i32, i32* %89
%91 = icmp eq i32 %90, 1
%92 = select i1 %91, i32 42, i32 32
%93 = tail call i32 @putchar(i32 %92)
%94 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 18
%95 = load i32, i32* %94
%96 = icmp eq i32 %95, 1
%97 = select i1 %96, i32 42, i32 32
%98 = tail call i32 @putchar(i32 %97)
%99 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %3, i64 19
%100 = load i32, i32* %99
%101 = icmp eq i32 %100, 1
%102 = select i1 %101, i32 42, i32 32
%103 = tail call i32 @putchar(i32 %102)
%104 = tail call i32 @putchar(i32 10)
%105 = add nuw nsw i64 %3, 1
%106 = icmp eq i64 %105, 20
br i1 %106, label %107, label %2
107: ; preds = %2
ret void
}