#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 /*<<< orphan*/ dotest(int *, int *, int, int);
int main() {
  {
    int a[8] = {121, 144, 19, 161, 19, 144, 19, 11};
    int b[8] = {14641, 20736, 361, 25921, 361, 20736, 361, 121};
    dotest(a, b, 8, true);
  }
  {
    int a[8] = {121, 144, 19, 161, 19, 144, 19, 11};
    int b[8] = {14641, 20736, 361, 25921, 361, 20736, 362, 121};
    dotest(a, b, 8, false);
  }
  {
    int a[9] = {121, 144, 19, 161, 19, 144, 19, 11, 1008};
    int b[9] = {14641, 20736, 361, 25921, 361, 20736, 362, 121, 12340};
    dotest(a, b, 9, false);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    0xece(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb9(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x8,%edx
mov    $0x1,%ecx
call   1030 <dotest@plt>
mov    0xe5f(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe5c(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe59(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe56(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe73(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe70(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe6d(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe6a(%rip),%rax
mov    %rax,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x8,%edx
xor    %ecx,%ecx
call   1030 <dotest@plt>
lea    -0xb0(%rbp),%rdi
lea    0xe4c(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
lea    -0xe0(%rbp),%rdi
lea    0xe64(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
lea    -0xb0(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
mov    $0x9,%edx
xor    %ecx,%ecx
call   1030 <dotest@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x30(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x8,%edx
mov    $0x1,%ecx
call   1030 <dotest@plt>
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeb3(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x30(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x8,%edx
xor    %ecx,%ecx
call   1030 <dotest@plt>
mov    0xedd(%rip),%eax
mov    %eax,0x50(%rsp)
movaps 0xec2(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xea6(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    0xeeb(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x30(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x9,%edx
xor    %ecx,%ecx
call   1030 <dotest@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [8 x i32] [i32 121, i32 144, i32 19, i32 161, i32 19, i32 144, i32 19, i32 11]
@__const.main.b = [8 x i32] [i32 14641, i32 20736, i32 361, i32 25921, i32 361, i32 20736, i32 361, i32 121]
@__const.main.a.1 = [8 x i32] [i32 121, i32 144, i32 19, i32 161, i32 19, i32 144, i32 19, i32 11]
@__const.main.b.2 = [8 x i32] [i32 14641, i32 20736, i32 361, i32 25921, i32 361, i32 20736, i32 362, i32 121]
@__const.main.a.3 = [9 x i32] [i32 121, i32 144, i32 19, i32 161, i32 19, i32 144, i32 19, i32 11, i32 1008]
@__const.main.b.4 = [9 x i32] [i32 14641, i32 20736, i32 361, i32 25921, i32 361, i32 20736, i32 362, i32 121, i32 12340]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = alloca [8 x i32]
%3 = alloca [8 x i32]
%4 = alloca [8 x i32]
%5 = alloca [9 x i32]
%6 = alloca [9 x i32]
%7 = bitcast [8 x i32]* %1 to i8*
%8 = bitcast [8 x i32]* %2 to i8*
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%11 = call i32 @dotest(i32* %9, i32* %10, i32 8, i32 1)
%12 = bitcast [8 x i32]* %3 to i8*
%13 = bitcast [8 x i32]* %4 to i8*
%14 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%15 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%16 = call i32 @dotest(i32* %14, i32* %15, i32 8, i32 0)
%17 = bitcast [9 x i32]* %5 to i8*
%18 = bitcast [9 x i32]* %6 to i8*
%19 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 0
%20 = getelementptr inbounds [9 x i32], [9 x i32]* %6, i64 0, i64 0
%21 = call i32 @dotest(i32* %19, i32* %20, i32 9, i32 0)
ret i32 0
}

LLVM IR (-O2):
@__const.main.b = [8 x i32] [i32 14641, i32 20736, i32 361, i32 25921, i32 361, i32 20736, i32 361, i32 121]
@__const.main.a.1 = [8 x i32] [i32 121, i32 144, i32 19, i32 161, i32 19, i32 144, i32 19, i32 11]
@__const.main.b.2 = [8 x i32] [i32 14641, i32 20736, i32 361, i32 25921, i32 361, i32 20736, i32 362, i32 121]
@__const.main.a.3 = [9 x i32] [i32 121, i32 144, i32 19, i32 161, i32 19, i32 144, i32 19, i32 11, i32 1008]
@__const.main.b.4 = [9 x i32] [i32 14641, i32 20736, i32 361, i32 25921, i32 361, i32 20736, i32 362, i32 121, i32 12340]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = alloca [8 x i32]
%3 = alloca [8 x i32]
%4 = alloca [8 x i32]
%5 = alloca [9 x i32]
%6 = alloca [9 x i32]
%7 = bitcast [8 x i32]* %1 to i8*
%8 = bitcast [8 x i32]* %2 to i8*
%9 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%11 = call i32 @dotest(i32* %9, i32* %10, i32 8, i32 1)
%12 = bitcast [8 x i32]* %3 to i8*
%13 = bitcast [8 x i32]* %4 to i8*
%14 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%15 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%16 = call i32 @dotest(i32* %14, i32* %15, i32 8, i32 0)
%17 = bitcast [9 x i32]* %5 to i8*
%18 = bitcast [9 x i32]* %6 to i8*
%19 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 0
%20 = getelementptr inbounds [9 x i32], [9 x i32]* %6, i64 0, i64 0
%21 = call i32 @dotest(i32* %19, i32* %20, i32 9, i32 0)
ret i32 0
}