#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 */
scalar_t__ isCopyElemnt(int, int *);
int rand();
void fillSizeList(int arr[]) {
  int i = 0, temp = 0;
  while (i < arr[-1]) {
    temp = (rand() % 25) * 100;
    if (isCopyElemnt(temp, arr) || temp == 0)
      continue;
    arr[i] = temp;
    i++;
  }
}


x86 assembly (clang, -O0):
<fillSizeList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    -0x4(%rcx),%eax
jge    11a0 <fillSizeList+0x80>
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x19,%ecx
cltd
idiv   %ecx
imul   $0x64,%edx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <isCopyElemnt@plt>
cmp    $0x0,%rax
jne    117f <fillSizeList+0x5f>
cmpl   $0x0,-0x10(%rbp)
jne    1184 <fillSizeList+0x64>
jmp    113a <fillSizeList+0x1a>
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <fillSizeList+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillSizeList>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
xor    %r14d,%r14d
nopl   (%rax)
movslq -0x4(%r15),%rax
cmp    %rax,%r14
jge    117f <fillSizeList+0x5f>
xor    %eax,%eax
call   1040 <rand@plt>
movslq %eax,%rbx
imul   $0x51eb851f,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x23,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
imul   $0x64,%ebx,%ebp
mov    %ebp,%edi
mov    %r15,%rsi
call   1030 <isCopyElemnt@plt>
test   %rax,%rax
jne    1130 <fillSizeList+0x10>
test   %ebx,%ebx
je     1130 <fillSizeList+0x10>
mov    %ebp,(%r15,%r14,4)
add    $0x1,%r14
jmp    1130 <fillSizeList+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @fillSizeList(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %23, %22, %1
%6 = load i32, i32* %3
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 -1
%9 = load i32, i32* %8
%10 = icmp slt i32 %6, %9
br i1 %10, label %11, label %31
11: ; preds = %5
%12 = call i32 (...) @rand()
%13 = srem i32 %12, 25
%14 = mul nsw i32 %13, 100
store i32 %14, i32* %4
%15 = load i32, i32* %4
%16 = load i32*, i32** %2
%17 = call i64 @isCopyElemnt(i32 %15, i32* %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %11
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %19, %11
br label %5
23: ; preds = %19
%24 = load i32, i32* %4
%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
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %5
31: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @fillSizeList(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 -1
br label %3
3: ; preds = %17, %1
%4 = phi i64 [ %19, %17 ], [ 0, %1 ]
br label %5
5: ; preds = %3, %9
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = icmp slt i64 %4, %7
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 25
%12 = mul nsw i32 %11, 100
%13 = tail call i64 @isCopyElemnt(i32 %12, i32* %0)
%14 = icmp ne i64 %13, 0
%15 = icmp eq i32 %11, 0
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %5, label %17
17: ; preds = %9
%18 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %12, i32* %18
%19 = add nuw nsw i64 %4, 1
br label %3
20: ; preds = %5
ret void
}