#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*/ initialisiere_char_array(char *, int, char);
void initialisiere_2dim_char_array(int zeilen, int spalten, char **array,
                                   char initialwert) {
  for (int i = 0; i < zeilen; i++)
    initialisiere_char_array(array[i], spalten, initialwert);
}


x86 assembly (clang, -O0):
<initialisiere_2dim_char_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1160 <initialisiere_2dim_char_array+0x50>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x8(%rbp),%esi
movsbl -0x11(%rbp),%edx
call   1030 <initialisiere_char_array@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112e <initialisiere_2dim_char_array+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialisiere_2dim_char_array>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edi,%edi
jle    1147 <initialisiere_2dim_char_array+0x37>
mov    %rdx,%r14
mov    %esi,%r15d
mov    %edi,%r12d
xor    %ebp,%ebp
movsbl %cl,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r14,%rbp,8),%rdi
mov    %r15d,%esi
mov    %ebx,%edx
call   1030 <initialisiere_char_array@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1130 <initialisiere_2dim_char_array+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @initialisiere_2dim_char_array(i32 %0, i32 %1, i8** %2, i8 signext %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i8 %3, i8* %8
store i32 0, i32* %9
br label %10
10: ; preds = %23, %4
%11 = load i32, i32* %9
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %26
14: ; preds = %10
%15 = load i8**, i8*** %7
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = load i32, i32* %6
%21 = load i8, i8* %8
%22 = call i32 @initialisiere_char_array(i8* %19, i32 %20, i8 signext %21)
br label %23
23: ; preds = %14
%24 = load i32, i32* %9
%25 = add nsw i32 %24, 1
store i32 %25, i32* %9
br label %10
26: ; preds = %10
ret void
}

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