#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*/ convert_linear_index_to_3d_indices_inline(int, int, int, int,
                                                             int, int, int);
void convert_linear_index_to_3d_indices(int linear_index, int *nx_ny_nz,
                                        int *index_vector) {
  convert_linear_index_to_3d_indices_inline(
      linear_index, nx_ny_nz[0], nx_ny_nz[1], nx_ny_nz[2], index_vector[0],
      index_vector[1], index_vector[2]);
}


x86 assembly (clang, -O0):
<convert_linear_index_to_3d_indices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    (%rax),%r8d
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%r9d
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,(%rsp)
call   1030 <convert_linear_index_to_3d_indices_inline@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_linear_index_to_3d_indices>:
push   %rax
mov    (%rsi),%eax
mov    0x4(%rsi),%r10d
mov    0x8(%rsi),%ecx
mov    (%rdx),%r8d
mov    0x4(%rdx),%r9d
mov    0x8(%rdx),%edx
mov    %edx,(%rsp)
mov    %eax,%esi
mov    %r10d,%edx
call   1030 <convert_linear_index_to_3d_indices_inline@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @convert_linear_index_to_3d_indices(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = load i32*, i32** %5
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = load i32*, i32** %5
%15 = getelementptr inbounds i32, i32* %14, i64 2
%16 = load i32, i32* %15
%17 = load i32*, i32** %6
%18 = getelementptr inbounds i32, i32* %17, i64 0
%19 = load i32, i32* %18
%20 = load i32*, i32** %6
%21 = getelementptr inbounds i32, i32* %20, i64 1
%22 = load i32, i32* %21
%23 = load i32*, i32** %6
%24 = getelementptr inbounds i32, i32* %23, i64 2
%25 = load i32, i32* %24
%26 = call i32 @convert_linear_index_to_3d_indices_inline(i32 %7, i32 %10, i32 %13, i32 %16, i32 %19, i32 %22, i32 %25)
ret void
}

LLVM IR (-O2):
define void @convert_linear_index_to_3d_indices(i32 %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %1, i64 2
%8 = load i32, i32* %7
%9 = load i32, i32* %2
%10 = getelementptr inbounds i32, i32* %2, i64 1
%11 = load i32, i32* %10
%12 = getelementptr inbounds i32, i32* %2, i64 2
%13 = load i32, i32* %12
%14 = tail call i32 @convert_linear_index_to_3d_indices_inline(i32 %0, i32 %4, i32 %6, i32 %8, i32 %9, i32 %11, i32 %13)
ret void
}