void sliceedge_to_midperm_init(sl_to_mp_array) int sl_to_mp_array[11880];
{
  int sliceedge, sl_arr[12], mperm_arr[4];
  for (sliceedge = 0; sliceedge < 11880; sliceedge++) {
    sliceedge_unpack(sliceedge, sl_arr);
    if (unpacked_sliceedge_to_midperm(sl_arr, mperm_arr))
      sl_to_mp_array[sliceedge] = 54321;
    else
      sl_to_mp_array[sliceedge] = b_midperm_pack(mperm_arr);
  }
  return;
}


x86 assembly (clang, -O0):
<sliceedge_to_midperm_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2e68,-0xc(%rbp)
jge    11b5 <sliceedge_to_midperm_init+0x85>
mov    -0xc(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1030 <sliceedge_unpack@plt>
lea    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x0,%al
call   1040 <unpacked_sliceedge_to_midperm@plt>
cmp    $0x0,%eax
je     118a <sliceedge_to_midperm_init+0x5a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0xd431,(%rax,%rcx,4)
jmp    11a2 <sliceedge_to_midperm_init+0x72>
lea    -0x50(%rbp),%rdi
mov    $0x0,%al
call   1050 <b_midperm_pack@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    11a7 <sliceedge_to_midperm_init+0x77>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <sliceedge_to_midperm_init+0x13>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sliceedge_to_midperm_init>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rdi,%r14
lea    0x10(%rsp),%r12
mov    %rsp,%r15
xor    %ebx,%ebx
jmp    1161 <sliceedge_to_midperm_init+0x31>
nopw   0x0(%rax,%rax,1)
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x2e68,%rbx
je     1191 <sliceedge_to_midperm_init+0x61>
mov    %ebx,%edi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <sliceedge_unpack@plt>
mov    %r12,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <unpacked_sliceedge_to_midperm@plt>
mov    %eax,%ecx
mov    $0xd431,%eax
test   %ecx,%ecx
jne    1150 <sliceedge_to_midperm_init+0x20>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <b_midperm_pack@plt>
jmp    1150 <sliceedge_to_midperm_init+0x20>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @sliceedge_to_midperm_init(i32* nocapture writeonly %0) {
%2 = alloca [12 x i32]
%3 = alloca [4 x i32]
%4 = bitcast [12 x i32]* %2 to i8*
%5 = bitcast [4 x i32]* %3 to i8*
%6 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
br label %8
8: ; preds = %1, %16
%9 = phi i64 [ 0, %1 ], [ %19, %16 ]
%10 = trunc i64 %9 to i32
%11 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @sliceedge_unpack to i32 (i32, i32*, ...)*)(i32 %10, i32* %6)
%12 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @unpacked_sliceedge_to_midperm to i32 (i32*, i32*, ...)*)(i32* %6, i32* %7)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = call i32 (i32*, ...) bitcast (i32 (...)* @b_midperm_pack to i32 (i32*, ...)*)(i32* %7)
br label %16
16: ; preds = %8, %14
%17 = phi i32 [ %15, %14 ], [ 54321, %8 ]
%18 = getelementptr inbounds i32, i32* %0, i64 %9
store i32 %17, i32* %18
%19 = add nuw nsw i64 %9, 1
%20 = icmp eq i64 %19, 11880
br i1 %20, label %21, label %8
21: ; preds = %16
ret void
}