#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*/ putchar(char);
int /*<<< orphan*/ schreibe_char_array(char *, int, int, char *, _Bool);
void schreibe_2dim_char_array(int zeilen, int spalten, char **array, int breite,
                              char *trenner, _Bool am_ende) {
  for (int i = 0; i < zeilen; i++) {
    schreibe_char_array(array[i], spalten, breite, trenner, am_ende);
    putchar('\n');
  }
}


x86 assembly (clang, -O0):
<schreibe_2dim_char_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r9b,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
and    $0x1,%al
mov    %al,-0x21(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1190 <schreibe_2dim_char_array+0x70>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%r8d
call   1030 <schreibe_char_array@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1148 <schreibe_2dim_char_array+0x28>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<schreibe_2dim_char_array>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1179 <schreibe_2dim_char_array+0x59>
mov    %r8,%r15
mov    %ecx,%r12d
mov    %rdx,%r13
mov    %esi,%ebp
mov    %edi,%eax
mov    %rax,(%rsp)
xor    %r14d,%r14d
movzbl %r9b,%ebx
nopw   0x0(%rax,%rax,1)
mov    0x0(%r13,%r14,8),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %r15,%rcx
mov    %ebx,%r8d
call   1030 <schreibe_char_array@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
add    $0x1,%r14
cmp    %r14,(%rsp)
jne    1150 <schreibe_2dim_char_array+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @schreibe_2dim_char_array(i32 %0, i32 %1, i8** nocapture %2, i32 %3, i8* %4, i1 zeroext %5) {
%7 = icmp sgt i32 %0, 0
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = zext i32 %0 to i64
br label %11
10: ; preds = %11, %6
ret void
11: ; preds = %8, %11
%12 = phi i64 [ 0, %8 ], [ %17, %11 ]
%13 = getelementptr inbounds i8*, i8** %2, i64 %12
%14 = load i8*, i8** %13
%15 = tail call i32 @schreibe_char_array(i8* %14, i32 %1, i32 %3, i8* %4, i1 zeroext %5)
%16 = tail call i32 @putchar(i8 signext 10)
%17 = add nuw nsw i64 %12, 1
%18 = icmp eq i64 %17, %9
br i1 %18, label %10, label %11
}