#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_int_array_zufaellig(int *, int, int, int);
void initialisiere_2dim_int_array_zufaellig(int zeilen, int spalten,
                                            int array[zeilen][spalten], int min,
                                            int max) {
  for (int i = 0; i < zeilen; i++)
    initialisiere_int_array_zufaellig(array[i], spalten, min, max);
}


x86 assembly (clang, -O0):
<initialisiere_2dim_int_array_zufaellig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1176 <initialisiere_2dim_int_array_zufaellig+0x66>
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rdi
movslq -0x1c(%rbp),%rax
imul   %rcx,%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <initialisiere_int_array_zufaellig@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1137 <initialisiere_2dim_int_array_zufaellig+0x27>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialisiere_2dim_int_array_zufaellig>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    115a <initialisiere_2dim_int_array_zufaellig+0x4a>
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %rdx,%rbx
mov    %esi,%r12d
mov    %esi,%r13d
mov    %edi,%ebp
shl    $0x2,%r13
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <initialisiere_int_array_zufaellig@plt>
add    %r13,%rbx
add    $0xffffffffffffffff,%rbp
jne    1140 <initialisiere_2dim_int_array_zufaellig+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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