#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*/ my_putchar(char);
int /*<<< orphan*/ my_putstr(char *);
void aff_map(char map[5][5]) {
  int i;
  int j;
  i = 0;
  j = 0;
  my_putstr("-----\n");
  while (i < 5) {
    while (j < 5) {
      my_putchar(map[i][j]);
      j++;
    }
    my_putchar('\n');
    j = 0;
    i++;
  }
  my_putstr("-----\n");
}


x86 assembly (clang, -O0):
<aff_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xebf(%rip),%rdi
call   1040 <my_putstr@plt>
cmpl   $0x5,-0xc(%rbp)
jge    11a8 <aff_map+0x88>
jmp    1155 <aff_map+0x35>
cmpl   $0x5,-0x10(%rbp)
jge    1189 <aff_map+0x69>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x5,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <my_putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <aff_map+0x35>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <aff_map+0x26>
lea    0xe51(%rip),%rdi
call   1040 <my_putstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aff_map>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%r14
mov    %r14,%rdi
call   1040 <my_putstr@plt>
movsbl (%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x1(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x2(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x3(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x4(%rbx),%edi
call   1030 <my_putchar@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
movsbl 0x5(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x6(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x7(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x8(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x9(%rbx),%edi
call   1030 <my_putchar@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
movsbl 0xa(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0xb(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0xc(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0xd(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0xe(%rbx),%edi
call   1030 <my_putchar@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
movsbl 0xf(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x10(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x11(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x12(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x13(%rbx),%edi
call   1030 <my_putchar@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
movsbl 0x14(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x15(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x16(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x17(%rbx),%edi
call   1030 <my_putchar@plt>
movsbl 0x18(%rbx),%edi
call   1030 <my_putchar@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <my_putstr@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"-----\0A\00"
define void @aff_map([5 x i8]* nocapture %0) {
%2 = tail call i32 @my_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 0, i64 0
%4 = load i8, i8* %3
%5 = tail call i32 @my_putchar(i8 signext %4)
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 0, i64 1
%7 = load i8, i8* %6
%8 = tail call i32 @my_putchar(i8 signext %7)
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 0, i64 2
%10 = load i8, i8* %9
%11 = tail call i32 @my_putchar(i8 signext %10)
%12 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 0, i64 3
%13 = load i8, i8* %12
%14 = tail call i32 @my_putchar(i8 signext %13)
%15 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 0, i64 4
%16 = load i8, i8* %15
%17 = tail call i32 @my_putchar(i8 signext %16)
%18 = tail call i32 @my_putchar(i8 signext 10)
%19 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 1, i64 0
%20 = load i8, i8* %19
%21 = tail call i32 @my_putchar(i8 signext %20)
%22 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 1, i64 1
%23 = load i8, i8* %22
%24 = tail call i32 @my_putchar(i8 signext %23)
%25 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 1, i64 2
%26 = load i8, i8* %25
%27 = tail call i32 @my_putchar(i8 signext %26)
%28 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 1, i64 3
%29 = load i8, i8* %28
%30 = tail call i32 @my_putchar(i8 signext %29)
%31 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 1, i64 4
%32 = load i8, i8* %31
%33 = tail call i32 @my_putchar(i8 signext %32)
%34 = tail call i32 @my_putchar(i8 signext 10)
%35 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 2, i64 0
%36 = load i8, i8* %35
%37 = tail call i32 @my_putchar(i8 signext %36)
%38 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 2, i64 1
%39 = load i8, i8* %38
%40 = tail call i32 @my_putchar(i8 signext %39)
%41 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 2, i64 2
%42 = load i8, i8* %41
%43 = tail call i32 @my_putchar(i8 signext %42)
%44 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 2, i64 3
%45 = load i8, i8* %44
%46 = tail call i32 @my_putchar(i8 signext %45)
%47 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 2, i64 4
%48 = load i8, i8* %47
%49 = tail call i32 @my_putchar(i8 signext %48)
%50 = tail call i32 @my_putchar(i8 signext 10)
%51 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 3, i64 0
%52 = load i8, i8* %51
%53 = tail call i32 @my_putchar(i8 signext %52)
%54 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 3, i64 1
%55 = load i8, i8* %54
%56 = tail call i32 @my_putchar(i8 signext %55)
%57 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 3, i64 2
%58 = load i8, i8* %57
%59 = tail call i32 @my_putchar(i8 signext %58)
%60 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 3, i64 3
%61 = load i8, i8* %60
%62 = tail call i32 @my_putchar(i8 signext %61)
%63 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 3, i64 4
%64 = load i8, i8* %63
%65 = tail call i32 @my_putchar(i8 signext %64)
%66 = tail call i32 @my_putchar(i8 signext 10)
%67 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 4, i64 0
%68 = load i8, i8* %67
%69 = tail call i32 @my_putchar(i8 signext %68)
%70 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 4, i64 1
%71 = load i8, i8* %70
%72 = tail call i32 @my_putchar(i8 signext %71)
%73 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 4, i64 2
%74 = load i8, i8* %73
%75 = tail call i32 @my_putchar(i8 signext %74)
%76 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 4, i64 3
%77 = load i8, i8* %76
%78 = tail call i32 @my_putchar(i8 signext %77)
%79 = getelementptr inbounds [5 x i8], [5 x i8]* %0, i64 4, i64 4
%80 = load i8, i8* %79
%81 = tail call i32 @my_putchar(i8 signext %80)
%82 = tail call i32 @my_putchar(i8 signext 10)
%83 = tail call i32 @my_putstr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}