#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 mulTable(int, int);
int *divisionlookuparray() {
  int static divisionArray[256] = {};
  int *pointer;
  pointer = divisionArray;
  for (int divisionCounter = 0; divisionCounter < 256; divisionCounter++) {
    for (int divisionCounter2 = 0; divisionCounter2 < 256; divisionCounter2++) {
      int mulResult = mulTable(divisionCounter, divisionCounter2);
      if (mulResult == 1) {
        divisionArray[divisionCounter] = divisionCounter2;
      }
    }
  }
  return pointer;
}


x86 assembly (clang, -O0):
<divisionlookuparray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0x2f21(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    119a <divisionlookuparray+0x8a>
movl   $0x0,-0x10(%rbp)
cmpl   $0x100,-0x10(%rbp)
jge    1187 <divisionlookuparray+0x77>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <mulTable@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1174 <divisionlookuparray+0x64>
mov    -0x10(%rbp),%edx
movslq -0xc(%rbp),%rcx
lea    0x2ecf(%rip),%rax
mov    %edx,(%rax,%rcx,4)
jmp    1179 <divisionlookuparray+0x69>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113e <divisionlookuparray+0x2e>
jmp    118c <divisionlookuparray+0x7c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <divisionlookuparray+0x1a>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divisionlookuparray>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
lea    0x2f23(%rip),%r14
jmp    112d <divisionlookuparray+0x1d>
nop
add    $0x1,%rbx
cmp    $0x100,%rbx
je     115f <divisionlookuparray+0x4f>
xor    %ebp,%ebp
jmp    114b <divisionlookuparray+0x3b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
cmp    $0x100,%ebp
je     1120 <divisionlookuparray+0x10>
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <mulTable@plt>
cmp    $0x1,%eax
jne    1140 <divisionlookuparray+0x30>
mov    %ebp,(%r14,%rbx,4)
jmp    1140 <divisionlookuparray+0x30>
lea    0x2eda(%rip),%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@divisionlookuparray.divisionArray = internal global [256 x i32] zeroinitializer
define i32* @divisionlookuparray() {
br label %1
1: ; preds = %0, %6
%2 = phi i64 [ 0, %0 ], [ %7, %6 ]
%3 = getelementptr inbounds [256 x i32], [256 x i32]* @divisionlookuparray.divisionArray, i64 0, i64 %2
%4 = trunc i64 %2 to i32
br label %9
5: ; preds = %6
ret i32* getelementptr inbounds ([256 x i32], [256 x i32]* @divisionlookuparray.divisionArray, i64 0, i64 0)
6: ; preds = %14
%7 = add nuw nsw i64 %2, 1
%8 = icmp eq i64 %7, 256
br i1 %8, label %5, label %1
9: ; preds = %1, %14
%10 = phi i32 [ 0, %1 ], [ %15, %14 ]
%11 = tail call i32 @mulTable(i32 %4, i32 %10)
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 %10, i32* %3
br label %14
14: ; preds = %13, %9
%15 = add nuw nsw i32 %10, 1
%16 = icmp eq i32 %15, 256
br i1 %16, label %6, label %9
}