#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 int32_t;

/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ test_orc(int *, int *, int *, int, int, int, int, int, int,
                            int);
int main() {
  int x;
  int N = 512;
  int32_t zcos_a = 12345;
  int32_t zsin_a = 65432;
  int32_t c_tx = 250;
  int32_t c_ty = 6;
  int32_t c_d_x = 256;
  int32_t y_d1 = 100;
  int32_t *x_ss = (int32_t *)malloc(sizeof(int32_t) * N);
  int32_t *y_ss = (int32_t *)malloc(sizeof(int32_t) * N);
  int32_t *xs = (int32_t *)malloc(sizeof(int32_t) * N);
  for (x = 0; x < N; x++) {
    xs[x] = x;
  }
  test_orc(x_ss, y_ss, xs, y_d1, c_d_x, c_tx, c_ty, zcos_a, zsin_a, N);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x68,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0x200,-0x14(%rbp)
movl   $0x3039,-0x18(%rbp)
movl   $0xff98,-0x1c(%rbp)
movl   $0xfa,-0x20(%rbp)
movl   $0x6,-0x24(%rbp)
movl   $0x100,-0x28(%rbp)
movl   $0x64,-0x2c(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11c9 <main+0xa9>
mov    -0x10(%rbp),%edx
mov    -0x48(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11a1 <main+0x81>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x24(%rbp),%ebx
mov    -0x18(%rbp),%r11d
mov    -0x1c(%rbp),%r10d
mov    -0x14(%rbp),%eax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <test_orc@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x800,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    $0x800,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x800,%edi
call   1040 <malloc@plt>
movdqa 0xeb0(%rip),%xmm0
mov    $0x1c,%ecx
movdqa 0xeb2(%rip),%xmm8
movdqa 0xeb9(%rip),%xmm9
movdqa 0xec0(%rip),%xmm10
movdqa 0xec8(%rip),%xmm4
movdqa 0xed0(%rip),%xmm5
movdqa 0xed8(%rip),%xmm6
movdqa 0xee0(%rip),%xmm7
movdqa 0xee8(%rip),%xmm1
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqu %xmm0,-0x70(%rax,%rcx,4)
movdqu %xmm2,-0x60(%rax,%rcx,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqu %xmm2,-0x50(%rax,%rcx,4)
movdqu %xmm3,-0x40(%rax,%rcx,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqu %xmm2,-0x30(%rax,%rcx,4)
movdqu %xmm3,-0x20(%rax,%rcx,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqu %xmm2,-0x10(%rax,%rcx,4)
movdqu %xmm3,(%rax,%rcx,4)
paddd  %xmm1,%xmm0
add    $0x20,%rcx
cmp    $0x21c,%rcx
jne    11a0 <main+0x80>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
mov    $0x64,%ecx
mov    $0x100,%r8d
mov    $0xfa,%r9d
push   $0x200
push   $0xff98
push   $0x3039
push   $0x6
call   1030 <test_orc@plt>
add    $0x20,%rsp
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i32 0, i32* %1
store i32 512, i32* %3
store i32 12345, i32* %4
store i32 65432, i32* %5
store i32 250, i32* %6
store i32 6, i32* %7
store i32 256, i32* %8
store i32 100, i32* %9
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = mul i64 4, %14
%16 = trunc i64 %15 to i32
%17 = call i64 @malloc(i32 %16)
%18 = inttoptr i64 %17 to i32*
store i32* %18, i32** %10
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = mul i64 4, %20
%22 = trunc i64 %21 to i32
%23 = call i64 @malloc(i32 %22)
%24 = inttoptr i64 %23 to i32*
store i32* %24, i32** %11
%25 = load i32, i32* %3
%26 = sext i32 %25 to i64
%27 = mul i64 4, %26
%28 = trunc i64 %27 to i32
%29 = call i64 @malloc(i32 %28)
%30 = inttoptr i64 %29 to i32*
store i32* %30, i32** %12
store i32 0, i32* %2
br label %31
31: ; preds = %41, %0
%32 = load i32, i32* %2
%33 = load i32, i32* %3
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %44
35: ; preds = %31
%36 = load i32, i32* %2
%37 = load i32*, i32** %12
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %37, i64 %39
store i32 %36, i32* %40
br label %41
41: ; preds = %35
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
br label %31
44: ; preds = %31
%45 = load i32*, i32** %10
%46 = load i32*, i32** %11
%47 = load i32*, i32** %12
%48 = load i32, i32* %9
%49 = load i32, i32* %8
%50 = load i32, i32* %6
%51 = load i32, i32* %7
%52 = load i32, i32* %4
%53 = load i32, i32* %5
%54 = load i32, i32* %3
%55 = call i32 @test_orc(i32* %45, i32* %46, i32* %47, i32 %48, i32 %49, i32 %50, i32 %51, i32 %52, i32 %53, i32 %54)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 2048)
%2 = tail call i64 @malloc(i32 2048)
%3 = tail call i64 @malloc(i32 2048)
%4 = inttoptr i64 %3 to i32*
br label %5
5: ; preds = %5, %0
%6 = phi i64 [ 0, %0 ], [ %34, %5 ]
%7 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %0 ], [ %35, %5 ]
%8 = add <4 x i32> %7, <i32 4, i32 4, i32 4, i32 4>
%9 = getelementptr inbounds i32, i32* %4, i64 %6
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> %7, <4 x i32>* %10
%11 = getelementptr inbounds i32, i32* %9, i64 4
%12 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> %8, <4 x i32>* %12
%13 = or i64 %6, 8
%14 = add <4 x i32> %7, <i32 8, i32 8, i32 8, i32 8>
%15 = add <4 x i32> %7, <i32 12, i32 12, i32 12, i32 12>
%16 = getelementptr inbounds i32, i32* %4, i64 %13
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> %14, <4 x i32>* %17
%18 = getelementptr inbounds i32, i32* %16, i64 4
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> %15, <4 x i32>* %19
%20 = or i64 %6, 16
%21 = add <4 x i32> %7, <i32 16, i32 16, i32 16, i32 16>
%22 = add <4 x i32> %7, <i32 20, i32 20, i32 20, i32 20>
%23 = getelementptr inbounds i32, i32* %4, i64 %20
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> %21, <4 x i32>* %24
%25 = getelementptr inbounds i32, i32* %23, i64 4
%26 = bitcast i32* %25 to <4 x i32>*
store <4 x i32> %22, <4 x i32>* %26
%27 = or i64 %6, 24
%28 = add <4 x i32> %7, <i32 24, i32 24, i32 24, i32 24>
%29 = add <4 x i32> %7, <i32 28, i32 28, i32 28, i32 28>
%30 = getelementptr inbounds i32, i32* %4, i64 %27
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> %28, <4 x i32>* %31
%32 = getelementptr inbounds i32, i32* %30, i64 4
%33 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> %29, <4 x i32>* %33
%34 = add nuw nsw i64 %6, 32
%35 = add <4 x i32> %7, <i32 32, i32 32, i32 32, i32 32>
%36 = icmp eq i64 %34, 512
br i1 %36, label %37, label %5
37: ; preds = %5
%38 = inttoptr i64 %2 to i32*
%39 = inttoptr i64 %1 to i32*
%40 = tail call i32 @test_orc(i32* %39, i32* %38, i32* %4, i32 100, i32 256, i32 250, i32 6, i32 12345, i32 65432, i32 512)
ret i32 0
}