#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*/ free(char *);
void free_imatrix3D(int ***t, int nrl, int nrh, int ncl, int nch, int ndl,
                    int ndh) {
  free((char *)(t[nrl][ncl] + ndl - 1));
  free((char *)(t[nrl] + ncl - 1));
  free((char *)(t + nrl - 1));
}


x86 assembly (clang, -O0):
<free_imatrix3D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
add    $0xfffffffffffffffc,%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_imatrix3D>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
movslq %esi,%rbx
mov    (%rdi,%rbx,8),%rax
movslq %ecx,%r15
mov    (%rax,%r15,8),%rax
movslq %r9d,%rcx
lea    (%rax,%rcx,4),%rdi
add    $0xfffffffffffffffc,%rdi
call   1030 <free@plt>
mov    (%r14,%rbx,8),%rax
lea    (%rax,%r15,8),%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
lea    (%r14,%rbx,8),%rdi
add    $0xfffffffffffffff8,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_imatrix3D(i32*** %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32***
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32*** %0, i32**** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32***, i32**** %8
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32**, i32*** %15, i64 %17
%19 = load i32**, i32*** %18
%20 = load i32, i32* %11
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32*, i32** %19, i64 %21
%23 = load i32*, i32** %22
%24 = load i32, i32* %13
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
%27 = getelementptr inbounds i32, i32* %26, i64 -1
%28 = bitcast i32* %27 to i8*
%29 = call i32 @free(i8* %28)
%30 = load i32***, i32**** %8
%31 = load i32, i32* %9
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32**, i32*** %30, i64 %32
%34 = load i32**, i32*** %33
%35 = load i32, i32* %11
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i32*, i32** %34, i64 %36
%38 = getelementptr inbounds i32*, i32** %37, i64 -1
%39 = bitcast i32** %38 to i8*
%40 = call i32 @free(i8* %39)
%41 = load i32***, i32**** %8
%42 = load i32, i32* %9
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32**, i32*** %41, i64 %43
%45 = getelementptr inbounds i32**, i32*** %44, i64 -1
%46 = bitcast i32*** %45 to i8*
%47 = call i32 @free(i8* %46)
ret void
}

LLVM IR (-O2):
define void @free_imatrix3D(i32*** nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32**, i32*** %0, i64 %8
%10 = load i32**, i32*** %9
%11 = sext i32 %3 to i64
%12 = getelementptr inbounds i32*, i32** %10, i64 %11
%13 = load i32*, i32** %12
%14 = sext i32 %5 to i64
%15 = getelementptr inbounds i32, i32* %13, i64 %14
%16 = getelementptr inbounds i32, i32* %15, i64 -1
%17 = bitcast i32* %16 to i8*
%18 = tail call i32 @free(i8* %17)
%19 = load i32**, i32*** %9
%20 = getelementptr inbounds i32*, i32** %19, i64 %11
%21 = getelementptr inbounds i32*, i32** %20, i64 -1
%22 = bitcast i32** %21 to i8*
%23 = tail call i32 @free(i8* %22)
%24 = getelementptr inbounds i32**, i32*** %9, i64 -1
%25 = bitcast i32*** %24 to i8*
%26 = tail call i32 @free(i8* %25)
ret void
}