#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*/ printf(char *, ...);
void dataframe_print(int **df) {
  int i, j;
  printf("Dataframe row = %d, rowsize = %d, nonemptyrow = %d, "
         "total element = %d\n",
         df[-1][1], df[-1][0], df[-1][2], df[-1][3]);
  printf("**************************************\n");
  for (i = 0; i < df[-1][1]; i++) {
    printf("[");
    for (j = 0; j < df[i][-1]; j++)
      printf("%d ", df[i][j]);
    printf("], count = %d, length = %d \n", df[i][-1], df[i][-2]);
  }
  printf("**************************************\n");
}


x86 assembly (clang, -O0):
<dataframe_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%rax
mov    0x4(%rax),%esi
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%rax
mov    0xc(%rax),%r8d
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    -0x8(%rcx),%rcx
cmp    0x4(%rcx),%eax
jge    1215 <dataframe_print+0x105>
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    -0x4(%rcx),%eax
jge    11db <dataframe_print+0xcb>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1194 <dataframe_print+0x84>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x4(%rax),%esi
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x8(%rax),%edx
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116b <dataframe_print+0x5b>
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dataframe_print>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdi,%r12
mov    -0x8(%rdi),%rax
mov    (%rax),%edx
mov    0x4(%rax),%esi
mov    0x8(%rax),%ecx
mov    0xc(%rax),%r8d
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf08(%rip),%rdi
call   1040 <puts@plt>
mov    -0x8(%r12),%rax
cmpl   $0x0,0x4(%rax)
jle    11f0 <dataframe_print+0xc0>
lea    0xed0(%rip),%r14
lea    0xecd(%rip),%r15
xor    %r13d,%r13d
jmp    11af <dataframe_print+0x7f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    -0x8(%rax),%edx
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r13
mov    -0x8(%r12),%rax
movslq 0x4(%rax),%rax
cmp    %rax,%r13
jge    11f0 <dataframe_print+0xc0>
mov    $0x5b,%edi
call   1030 <putchar@plt>
mov    (%r12,%r13,8),%rax
mov    -0x4(%rax),%esi
test   %esi,%esi
jle    1190 <dataframe_print+0x60>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%rax,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
mov    (%r12,%r13,8),%rax
movslq -0x4(%rax),%rsi
cmp    %rsi,%rbx
jl     11d0 <dataframe_print+0xa0>
jmp    1190 <dataframe_print+0x60>
lea    0xe72(%rip),%rdi
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@.str = [72 x i8] c"Dataframe row = %d, rowsize = %d, nonemptyrow = %d, total element = %d\0A\00"
@.str.3 = [4 x i8] c"%d \00"
@.str.4 = [29 x i8] c"], count = %d, length = %d \0A\00"
@str.5 = [39 x i8] c"**************************************\00"
define void @dataframe_print(i32** nocapture %0) {
%2 = getelementptr inbounds i32*, i32** %0, i64 -1
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = getelementptr inbounds i32, i32* %3, i64 2
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %3, i64 3
%10 = load i32, i32* %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %8, i32 %10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.5, i64 0, i64 0))
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 1
%15 = load i32, i32* %14
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %49
17: ; preds = %1, %37
%18 = phi i64 [ %43, %37 ], [ 0, %1 ]
%19 = tail call i32 @putchar(i32 91)
%20 = getelementptr inbounds i32*, i32** %0, i64 %18
%21 = load i32*, i32** %20
%22 = getelementptr inbounds i32, i32* %21, i64 -1
%23 = load i32, i32* %22
%24 = icmp sgt i32 %23, 0
br i1 %24, label %25, label %37
25: ; preds = %17, %25
%26 = phi i64 [ %31, %25 ], [ 0, %17 ]
%27 = phi i32* [ %32, %25 ], [ %21, %17 ]
%28 = getelementptr inbounds i32, i32* %27, i64 %26
%29 = load i32, i32* %28
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %29)
%31 = add nuw nsw i64 %26, 1
%32 = load i32*, i32** %20
%33 = getelementptr inbounds i32, i32* %32, i64 -1
%34 = load i32, i32* %33
%35 = sext i32 %34 to i64
%36 = icmp slt i64 %31, %35
br i1 %36, label %25, label %37
37: ; preds = %25, %17
%38 = phi i32* [ %21, %17 ], [ %32, %25 ]
%39 = phi i32 [ %23, %17 ], [ %34, %25 ]
%40 = getelementptr inbounds i32, i32* %38, i64 -2
%41 = load i32, i32* %40
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i32 %39, i32 %41)
%43 = add nuw nsw i64 %18, 1
%44 = load i32*, i32** %2
%45 = getelementptr inbounds i32, i32* %44, i64 1
%46 = load i32, i32* %45
%47 = sext i32 %46 to i64
%48 = icmp slt i64 %43, %47
br i1 %48, label %17, label %49
49: ; preds = %37, %1
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.5, i64 0, i64 0))
ret void
}