#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 ne_put_ss_param_global(int, int *, int *, int *);
int ne_test_pssp(int fileid) {
  int i, global_ids[3], global_el_cnts[3], global_df_cnts[3];
  for (i = 0; i < 3; i++) {
    global_ids[i] = 3 * (i + 1);
    global_el_cnts[i] = 2 * (i + 1);
    global_df_cnts[i] = 1;
  }
  return (ne_put_ss_param_global(fileid, global_ids, global_el_cnts,
                                 global_df_cnts));
}


x86 assembly (clang, -O0):
<ne_test_pssp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1168 <ne_test_pssp+0x58>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
imul   $0x3,%eax,%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x14(%rbp,%rax,4)
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
shl    $0x1,%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
movslq -0x8(%rbp),%rax
movl   $0x1,-0x2c(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ne_test_pssp+0x12>
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x2c(%rbp),%rcx
call   1030 <ne_put_ss_param_global@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_test_pssp>:
sub    $0x28,%rsp
movl   $0x3,0x1c(%rsp)
movl   $0x2,0x10(%rsp)
movl   $0x1,0x4(%rsp)
movabs $0x900000006,%rax
mov    %rax,0x20(%rsp)
movabs $0x600000004,%rax
mov    %rax,0x14(%rsp)
movabs $0x100000001,%rax
mov    %rax,0x8(%rsp)
lea    0x1c(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1030 <ne_put_ss_param_global@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @ne_test_pssp(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [3 x i32]
%5 = alloca [3 x i32]
%6 = alloca [3 x i32]
store i32 %0, i32* %2
store i32 0, i32* %3
br label %7
7: ; preds = %26, %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %29
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
%13 = mul nsw i32 3, %12
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 %15
store i32 %13, i32* %16
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
%19 = mul nsw i32 2, %18
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 %21
store i32 %19, i32* %22
%23 = load i32, i32* %3
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 %24
store i32 1, i32* %25
br label %26
26: ; preds = %10
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %7
29: ; preds = %7
%30 = load i32, i32* %2
%31 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%32 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%33 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%34 = call i32 @ne_put_ss_param_global(i32 %30, i32* %31, i32* %32, i32* %33)
ret i32 %34
}

LLVM IR (-O2):
define i32 @ne_test_pssp(i32 %0) {
%2 = alloca [3 x i32]
%3 = alloca [3 x i32]
%4 = alloca [3 x i32]
%5 = bitcast [3 x i32]* %2 to i8*
%6 = bitcast [3 x i32]* %3 to i8*
%7 = bitcast [3 x i32]* %4 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
store i32 3, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 2, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
store i32 1, i32* %10
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
store i32 6, i32* %11
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
store i32 4, i32* %12
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 1
store i32 1, i32* %13
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
store i32 9, i32* %14
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
store i32 6, i32* %15
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 2
store i32 1, i32* %16
%17 = call i32 @ne_put_ss_param_global(i32 %0, i32* %8, i32* %9, i32* %10)
ret i32 %17
}