#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_c2phc(int, int *, int *, double *);
int random_quaddobl_complex(double *re, double *im) {
  int *a, *b, fail;
  double c[8];
  fail = _ada_use_c2phc(689, a, b, c);
  re[0] = c[0];
  re[1] = c[1];
  re[2] = c[2];
  re[3] = c[3];
  im[0] = c[4];
  im[1] = c[5];
  im[2] = c[6];
  im[3] = c[7];
  return fail;
}


x86 assembly (clang, -O0):
<random_quaddobl_complex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    -0x70(%rbp),%rcx
mov    $0x2b1,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x24(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x58(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x24(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_quaddobl_complex>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rcx
mov    $0x2b1,%edi
call   1030 <_ada_use_c2phc@plt>
movaps (%rsp),%xmm0
movups %xmm0,(%rbx)
movaps 0x10(%rsp),%xmm0
movups %xmm0,0x10(%rbx)
movaps 0x20(%rsp),%xmm0
movups %xmm0,(%r14)
movaps 0x30(%rsp),%xmm0
movups %xmm0,0x10(%r14)
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @random_quaddobl_complex(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca [8 x double]
store double* %0, double** %3
store double* %1, double** %4
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 0
%12 = call i32 @_ada_use_c2phc(i32 689, i32* %9, i32* %10, double* %11)
store i32 %12, i32* %7
%13 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 0
%14 = load double, double* %13
%15 = load double*, double** %3
%16 = getelementptr inbounds double, double* %15, i64 0
store double %14, double* %16
%17 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 1
%18 = load double, double* %17
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 1
store double %18, double* %20
%21 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 2
%22 = load double, double* %21
%23 = load double*, double** %3
%24 = getelementptr inbounds double, double* %23, i64 2
store double %22, double* %24
%25 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 3
%26 = load double, double* %25
%27 = load double*, double** %3
%28 = getelementptr inbounds double, double* %27, i64 3
store double %26, double* %28
%29 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 4
%30 = load double, double* %29
%31 = load double*, double** %4
%32 = getelementptr inbounds double, double* %31, i64 0
store double %30, double* %32
%33 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 5
%34 = load double, double* %33
%35 = load double*, double** %4
%36 = getelementptr inbounds double, double* %35, i64 1
store double %34, double* %36
%37 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 6
%38 = load double, double* %37
%39 = load double*, double** %4
%40 = getelementptr inbounds double, double* %39, i64 2
store double %38, double* %40
%41 = getelementptr inbounds [8 x double], [8 x double]* %8, i64 0, i64 7
%42 = load double, double* %41
%43 = load double*, double** %4
%44 = getelementptr inbounds double, double* %43, i64 3
store double %42, double* %44
%45 = load i32, i32* %7
ret i32 %45
}

LLVM IR (-O2):
define i32 @random_quaddobl_complex(double* nocapture writeonly %0, double* nocapture writeonly %1) {
%3 = alloca [8 x double]
%4 = bitcast [8 x double]* %3 to i8*
%5 = getelementptr inbounds [8 x double], [8 x double]* %3, i64 0, i64 0
%6 = call i32 @_ada_use_c2phc(i32 689, i32* undef, i32* undef, double* %5)
%7 = bitcast [8 x double]* %3 to <2 x double>*
%8 = load <2 x double>, <2 x double>* %7
%9 = bitcast double* %0 to <2 x double>*
store <2 x double> %8, <2 x double>* %9
%10 = getelementptr inbounds [8 x double], [8 x double]* %3, i64 0, i64 2
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = bitcast double* %10 to <2 x double>*
%13 = load <2 x double>, <2 x double>* %12
%14 = bitcast double* %11 to <2 x double>*
store <2 x double> %13, <2 x double>* %14
%15 = getelementptr inbounds [8 x double], [8 x double]* %3, i64 0, i64 4
%16 = bitcast double* %15 to <2 x double>*
%17 = load <2 x double>, <2 x double>* %16
%18 = bitcast double* %1 to <2 x double>*
store <2 x double> %17, <2 x double>* %18
%19 = getelementptr inbounds [8 x double], [8 x double]* %3, i64 0, i64 6
%20 = getelementptr inbounds double, double* %1, i64 2
%21 = bitcast double* %19 to <2 x double>*
%22 = load <2 x double>, <2 x double>* %21
%23 = bitcast double* %20 to <2 x double>*
store <2 x double> %22, <2 x double>* %23
ret i32 %6
}