#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 maximumGap(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int arry[] = {15252, 16764, 27963, 7817,  26155, 20757, 3478,  22602,
                20404, 6739,  16790, 10588, 16521, 6644,  20880, 15632,
                27078, 25463, 20124, 15728, 30042, 16604, 17223, 4388,
                23646, 32683, 23688, 12439, 30630, 3895,  7926,  22101,
                32406, 21540, 31799, 3768,  26679, 21799, 23740};
  printf("gap: %d\n", maximumGap(arry, 39));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x9c,%edx
call   1040 <memcpy@plt>
lea    -0xa0(%rbp),%rdi
mov    $0x27,%esi
call   1050 <maximumGap@plt>
mov    %eax,%esi
lea    0xf28(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xa0,%rsp
lea    0xec1(%rip),%rsi
mov    %rsp,%rbx
mov    $0x9c,%edx
mov    %rbx,%rdi
call   1040 <memcpy@plt>
mov    %rbx,%rdi
mov    $0x27,%esi
call   1050 <maximumGap@plt>
lea    0xf39(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arry = [39 x i32] [i32 15252, i32 16764, i32 27963, i32 7817, i32 26155, i32 20757, i32 3478, i32 22602, i32 20404, i32 6739, i32 16790, i32 10588, i32 16521, i32 6644, i32 20880, i32 15632, i32 27078, i32 25463, i32 20124, i32 15728, i32 30042, i32 16604, i32 17223, i32 4388, i32 23646, i32 32683, i32 23688, i32 12439, i32 30630, i32 3895, i32 7926, i32 22101, i32 32406, i32 21540, i32 31799, i32 3768, i32 26679, i32 21799, i32 23740]
@.str = [9 x i8] c"gap: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [39 x i32]
store i32 0, i32* %1
%3 = bitcast [39 x i32]* %2 to i8*
%4 = getelementptr inbounds [39 x i32], [39 x i32]* %2, i64 0, i64 0
%5 = call i32 @maximumGap(i32* %4, i32 39)
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arry = [39 x i32] [i32 15252, i32 16764, i32 27963, i32 7817, i32 26155, i32 20757, i32 3478, i32 22602, i32 20404, i32 6739, i32 16790, i32 10588, i32 16521, i32 6644, i32 20880, i32 15632, i32 27078, i32 25463, i32 20124, i32 15728, i32 30042, i32 16604, i32 17223, i32 4388, i32 23646, i32 32683, i32 23688, i32 12439, i32 30630, i32 3895, i32 7926, i32 22101, i32 32406, i32 21540, i32 31799, i32 3768, i32 26679, i32 21799, i32 23740]
@.str = [9 x i8] c"gap: %d\0A\00"
define i32 @main() {
%1 = alloca [39 x i32]
%2 = bitcast [39 x i32]* %1 to i8*
%3 = getelementptr inbounds [39 x i32], [39 x i32]* %1, i64 0, i64 0
%4 = call i32 @maximumGap(i32* %3, i32 39)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}