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


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

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

LLVM IR (-O0):
define i32 @random_dobldobl_complex(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca [4 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 [4 x double], [4 x double]* %8, i64 0, i64 0
%12 = call i32 @_ada_use_c2phc(i32 659, i32* %9, i32* %10, double* %11)
store i32 %12, i32* %7
%13 = getelementptr inbounds [4 x double], [4 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 [4 x double], [4 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 [4 x double], [4 x double]* %8, i64 0, i64 2
%22 = load double, double* %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 0
store double %22, double* %24
%25 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 3
%26 = load double, double* %25
%27 = load double*, double** %4
%28 = getelementptr inbounds double, double* %27, i64 1
store double %26, double* %28
%29 = load i32, i32* %7
ret i32 %29
}

LLVM IR (-O2):
define i32 @random_dobldobl_complex(double* nocapture writeonly %0, double* nocapture writeonly %1) {
%3 = alloca [4 x double]
%4 = bitcast [4 x double]* %3 to i8*
%5 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%6 = call i32 @_ada_use_c2phc(i32 659, i32* undef, i32* undef, double* %5)
%7 = bitcast [4 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 [4 x double], [4 x double]* %3, i64 0, i64 2
%11 = bitcast double* %10 to <2 x double>*
%12 = load <2 x double>, <2 x double>* %11
%13 = bitcast double* %1 to <2 x double>*
store <2 x double> %12, <2 x double>* %13
ret i32 %6
}