#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_eb_info_global(int, int *, int *);
int ne_test_pelbid(int fileid) {
  int i, elblk_ids[5], elblk_cnt[5];
  for (i = 0; i < 5; i++) {
    elblk_ids[i] = (i + 1);
    elblk_cnt[i] = 10;
  }
  return (ne_put_eb_info_global(fileid, elblk_ids, elblk_cnt));
}


x86 assembly (clang, -O0):
<ne_test_pelbid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1154 <ne_test_pelbid+0x44>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
movslq -0x8(%rbp),%rax
movl   $0xa,-0x40(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ne_test_pelbid+0x12>
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1030 <ne_put_eb_info_global@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_test_pelbid>:
sub    $0x38,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x5,0x30(%rsp)
movl   $0xa,0x10(%rsp)
lea    0x20(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <ne_put_eb_info_global@plt>
add    $0x38,%rsp
ret

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

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