#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 _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int store_quaddobl_gamma(int n, double *re_gamma, double *im_gamma) {
  int fail, i;
  int *b;
  double r[8];
  for (i = 0; i < n; i++) {
    r[0] = re_gamma[4 * i];
    r[1] = re_gamma[4 * i + 1];
    r[2] = re_gamma[4 * i + 2];
    r[3] = re_gamma[4 * i + 3];
    r[4] = im_gamma[4 * i];
    r[5] = im_gamma[4 * i + 1];
    r[6] = im_gamma[4 * i + 2];
    r[7] = im_gamma[4 * i + 3];
    fail = _ada_use_c2phc4c(664, &i, b, r, 0);
  }
  return fail;
}


x86 assembly (clang, -O0):
<store_quaddobl_gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    122a <store_quaddobl_gamma+0x11a>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x28(%rbp),%rdx
lea    -0x70(%rbp),%rcx
mov    $0x298,%edi
lea    -0x20(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112a <store_quaddobl_gamma+0x1a>
mov    -0x1c(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_quaddobl_gamma>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x50,%rsp
movl   $0x0,0xc(%rsp)
test   %edi,%edi
jle    119d <store_quaddobl_gamma+0x8d>
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %ecx,%ecx
lea    0xc(%rsp),%r15
lea    0x10(%rsp),%r12
nopl   0x0(%rax)
lea    0x0(,%rcx,4),%eax
cltq
movups (%rbx,%rax,8),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x2(,%rcx,4),%ecx
movslq %ecx,%rcx
movups (%rbx,%rcx,8),%xmm0
movaps %xmm0,0x20(%rsp)
movups (%r14,%rax,8),%xmm0
movaps %xmm0,0x30(%rsp)
movups (%r14,%rcx,8),%xmm0
movaps %xmm0,0x40(%rsp)
mov    $0x298,%edi
mov    %r15,%rsi
mov    %r12,%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    0xc(%rsp),%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%rsp)
cmp    %ebp,%ecx
jl     1140 <store_quaddobl_gamma+0x30>
jmp    119d <store_quaddobl_gamma+0x8d>
add    $0x50,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @store_quaddobl_gamma(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca [8 x double]
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
store i32 0, i32* %8
br label %11
11: ; preds = %81, %3
%12 = load i32, i32* %8
%13 = load i32, i32* %4
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %84
15: ; preds = %11
%16 = load double*, double** %5
%17 = load i32, i32* %8
%18 = mul nsw i32 4, %17
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %16, i64 %19
%21 = load double, double* %20
%22 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 0
store double %21, double* %22
%23 = load double*, double** %5
%24 = load i32, i32* %8
%25 = mul nsw i32 4, %24
%26 = add nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double, double* %23, i64 %27
%29 = load double, double* %28
%30 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 1
store double %29, double* %30
%31 = load double*, double** %5
%32 = load i32, i32* %8
%33 = mul nsw i32 4, %32
%34 = add nsw i32 %33, 2
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double, double* %31, i64 %35
%37 = load double, double* %36
%38 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 2
store double %37, double* %38
%39 = load double*, double** %5
%40 = load i32, i32* %8
%41 = mul nsw i32 4, %40
%42 = add nsw i32 %41, 3
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %39, i64 %43
%45 = load double, double* %44
%46 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 3
store double %45, double* %46
%47 = load double*, double** %6
%48 = load i32, i32* %8
%49 = mul nsw i32 4, %48
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %47, i64 %50
%52 = load double, double* %51
%53 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 4
store double %52, double* %53
%54 = load double*, double** %6
%55 = load i32, i32* %8
%56 = mul nsw i32 4, %55
%57 = add nsw i32 %56, 1
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds double, double* %54, i64 %58
%60 = load double, double* %59
%61 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 5
store double %60, double* %61
%62 = load double*, double** %6
%63 = load i32, i32* %8
%64 = mul nsw i32 4, %63
%65 = add nsw i32 %64, 2
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %62, i64 %66
%68 = load double, double* %67
%69 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 6
store double %68, double* %69
%70 = load double*, double** %6
%71 = load i32, i32* %8
%72 = mul nsw i32 4, %71
%73 = add nsw i32 %72, 3
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %70, i64 %74
%76 = load double, double* %75
%77 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 7
store double %76, double* %77
%78 = load i32*, i32** %9
%79 = getelementptr inbounds [8 x double], [8 x double]* %10, i64 0, i64 0
%80 = call i32 @_ada_use_c2phc4c(i32 664, i32* %8, i32* %78, double* %79, i32 0)
store i32 %80, i32* %7
br label %81
81: ; preds = %15
%82 = load i32, i32* %8
%83 = add nsw i32 %82, 1
store i32 %83, i32* %8
br label %11
84: ; preds = %11
%85 = load i32, i32* %7
ret i32 %85
}

LLVM IR (-O2):
define i32 @store_quaddobl_gamma(i32 %0, double* nocapture %1, double* nocapture %2) {
%4 = alloca i32
%5 = alloca [8 x double]
%6 = bitcast i32* %4 to i8*
%7 = bitcast [8 x double]* %5 to i8*
store i32 0, i32* %4
%8 = icmp sgt i32 %0, 0
br i1 %8, label %9, label %40
9: ; preds = %3
%10 = getelementptr inbounds [8 x double], [8 x double]* %5, i64 0, i64 0
%11 = getelementptr inbounds [8 x double], [8 x double]* %5, i64 0, i64 2
%12 = getelementptr inbounds [8 x double], [8 x double]* %5, i64 0, i64 4
%13 = getelementptr inbounds [8 x double], [8 x double]* %5, i64 0, i64 6
%14 = bitcast [8 x double]* %5 to <2 x double>*
%15 = bitcast double* %11 to <2 x double>*
%16 = bitcast double* %12 to <2 x double>*
%17 = bitcast double* %13 to <2 x double>*
br label %18
18: ; preds = %9, %18
%19 = phi i32 [ 0, %9 ], [ %38, %18 ]
%20 = shl nsw i32 %19, 2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %1, i64 %21
%23 = bitcast double* %22 to <2 x double>*
%24 = load <2 x double>, <2 x double>* %23
store <2 x double> %24, <2 x double>* %14
%25 = or i32 %20, 2
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %1, i64 %26
%28 = bitcast double* %27 to <2 x double>*
%29 = load <2 x double>, <2 x double>* %28
store <2 x double> %29, <2 x double>* %15
%30 = getelementptr inbounds double, double* %2, i64 %21
%31 = bitcast double* %30 to <2 x double>*
%32 = load <2 x double>, <2 x double>* %31
store <2 x double> %32, <2 x double>* %16
%33 = getelementptr inbounds double, double* %2, i64 %26
%34 = bitcast double* %33 to <2 x double>*
%35 = load <2 x double>, <2 x double>* %34
store <2 x double> %35, <2 x double>* %17
%36 = call i32 @_ada_use_c2phc4c(i32 664, i32* %4, i32* undef, double* %10, i32 0)
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 1
store i32 %38, i32* %4
%39 = icmp slt i32 %38, %0
br i1 %39, label %18, label %40
40: ; preds = %18, %3
%41 = phi i32 [ undef, %3 ], [ %36, %18 ]
ret i32 %41
}