#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*/ dct64_1_486(int *, int *, int *, int *);
void dct64_i486(int *a, int *b, double *samples) {
  int bufs[64];
  int i;
  int *p = bufs;
  register double const scale = ((65536.0 * 32) + 1) * 65536.0;
  for (i = 0; i < 32; i++) {
    *((double *)(p++)) = scale + *samples++;
  }
  dct64_1_486(a, b, bufs + 32, bufs);
}


x86 assembly (clang, -O0):
<dct64_i486>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x120(%rbp),%rax
mov    %rax,-0x130(%rbp)
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movl   $0x0,-0x124(%rbp)
cmpl   $0x20,-0x124(%rbp)
jge    11a4 <dct64_i486+0x94>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
movsd  0xe8d(%rip),%xmm0
addsd  (%rax),%xmm0
mov    -0x130(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x130(%rbp)
movsd  %xmm0,(%rax)
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    114f <dct64_i486+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x120(%rbp),%rdx
add    $0x80,%rdx
lea    -0x120(%rbp),%rcx
call   1030 <dct64_1_486@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dct64_i486>:
sub    $0x108,%rsp
movsd  0xee1(%rip),%xmm0
movsd  (%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x4(%rsp)
movsd  0x10(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x18(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0xc(%rsp)
movsd  0x20(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x28(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x14(%rsp)
movsd  0x30(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x38(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x1c(%rsp)
movsd  0x40(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x48(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x24(%rsp)
movsd  0x50(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0x58(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x2c(%rsp)
movsd  0x60(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  0x68(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x34(%rsp)
movsd  0x70(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x38(%rsp)
movsd  0x78(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x3c(%rsp)
movsd  0x80(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsp)
movsd  0x88(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x44(%rsp)
movsd  0x90(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x48(%rsp)
movsd  0x98(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x4c(%rsp)
movsd  0xa0(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x50(%rsp)
movsd  0xa8(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x54(%rsp)
movsd  0xb0(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x58(%rsp)
movsd  0xb8(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x5c(%rsp)
movsd  0xc0(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
movsd  0xc8(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x64(%rsp)
movsd  0xd0(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x68(%rsp)
movsd  0xd8(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x6c(%rsp)
movsd  0xe0(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x70(%rsp)
movsd  0xe8(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x74(%rsp)
movsd  0xf0(%rdx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x78(%rsp)
addsd  0xf8(%rdx),%xmm0
movsd  %xmm0,0x7c(%rsp)
lea    0x80(%rsp),%rdx
mov    %rsp,%rcx
call   1030 <dct64_1_486@plt>
add    $0x108,%rsp
ret

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

LLVM IR (-O2):
define void @dct64_i486(i32* %0, i32* %1, double* nocapture %2) {
%4 = alloca [64 x i32]
%5 = bitcast [64 x i32]* %4 to i8*
%6 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 0
%7 = getelementptr inbounds double, double* %2, i64 1
%8 = load double, double* %2
%9 = fadd double %8, 0x4240000080000000
%10 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 1
%11 = bitcast [64 x i32]* %4 to double*
store double %9, double* %11
%12 = getelementptr inbounds double, double* %2, i64 2
%13 = load double, double* %7
%14 = fadd double %13, 0x4240000080000000
%15 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 2
%16 = bitcast i32* %10 to double*
store double %14, double* %16
%17 = getelementptr inbounds double, double* %2, i64 3
%18 = load double, double* %12
%19 = fadd double %18, 0x4240000080000000
%20 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 3
%21 = bitcast i32* %15 to double*
store double %19, double* %21
%22 = getelementptr inbounds double, double* %2, i64 4
%23 = load double, double* %17
%24 = fadd double %23, 0x4240000080000000
%25 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 4
%26 = bitcast i32* %20 to double*
store double %24, double* %26
%27 = getelementptr inbounds double, double* %2, i64 5
%28 = load double, double* %22
%29 = fadd double %28, 0x4240000080000000
%30 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 5
%31 = bitcast i32* %25 to double*
store double %29, double* %31
%32 = getelementptr inbounds double, double* %2, i64 6
%33 = load double, double* %27
%34 = fadd double %33, 0x4240000080000000
%35 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 6
%36 = bitcast i32* %30 to double*
store double %34, double* %36
%37 = getelementptr inbounds double, double* %2, i64 7
%38 = load double, double* %32
%39 = fadd double %38, 0x4240000080000000
%40 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 7
%41 = bitcast i32* %35 to double*
store double %39, double* %41
%42 = getelementptr inbounds double, double* %2, i64 8
%43 = load double, double* %37
%44 = fadd double %43, 0x4240000080000000
%45 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 8
%46 = bitcast i32* %40 to double*
store double %44, double* %46
%47 = getelementptr inbounds double, double* %2, i64 9
%48 = load double, double* %42
%49 = fadd double %48, 0x4240000080000000
%50 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 9
%51 = bitcast i32* %45 to double*
store double %49, double* %51
%52 = getelementptr inbounds double, double* %2, i64 10
%53 = load double, double* %47
%54 = fadd double %53, 0x4240000080000000
%55 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 10
%56 = bitcast i32* %50 to double*
store double %54, double* %56
%57 = getelementptr inbounds double, double* %2, i64 11
%58 = load double, double* %52
%59 = fadd double %58, 0x4240000080000000
%60 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 11
%61 = bitcast i32* %55 to double*
store double %59, double* %61
%62 = getelementptr inbounds double, double* %2, i64 12
%63 = load double, double* %57
%64 = fadd double %63, 0x4240000080000000
%65 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 12
%66 = bitcast i32* %60 to double*
store double %64, double* %66
%67 = getelementptr inbounds double, double* %2, i64 13
%68 = load double, double* %62
%69 = fadd double %68, 0x4240000080000000
%70 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 13
%71 = bitcast i32* %65 to double*
store double %69, double* %71
%72 = getelementptr inbounds double, double* %2, i64 14
%73 = load double, double* %67
%74 = fadd double %73, 0x4240000080000000
%75 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 14
%76 = bitcast i32* %70 to double*
store double %74, double* %76
%77 = getelementptr inbounds double, double* %2, i64 15
%78 = load double, double* %72
%79 = fadd double %78, 0x4240000080000000
%80 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 15
%81 = bitcast i32* %75 to double*
store double %79, double* %81
%82 = getelementptr inbounds double, double* %2, i64 16
%83 = load double, double* %77
%84 = fadd double %83, 0x4240000080000000
%85 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 16
%86 = bitcast i32* %80 to double*
store double %84, double* %86
%87 = getelementptr inbounds double, double* %2, i64 17
%88 = load double, double* %82
%89 = fadd double %88, 0x4240000080000000
%90 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 17
%91 = bitcast i32* %85 to double*
store double %89, double* %91
%92 = getelementptr inbounds double, double* %2, i64 18
%93 = load double, double* %87
%94 = fadd double %93, 0x4240000080000000
%95 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 18
%96 = bitcast i32* %90 to double*
store double %94, double* %96
%97 = getelementptr inbounds double, double* %2, i64 19
%98 = load double, double* %92
%99 = fadd double %98, 0x4240000080000000
%100 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 19
%101 = bitcast i32* %95 to double*
store double %99, double* %101
%102 = getelementptr inbounds double, double* %2, i64 20
%103 = load double, double* %97
%104 = fadd double %103, 0x4240000080000000
%105 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 20
%106 = bitcast i32* %100 to double*
store double %104, double* %106
%107 = getelementptr inbounds double, double* %2, i64 21
%108 = load double, double* %102
%109 = fadd double %108, 0x4240000080000000
%110 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 21
%111 = bitcast i32* %105 to double*
store double %109, double* %111
%112 = getelementptr inbounds double, double* %2, i64 22
%113 = load double, double* %107
%114 = fadd double %113, 0x4240000080000000
%115 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 22
%116 = bitcast i32* %110 to double*
store double %114, double* %116
%117 = getelementptr inbounds double, double* %2, i64 23
%118 = load double, double* %112
%119 = fadd double %118, 0x4240000080000000
%120 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 23
%121 = bitcast i32* %115 to double*
store double %119, double* %121
%122 = getelementptr inbounds double, double* %2, i64 24
%123 = load double, double* %117
%124 = fadd double %123, 0x4240000080000000
%125 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 24
%126 = bitcast i32* %120 to double*
store double %124, double* %126
%127 = getelementptr inbounds double, double* %2, i64 25
%128 = load double, double* %122
%129 = fadd double %128, 0x4240000080000000
%130 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 25
%131 = bitcast i32* %125 to double*
store double %129, double* %131
%132 = getelementptr inbounds double, double* %2, i64 26
%133 = load double, double* %127
%134 = fadd double %133, 0x4240000080000000
%135 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 26
%136 = bitcast i32* %130 to double*
store double %134, double* %136
%137 = getelementptr inbounds double, double* %2, i64 27
%138 = load double, double* %132
%139 = fadd double %138, 0x4240000080000000
%140 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 27
%141 = bitcast i32* %135 to double*
store double %139, double* %141
%142 = getelementptr inbounds double, double* %2, i64 28
%143 = load double, double* %137
%144 = fadd double %143, 0x4240000080000000
%145 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 28
%146 = bitcast i32* %140 to double*
store double %144, double* %146
%147 = getelementptr inbounds double, double* %2, i64 29
%148 = load double, double* %142
%149 = fadd double %148, 0x4240000080000000
%150 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 29
%151 = bitcast i32* %145 to double*
store double %149, double* %151
%152 = getelementptr inbounds double, double* %2, i64 30
%153 = load double, double* %147
%154 = fadd double %153, 0x4240000080000000
%155 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 30
%156 = bitcast i32* %150 to double*
store double %154, double* %156
%157 = getelementptr inbounds double, double* %2, i64 31
%158 = load double, double* %152
%159 = fadd double %158, 0x4240000080000000
%160 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 31
%161 = bitcast i32* %155 to double*
store double %159, double* %161
%162 = load double, double* %157
%163 = fadd double %162, 0x4240000080000000
%164 = bitcast i32* %160 to double*
store double %163, double* %164
%165 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 32
%166 = call i32 @dct64_1_486(i32* %0, i32* %1, i32* %165, i32* %6)
ret void
}