#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 indxl2g(int const, int const, int const, int /*<<< orphan*/, int const);
void l2gpair(const int i, const int j, int *restrict gi, int *restrict gj,
             const int *restrict desc, const int *restrict blacs) {
  *gi = indxl2g(i, desc[5 - 1], blacs[4 - 1], 0, blacs[2 - 1]);
  *gj = indxl2g(j, desc[6 - 1], blacs[5 - 1], 0, blacs[3 - 1]);
}


x86 assembly (clang, -O0):
<l2gpair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%esi
mov    -0x28(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0x28(%rbp),%rax
mov    0x4(%rax),%r8d
xor    %ecx,%ecx
call   1030 <indxl2g@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x20(%rbp),%rax
mov    0x14(%rax),%esi
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%edx
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%r8d
xor    %ecx,%ecx
call   1030 <indxl2g@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l2gpair>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r9,%rbx
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %esi,%ebp
mov    0x10(%r8),%esi
mov    0x4(%r9),%r8d
mov    0xc(%r9),%edx
xor    %ecx,%ecx
call   1030 <indxl2g@plt>
mov    %eax,(%r12)
mov    0x14(%r14),%esi
mov    0x8(%rbx),%r8d
mov    0x10(%rbx),%edx
mov    %ebp,%edi
xor    %ecx,%ecx
call   1030 <indxl2g@plt>
mov    %eax,(%r15)
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @l2gpair(i32 %0, i32 %1, i32* noalias %2, i32* noalias %3, i32* noalias %4, i32* noalias %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i32, i32* %7
%14 = load i32*, i32** %11
%15 = getelementptr inbounds i32, i32* %14, i64 4
%16 = load i32, i32* %15
%17 = load i32*, i32** %12
%18 = getelementptr inbounds i32, i32* %17, i64 3
%19 = load i32, i32* %18
%20 = load i32*, i32** %12
%21 = getelementptr inbounds i32, i32* %20, i64 1
%22 = load i32, i32* %21
%23 = call i32 @indxl2g(i32 %13, i32 %16, i32 %19, i32 0, i32 %22)
%24 = load i32*, i32** %9
store i32 %23, i32* %24
%25 = load i32, i32* %8
%26 = load i32*, i32** %11
%27 = getelementptr inbounds i32, i32* %26, i64 5
%28 = load i32, i32* %27
%29 = load i32*, i32** %12
%30 = getelementptr inbounds i32, i32* %29, i64 4
%31 = load i32, i32* %30
%32 = load i32*, i32** %12
%33 = getelementptr inbounds i32, i32* %32, i64 2
%34 = load i32, i32* %33
%35 = call i32 @indxl2g(i32 %25, i32 %28, i32 %31, i32 0, i32 %34)
%36 = load i32*, i32** %10
store i32 %35, i32* %36
ret void
}

LLVM IR (-O2):
define void @l2gpair(i32 %0, i32 %1, i32* noalias nocapture writeonly %2, i32* noalias nocapture writeonly %3, i32* noalias nocapture %4, i32* noalias nocapture %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 4
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %5, i64 3
%10 = load i32, i32* %9
%11 = getelementptr inbounds i32, i32* %5, i64 1
%12 = load i32, i32* %11
%13 = tail call i32 @indxl2g(i32 %0, i32 %8, i32 %10, i32 0, i32 %12)
store i32 %13, i32* %2
%14 = getelementptr inbounds i32, i32* %4, i64 5
%15 = load i32, i32* %14
%16 = getelementptr inbounds i32, i32* %5, i64 4
%17 = load i32, i32* %16
%18 = getelementptr inbounds i32, i32* %5, i64 2
%19 = load i32, i32* %18
%20 = tail call i32 @indxl2g(i32 %1, i32 %15, i32 %17, i32 0, i32 %19)
store i32 %20, i32* %3
ret void
}