#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void dump_s(int D, int **M, int *N, int ***s) {
  int dvv_loop_var_1;
  int dvv_loop_var_2;
  int dvv_loop_var_3;
  printf("s = ");
  for (dvv_loop_var_1 = 1; dvv_loop_var_1 <= D; dvv_loop_var_1++) {
    for (dvv_loop_var_2 = 1; dvv_loop_var_2 <= N[dvv_loop_var_1 - 1];
         dvv_loop_var_2++) {
      for (dvv_loop_var_3 = 1;
           dvv_loop_var_3 <= M[dvv_loop_var_1 - 1][dvv_loop_var_2 - 1];
           dvv_loop_var_3++) {
        printf("%d",
               s[dvv_loop_var_1 - 1][dvv_loop_var_2 - 1][dvv_loop_var_3 - 1]);
        printf(" ");
      }
      printf(" ; ");
    }
    printf(" ;; ");
  }
  printf("\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<dump_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1231 <dump_s+0x111>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    -0x24(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jg     1215 <dump_s+0xf5>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x24(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,8),%rcx
mov    -0x28(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jg     11f9 <dump_s+0xd9>
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    117f <dump_s+0x5f>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    115f <dump_s+0x3f>
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    114c <dump_s+0x2c>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_s>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r15
mov    %rdx,0x10(%rsp)
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,0x8(%rsp)
test   %ebp,%ebp
jle    1247 <dump_s+0x117>
mov    0x8(%rsp),%rax
add    $0x1,%eax
mov    %rax,0x8(%rsp)
mov    $0x1,%r12d
lea    0xe85(%rip),%r13
jmp    11ad <dump_s+0x7d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xe75(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r12
cmp    0x8(%rsp),%r12
je     1247 <dump_s+0x117>
mov    0x10(%rsp),%rax
cmpl   $0x0,-0x4(%rax,%r12,4)
jle    1190 <dump_s+0x60>
mov    $0x1,%ebp
jmp    11f4 <dump_s+0xc4>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xe31(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1(%rbp),%rax
mov    0x10(%rsp),%rcx
movslq -0x4(%rcx,%r12,4),%rcx
cmp    %rcx,%rbp
mov    %rax,%rbp
jge    1190 <dump_s+0x60>
mov    -0x8(%rbx,%r12,8),%rax
cmpl   $0x0,-0x4(%rax,%rbp,4)
jle    11d0 <dump_s+0xa0>
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    -0x8(%r15,%r12,8),%rax
mov    -0x8(%rax,%rbp,8),%rax
mov    (%rax,%r14,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbx,%r12,8),%rax
movslq -0x4(%rax,%rbp,4),%rax
add    $0x1,%r14
cmp    %rax,%r14
jl     1210 <dump_s+0xe0>
jmp    11d0 <dump_s+0xa0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2d88(%rip),%rax
mov    (%rax),%edi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <fflush@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"s = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [4 x i8] c" ; \00"
@.str.4 = [5 x i8] c" ;; \00"
@.str.5 = [2 x i8] c"\0A\00"
@stdout = global i32 0
define void @dump_s(i32 %0, i32** %1, i32* %2, i32*** %3) {
%5 = alloca i32
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i32***
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i32*** %3, i32**** %8
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %9
br label %13
13: ; preds = %71, %4
%14 = load i32, i32* %9
%15 = load i32, i32* %5
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %74
17: ; preds = %13
store i32 1, i32* %10
br label %18
18: ; preds = %66, %17
%19 = load i32, i32* %10
%20 = load i32*, i32** %7
%21 = load i32, i32* %9
%22 = sub nsw i32 %21, 1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %20, i64 %23
%25 = load i32, i32* %24
%26 = icmp sle i32 %19, %25
br i1 %26, label %27, label %69
27: ; preds = %18
store i32 1, i32* %11
br label %28
28: ; preds = %61, %27
%29 = load i32, i32* %11
%30 = load i32**, i32*** %6
%31 = load i32, i32* %9
%32 = sub nsw i32 %31, 1
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i32*, i32** %30, i64 %33
%35 = load i32*, i32** %34
%36 = load i32, i32* %10
%37 = sub nsw i32 %36, 1
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %35, i64 %38
%40 = load i32, i32* %39
%41 = icmp sle i32 %29, %40
br i1 %41, label %42, label %64
42: ; preds = %28
%43 = load i32***, i32**** %8
%44 = load i32, i32* %9
%45 = sub nsw i32 %44, 1
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i32**, i32*** %43, i64 %46
%48 = load i32**, i32*** %47
%49 = load i32, i32* %10
%50 = sub nsw i32 %49, 1
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i32*, i32** %48, i64 %51
%53 = load i32*, i32** %52
%54 = load i32, i32* %11
%55 = sub nsw i32 %54, 1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i32, i32* %53, i64 %56
%58 = load i32, i32* %57
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %58)
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %61
61: ; preds = %42
%62 = load i32, i32* %11
%63 = add nsw i32 %62, 1
store i32 %63, i32* %11
br label %28
64: ; preds = %28
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %66
66: ; preds = %64
%67 = load i32, i32* %10
%68 = add nsw i32 %67, 1
store i32 %68, i32* %10
br label %18
69: ; preds = %18
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %71
71: ; preds = %69
%72 = load i32, i32* %9
%73 = add nsw i32 %72, 1
store i32 %73, i32* %9
br label %13
74: ; preds = %13
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%76 = load i32, i32* @stdout
%77 = call i32 @fflush(i32 %76)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"s = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c" ; \00"
@.str.4 = [5 x i8] c" ;; \00"
@stdout = global i32 0
define void @dump_s(i32 %0, i32** nocapture %1, i32* nocapture %2, i32*** nocapture %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = icmp slt i32 %0, 1
br i1 %6, label %52, label %7
7: ; preds = %4
%8 = add nuw i32 %0, 1
%9 = zext i32 %8 to i64
br label %10
10: ; preds = %7, %48
%11 = phi i64 [ 1, %7 ], [ %50, %48 ]
%12 = add nsw i64 %11, -1
%13 = getelementptr inbounds i32, i32* %2, i64 %12
%14 = load i32, i32* %13
%15 = icmp slt i32 %14, 1
br i1 %15, label %48, label %16
16: ; preds = %10
%17 = getelementptr inbounds i32*, i32** %1, i64 %12
%18 = getelementptr inbounds i32**, i32*** %3, i64 %12
br label %19
19: ; preds = %16, %42
%20 = phi i64 [ 1, %16 ], [ %44, %42 ]
%21 = add nsw i64 %20, -1
%22 = load i32*, i32** %17
%23 = getelementptr inbounds i32, i32* %22, i64 %21
%24 = load i32, i32* %23
%25 = icmp slt i32 %24, 1
br i1 %25, label %42, label %26
26: ; preds = %19, %26
%27 = phi i64 [ %36, %26 ], [ 1, %19 ]
%28 = load i32**, i32*** %18
%29 = getelementptr inbounds i32*, i32** %28, i64 %21
%30 = load i32*, i32** %29
%31 = add nsw i64 %27, -1
%32 = getelementptr inbounds i32, i32* %30, i64 %31
%33 = load i32, i32* %32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %33)
%35 = tail call i32 @putchar(i32 32)
%36 = add nuw nsw i64 %27, 1
%37 = load i32*, i32** %17
%38 = getelementptr inbounds i32, i32* %37, i64 %21
%39 = load i32, i32* %38
%40 = sext i32 %39 to i64
%41 = icmp slt i64 %27, %40
br i1 %41, label %26, label %42
42: ; preds = %26, %19
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%44 = add nuw nsw i64 %20, 1
%45 = load i32, i32* %13
%46 = sext i32 %45 to i64
%47 = icmp slt i64 %20, %46
br i1 %47, label %19, label %48
48: ; preds = %42, %10
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%50 = add nuw nsw i64 %11, 1
%51 = icmp eq i64 %50, %9
br i1 %51, label %52, label %10
52: ; preds = %48, %4
%53 = tail call i32 @putchar(i32 10)
%54 = load i32, i32* @stdout
%55 = tail call i32 @fflush(i32 %54)
ret void
}