#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*/ matrix_ij_A(int, double *, double, double, double, double,
                               double);
void matrix_f_ij(int i, int j, double ex, double ey, double ez, double xa,
                 double ya, int n3, double *mat) {
  int i1;
  int j1;
  i1 = i * 3;
  j1 = j * 3;
  matrix_ij_A(n3, &mat[i1 * n3 + j1], ex, ey, ez, xa, ya);
}


x86 assembly (clang, -O0):
<matrix_f_ij>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
mov    %edx,-0x34(%rbp)
mov    %rcx,-0x40(%rbp)
imul   $0x3,-0x4(%rbp),%eax
mov    %eax,-0x44(%rbp)
imul   $0x3,-0x8(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x40(%rbp),%rsi
mov    -0x44(%rbp),%eax
imul   -0x34(%rbp),%eax
add    -0x48(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
call   1030 <matrix_ij_A@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix_f_ij>:
imul   %edx,%edi
add    %esi,%edi
lea    (%rdi,%rdi,2),%eax
cltq
lea    (%rcx,%rax,8),%rsi
mov    %edx,%edi
jmp    1030 <matrix_ij_A@plt>

LLVM IR (-O0):
define void @matrix_f_ij(i32 %0, i32 %1, double %2, double %3, double %4, double %5, double %6, i32 %7, double* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca i32
%18 = alloca double*
%19 = alloca i32
%20 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store i32 %7, i32* %17
store double* %8, double** %18
%21 = load i32, i32* %10
%22 = mul nsw i32 %21, 3
store i32 %22, i32* %19
%23 = load i32, i32* %11
%24 = mul nsw i32 %23, 3
store i32 %24, i32* %20
%25 = load i32, i32* %17
%26 = load double*, double** %18
%27 = load i32, i32* %19
%28 = load i32, i32* %17
%29 = mul nsw i32 %27, %28
%30 = load i32, i32* %20
%31 = add nsw i32 %29, %30
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %26, i64 %32
%34 = load double, double* %12
%35 = load double, double* %13
%36 = load double, double* %14
%37 = load double, double* %15
%38 = load double, double* %16
%39 = call i32 @matrix_ij_A(i32 %25, double* %33, double %34, double %35, double %36, double %37, double %38)
ret void
}

LLVM IR (-O2):
define void @matrix_f_ij(i32 %0, i32 %1, double %2, double %3, double %4, double %5, double %6, i32 %7, double* %8) {
%10 = mul i32 %7, %0
%11 = add i32 %10, %1
%12 = mul i32 %11, 3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %8, i64 %13
%15 = tail call i32 @matrix_ij_A(i32 %7, double* %14, double %2, double %3, double %4, double %5, double %6)
ret void
}