#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*/ ifill(int *, int, int);
void pxgstrf_SetIWork(int n, int panel_size, int *iworkptr, int **segrep,
                      int **parent, int **xplore, int **repfnz,
                      int **panel_lsub, int **marker, int **lbusy) {
  *segrep = iworkptr;
  *parent = iworkptr + n;
  *xplore = iworkptr + 2 * n;
  *repfnz = iworkptr + 4 * n;
  *panel_lsub = iworkptr + 4 * n + panel_size * n;
  *marker = iworkptr + 4 * n + 2 * panel_size * n;
  *lbusy = iworkptr + (4 + 3) * n + 2 * panel_size * n;
  ifill(*repfnz, n * panel_size, (-1));
}


x86 assembly (clang, -O0):
<pxgstrf_SetIWork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
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    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
imul   $0x7,-0x4(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x4(%rbp),%esi
imul   -0x8(%rbp),%esi
mov    $0xffffffff,%edx
call   1030 <ifill@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pxgstrf_SetIWork>:
push   %r15
push   %r14
push   %rbx
mov    0x38(%rsp),%r10
mov    0x30(%rsp),%r11
mov    0x28(%rsp),%r14
mov    0x20(%rsp),%r15
mov    %rdx,(%rcx)
movslq %edi,%rcx
lea    (%rdx,%rcx,4),%rdi
mov    %rdi,(%r8)
lea    (%rcx,%rcx,1),%edi
movslq %edi,%rdi
lea    (%rdx,%rdi,4),%rbx
mov    %rbx,(%r9)
lea    0x0(,%rcx,4),%ebx
movslq %ebx,%rbx
lea    (%rdx,%rbx,4),%rbx
mov    %rbx,(%r15)
imul   %esi,%edi
imul   %ecx,%esi
movslq %esi,%rsi
lea    (%rbx,%rsi,4),%rax
mov    %rax,(%r14)
movslq %edi,%rax
lea    (%rbx,%rax,4),%rdi
mov    %rdi,(%r11)
lea    0x0(,%rcx,8),%edi
sub    %ecx,%edi
movslq %edi,%rcx
lea    (%rdx,%rcx,4),%rcx
lea    (%rcx,%rax,4),%rax
mov    %rax,(%r10)
mov    (%r15),%rdi
mov    $0xffffffff,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <ifill@plt>

LLVM IR (-O0):
define void @pxgstrf_SetIWork(i32 %0, i32 %1, i32* %2, i32** %3, i32** %4, i32** %5, i32** %6, i32** %7, i32** %8, i32** %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32**
%15 = alloca i32**
%16 = alloca i32**
%17 = alloca i32**
%18 = alloca i32**
%19 = alloca i32**
%20 = alloca i32**
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32* %2, i32** %13
store i32** %3, i32*** %14
store i32** %4, i32*** %15
store i32** %5, i32*** %16
store i32** %6, i32*** %17
store i32** %7, i32*** %18
store i32** %8, i32*** %19
store i32** %9, i32*** %20
%21 = load i32*, i32** %13
%22 = load i32**, i32*** %14
store i32* %21, i32** %22
%23 = load i32*, i32** %13
%24 = load i32, i32* %11
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
%27 = load i32**, i32*** %15
store i32* %26, i32** %27
%28 = load i32*, i32** %13
%29 = load i32, i32* %11
%30 = mul nsw i32 2, %29
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* %28, i64 %31
%33 = load i32**, i32*** %16
store i32* %32, i32** %33
%34 = load i32*, i32** %13
%35 = load i32, i32* %11
%36 = mul nsw i32 4, %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i32, i32* %34, i64 %37
%39 = load i32**, i32*** %17
store i32* %38, i32** %39
%40 = load i32*, i32** %13
%41 = load i32, i32* %11
%42 = mul nsw i32 4, %41
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i32, i32* %40, i64 %43
%45 = load i32, i32* %12
%46 = load i32, i32* %11
%47 = mul nsw i32 %45, %46
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i32, i32* %44, i64 %48
%50 = load i32**, i32*** %18
store i32* %49, i32** %50
%51 = load i32*, i32** %13
%52 = load i32, i32* %11
%53 = mul nsw i32 4, %52
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i32, i32* %51, i64 %54
%56 = load i32, i32* %12
%57 = mul nsw i32 2, %56
%58 = load i32, i32* %11
%59 = mul nsw i32 %57, %58
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i32, i32* %55, i64 %60
%62 = load i32**, i32*** %19
store i32* %61, i32** %62
%63 = load i32*, i32** %13
%64 = load i32, i32* %11
%65 = mul nsw i32 7, %64
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i32, i32* %63, i64 %66
%68 = load i32, i32* %12
%69 = mul nsw i32 2, %68
%70 = load i32, i32* %11
%71 = mul nsw i32 %69, %70
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i32, i32* %67, i64 %72
%74 = load i32**, i32*** %20
store i32* %73, i32** %74
%75 = load i32**, i32*** %17
%76 = load i32*, i32** %75
%77 = load i32, i32* %11
%78 = load i32, i32* %12
%79 = mul nsw i32 %77, %78
%80 = call i32 @ifill(i32* %76, i32 %79, i32 -1)
ret void
}

LLVM IR (-O2):
define void @pxgstrf_SetIWork(i32 %0, i32 %1, i32* %2, i32** nocapture writeonly %3, i32** nocapture writeonly %4, i32** nocapture writeonly %5, i32** nocapture %6, i32** nocapture writeonly %7, i32** nocapture writeonly %8, i32** nocapture writeonly %9) {
store i32* %2, i32** %3
%11 = sext i32 %0 to i64
%12 = getelementptr inbounds i32, i32* %2, i64 %11
store i32* %12, i32** %4
%13 = shl i32 %0, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %2, i64 %14
store i32* %15, i32** %5
%16 = shl nsw i32 %0, 2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %2, i64 %17
store i32* %18, i32** %6
%19 = mul nsw i32 %1, %0
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32* %21, i32** %7
%22 = mul i32 %13, %1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %18, i64 %23
store i32* %24, i32** %8
%25 = mul nsw i32 %0, 7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %2, i64 %26
%28 = getelementptr inbounds i32, i32* %27, i64 %23
store i32* %28, i32** %9
%29 = load i32*, i32** %6
%30 = tail call i32 @ifill(i32* %29, i32 %19, i32 -1)
ret void
}