#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 */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int compareParams(GLdouble *oneArray, GLdouble *twoArray, int size) {
  int i;
  int matches = 1;
  for (i = 0; (i < size) && matches; i++) {
    if (*oneArray++ != *twoArray++)
      matches = 0;
  }
  return (matches);
}


x86 assembly (clang, -O0):
<compareParams>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x1d(%rbp)
jge    1138 <compareParams+0x38>
cmpl   $0x0,-0x1c(%rbp)
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1148 <compareParams+0x48>
jmp    118a <compareParams+0x8a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
cmp    (%rcx),%eax
je     1177 <compareParams+0x77>
movl   $0x0,-0x1c(%rbp)
jmp    117c <compareParams+0x7c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111d <compareParams+0x1d>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareParams>:
test   %edx,%edx
jle    112d <compareParams+0x2d>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
mov    (%rdi,%rax,4),%r8d
mov    (%rsi,%rax,4),%ecx
add    $0x1,%rax
cmp    %edx,%eax
jge    1124 <compareParams+0x24>
cmp    %ecx,%r8d
je     1110 <compareParams+0x10>
xor    %eax,%eax
cmp    %ecx,%r8d
sete   %al
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @compareParams(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
store i32 1, i32* %8
store i32 0, i32* %7
br label %9
9: ; preds = %28, %3
%10 = load i32, i32* %7
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %8
%15 = icmp ne i32 %14, 0
br label %16
16: ; preds = %13, %9
%17 = phi i1 [ false, %9 ], [ %15, %13 ]
br i1 %17, label %18, label %31
18: ; preds = %16
%19 = load i32*, i32** %4
%20 = getelementptr inbounds i32, i32* %19, i32 1
store i32* %20, i32** %4
%21 = load i32, i32* %19
%22 = load i32*, i32** %5
%23 = getelementptr inbounds i32, i32* %22, i32 1
store i32* %23, i32** %5
%24 = load i32, i32* %22
%25 = icmp ne i32 %21, %24
br i1 %25, label %26, label %27
26: ; preds = %18
store i32 0, i32* %8
br label %27
27: ; preds = %26, %18
br label %28
28: ; preds = %27
%29 = load i32, i32* %7
%30 = add nsw i32 %29, 1
store i32 %30, i32* %7
br label %9
31: ; preds = %16
%32 = load i32, i32* %8
ret i32 %32
}

LLVM IR (-O2):
define i32 @compareParams(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %19
5: ; preds = %3, %5
%6 = phi i32 [ %14, %5 ], [ 0, %3 ]
%7 = phi i32* [ %9, %5 ], [ %0, %3 ]
%8 = phi i32* [ %11, %5 ], [ %1, %3 ]
%9 = getelementptr inbounds i32, i32* %7, i64 1
%10 = load i32, i32* %7
%11 = getelementptr inbounds i32, i32* %8, i64 1
%12 = load i32, i32* %8
%13 = icmp eq i32 %10, %12
%14 = add nuw nsw i32 %6, 1
%15 = icmp slt i32 %14, %2
%16 = and i1 %15, %13
br i1 %16, label %5, label %17
17: ; preds = %5
%18 = zext i1 %13 to i32
br label %19
19: ; preds = %17, %3
%20 = phi i32 [ 1, %3 ], [ %18, %17 ]
ret i32 %20
}