#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_elem_map(int, int *, int *, int);
int ne_test_pem(int fileid) {
  int iproc, j, error, j1 = 0;
  int elem_mapi[100], elem_mapb[20];
  for (iproc = 0; iproc < 10; iproc++) {
    for (j = 0; j < 100; elem_mapi[j++] = j1++)
      ;
    for (j = 0; j < 20; elem_mapb[j++] = j1++)
      ;
    j1 = 0;
    error = ne_put_elem_map(fileid, elem_mapi, elem_mapb, iproc);
    if (error < 0)
      return error;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ne_test_pem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11f5 <ne_test_pem+0xe5>
movl   $0x0,-0x10(%rbp)
cmpl   $0x64,-0x10(%rbp)
jge    1170 <ne_test_pem+0x60>
jmp    114c <ne_test_pem+0x3c>
mov    -0x18(%rbp),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %ecx,-0x1b0(%rbp,%rax,4)
jmp    113d <ne_test_pem+0x2d>
movl   $0x0,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    11aa <ne_test_pem+0x9a>
jmp    1186 <ne_test_pem+0x76>
mov    -0x18(%rbp),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
cltq
mov    %ecx,-0x200(%rbp,%rax,4)
jmp    1177 <ne_test_pem+0x67>
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x1b0(%rbp),%rsi
lea    -0x200(%rbp),%rdx
mov    -0xc(%rbp),%ecx
call   1030 <ne_put_elem_map@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    11e2 <ne_test_pem+0xd2>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11fc <ne_test_pem+0xec>
jmp    11e7 <ne_test_pem+0xd7>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112c <ne_test_pem+0x1c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_test_pem>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x1e8,%rsp
mov    %edi,%ebx
xor    %ebp,%ebp
lea    0x50(%rsp),%r14
mov    %rsp,%r15
nopl   0x0(%rax)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xede(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xedf(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movaps 0xee6(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps 0xee7(%rip),%xmm0
movaps %xmm0,0x1a0(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x1b0(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x1c0(%rsp)
movaps 0xeea(%rip),%xmm0
movaps %xmm0,0x1d0(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xef0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xef4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xef8(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xefc(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
mov    %ebx,%edi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %ebp,%ecx
call   1030 <ne_put_elem_map@plt>
test   %eax,%eax
js     12fa <ne_test_pem+0x1ea>
add    $0x1,%ebp
cmp    $0xa,%ebp
jne    1130 <ne_test_pem+0x20>
xor    %eax,%eax
add    $0x1e8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ne_test_pem(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [100 x i32]
%9 = alloca [20 x i32]
store i32 %0, i32* %3
store i32 0, i32* %7
store i32 0, i32* %4
br label %10
10: ; preds = %48, %1
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %51
13: ; preds = %10
store i32 0, i32* %5
br label %14
14: ; preds = %18, %13
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 100
br i1 %16, label %17, label %25
17: ; preds = %14
br label %18
18: ; preds = %17
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
store i32 %20, i32* %7
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
%23 = sext i32 %21 to i64
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %8, i64 0, i64 %23
store i32 %19, i32* %24
br label %14
25: ; preds = %14
store i32 0, i32* %5
br label %26
26: ; preds = %30, %25
%27 = load i32, i32* %5
%28 = icmp slt i32 %27, 20
br i1 %28, label %29, label %37
29: ; preds = %26
br label %30
30: ; preds = %29
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
%35 = sext i32 %33 to i64
%36 = getelementptr inbounds [20 x i32], [20 x i32]* %9, i64 0, i64 %35
store i32 %31, i32* %36
br label %26
37: ; preds = %26
store i32 0, i32* %7
%38 = load i32, i32* %3
%39 = getelementptr inbounds [100 x i32], [100 x i32]* %8, i64 0, i64 0
%40 = getelementptr inbounds [20 x i32], [20 x i32]* %9, i64 0, i64 0
%41 = load i32, i32* %4
%42 = call i32 @ne_put_elem_map(i32 %38, i32* %39, i32* %40, i32 %41)
store i32 %42, i32* %6
%43 = load i32, i32* %6
%44 = icmp slt i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %37
%46 = load i32, i32* %6
store i32 %46, i32* %2
br label %52
47: ; preds = %37
br label %48
48: ; preds = %47
%49 = load i32, i32* %4
%50 = add nsw i32 %49, 1
store i32 %50, i32* %4
br label %10
51: ; preds = %10
store i32 0, i32* %2
br label %52
52: ; preds = %51, %45
%53 = load i32, i32* %2
ret i32 %53
}

LLVM IR (-O2):
define i32 @ne_test_pem(i32 %0) {
%2 = alloca [100 x i32]
%3 = alloca [20 x i32]
%4 = bitcast [100 x i32]* %2 to i8*
%5 = bitcast [20 x i32]* %3 to i8*
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%7 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 0
%8 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 4
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 8
%10 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 12
%11 = getelementptr inbounds [20 x i32], [20 x i32]* %3, i64 0, i64 16
%12 = bitcast [20 x i32]* %3 to <4 x i32>*
%13 = bitcast [100 x i32]* %2 to <4 x i32>*
%14 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 4
%15 = bitcast i32* %14 to <4 x i32>*
%16 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 8
%17 = bitcast i32* %16 to <4 x i32>*
%18 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 12
%19 = bitcast i32* %18 to <4 x i32>*
%20 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 16
%21 = bitcast i32* %20 to <4 x i32>*
%22 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 20
%23 = bitcast i32* %22 to <4 x i32>*
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 24
%25 = bitcast i32* %24 to <4 x i32>*
%26 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 28
%27 = bitcast i32* %26 to <4 x i32>*
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 32
%29 = bitcast i32* %28 to <4 x i32>*
%30 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 36
%31 = bitcast i32* %30 to <4 x i32>*
%32 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 40
%33 = bitcast i32* %32 to <4 x i32>*
%34 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 44
%35 = bitcast i32* %34 to <4 x i32>*
%36 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 48
%37 = bitcast i32* %36 to <4 x i32>*
%38 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 52
%39 = bitcast i32* %38 to <4 x i32>*
%40 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 56
%41 = bitcast i32* %40 to <4 x i32>*
%42 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 60
%43 = bitcast i32* %42 to <4 x i32>*
%44 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 64
%45 = bitcast i32* %44 to <4 x i32>*
%46 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 68
%47 = bitcast i32* %46 to <4 x i32>*
%48 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 72
%49 = bitcast i32* %48 to <4 x i32>*
%50 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 76
%51 = bitcast i32* %50 to <4 x i32>*
%52 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 80
%53 = bitcast i32* %52 to <4 x i32>*
%54 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 84
%55 = bitcast i32* %54 to <4 x i32>*
%56 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 88
%57 = bitcast i32* %56 to <4 x i32>*
%58 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 92
%59 = bitcast i32* %58 to <4 x i32>*
%60 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 96
%61 = bitcast i32* %60 to <4 x i32>*
%62 = bitcast i32* %8 to <4 x i32>*
%63 = bitcast i32* %9 to <4 x i32>*
%64 = bitcast i32* %10 to <4 x i32>*
%65 = bitcast i32* %11 to <4 x i32>*
br label %69
66: ; preds = %69
%67 = add nuw nsw i32 %70, 1
%68 = icmp eq i32 %67, 10
br i1 %68, label %73, label %69
69: ; preds = %66, %1
%70 = phi i32 [ 0, %1 ], [ %67, %66 ]
store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %13
store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, <4 x i32>* %15
store <4 x i32> <i32 8, i32 9, i32 10, i32 11>, <4 x i32>* %17
store <4 x i32> <i32 12, i32 13, i32 14, i32 15>, <4 x i32>* %19
store <4 x i32> <i32 16, i32 17, i32 18, i32 19>, <4 x i32>* %21
store <4 x i32> <i32 20, i32 21, i32 22, i32 23>, <4 x i32>* %23
store <4 x i32> <i32 24, i32 25, i32 26, i32 27>, <4 x i32>* %25
store <4 x i32> <i32 28, i32 29, i32 30, i32 31>, <4 x i32>* %27
store <4 x i32> <i32 32, i32 33, i32 34, i32 35>, <4 x i32>* %29
store <4 x i32> <i32 36, i32 37, i32 38, i32 39>, <4 x i32>* %31
store <4 x i32> <i32 40, i32 41, i32 42, i32 43>, <4 x i32>* %33
store <4 x i32> <i32 44, i32 45, i32 46, i32 47>, <4 x i32>* %35
store <4 x i32> <i32 48, i32 49, i32 50, i32 51>, <4 x i32>* %37
store <4 x i32> <i32 52, i32 53, i32 54, i32 55>, <4 x i32>* %39
store <4 x i32> <i32 56, i32 57, i32 58, i32 59>, <4 x i32>* %41
store <4 x i32> <i32 60, i32 61, i32 62, i32 63>, <4 x i32>* %43
store <4 x i32> <i32 64, i32 65, i32 66, i32 67>, <4 x i32>* %45
store <4 x i32> <i32 68, i32 69, i32 70, i32 71>, <4 x i32>* %47
store <4 x i32> <i32 72, i32 73, i32 74, i32 75>, <4 x i32>* %49
store <4 x i32> <i32 76, i32 77, i32 78, i32 79>, <4 x i32>* %51
store <4 x i32> <i32 80, i32 81, i32 82, i32 83>, <4 x i32>* %53
store <4 x i32> <i32 84, i32 85, i32 86, i32 87>, <4 x i32>* %55
store <4 x i32> <i32 88, i32 89, i32 90, i32 91>, <4 x i32>* %57
store <4 x i32> <i32 92, i32 93, i32 94, i32 95>, <4 x i32>* %59
store <4 x i32> <i32 96, i32 97, i32 98, i32 99>, <4 x i32>* %61
store <4 x i32> <i32 100, i32 101, i32 102, i32 103>, <4 x i32>* %12
store <4 x i32> <i32 104, i32 105, i32 106, i32 107>, <4 x i32>* %62
store <4 x i32> <i32 108, i32 109, i32 110, i32 111>, <4 x i32>* %63
store <4 x i32> <i32 112, i32 113, i32 114, i32 115>, <4 x i32>* %64
store <4 x i32> <i32 116, i32 117, i32 118, i32 119>, <4 x i32>* %65
%71 = call i32 @ne_put_elem_map(i32 %0, i32* %6, i32* %7, i32 %70)
%72 = icmp slt i32 %71, 0
br i1 %72, label %73, label %66
73: ; preds = %66, %69
%74 = phi i32 [ %71, %69 ], [ 0, %66 ]
ret i32 %74
}