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


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

x86 assembly (clang, -O2):
<ne_test_pnsp>:
sub    $0x18,%rsp
movabs $0x400000002,%rax
mov    %rax,0x10(%rsp)
movabs $0x600000003,%rax
mov    %rax,0x8(%rsp)
movabs $0x100000001,%rax
mov    %rax,(%rsp)
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1030 <ex_put_ns_param_global@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @ne_test_pnsp(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [2 x i32]
%5 = alloca [2 x i32]
%6 = alloca [2 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, 2
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 2, %12
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [2 x i32], [2 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 3, %18
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [2 x i32], [2 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 [2 x i32], [2 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 [2 x i32], [2 x i32]* %4, i64 0, i64 0
%32 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%33 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%34 = call i32 @ex_put_ns_param_global(i32 %30, i32* %31, i32* %32, i32* %33)
ret i32 %34
}

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