#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 sweep_dobldobl_complex_run(int gchoice, double *regamma, double *imgamma) {
  int fail;
  int pg[2];
  int *b;
  double c[4];
  pg[0] = 1;
  pg[1] = gchoice;
  if (gchoice == 2) {
    c[0] = regamma[0];
    c[1] = regamma[1];
    c[2] = imgamma[0];
    c[3] = imgamma[1];
  }
  fail = _ada_use_c2phc4c(620, pg, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_dobldobl_complex_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1170 <sweep_dobldobl_complex_run+0x60>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    -0x24(%rbp),%rsi
mov    -0x30(%rbp),%rdx
lea    -0x50(%rbp),%rcx
mov    $0x26c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_dobldobl_complex_run>:
sub    $0x38,%rsp
movl   $0x1,0x8(%rsp)
mov    %edi,0xc(%rsp)
cmp    $0x2,%edi
jne    1135 <sweep_dobldobl_complex_run+0x25>
movups (%rsi),%xmm0
movaps %xmm0,0x10(%rsp)
movups (%rdx),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0x26c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
define i32 @sweep_dobldobl_complex_run(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca [2 x i32]
%9 = alloca i32*
%10 = alloca [4 x double]
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
store i32 1, i32* %11
%12 = load i32, i32* %4
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
store i32 %12, i32* %13
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %33
16: ; preds = %3
%17 = load double*, double** %5
%18 = getelementptr inbounds double, double* %17, i64 0
%19 = load double, double* %18
%20 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
store double %19, double* %20
%21 = load double*, double** %5
%22 = getelementptr inbounds double, double* %21, i64 1
%23 = load double, double* %22
%24 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 1
store double %23, double* %24
%25 = load double*, double** %6
%26 = getelementptr inbounds double, double* %25, i64 0
%27 = load double, double* %26
%28 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 2
store double %27, double* %28
%29 = load double*, double** %6
%30 = getelementptr inbounds double, double* %29, i64 1
%31 = load double, double* %30
%32 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 3
store double %31, double* %32
br label %33
33: ; preds = %16, %3
%34 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%35 = load i32*, i32** %9
%36 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%37 = call i32 @_ada_use_c2phc4c(i32 620, i32* %34, i32* %35, double* %36, i32 0)
store i32 %37, i32* %7
%38 = load i32, i32* %7
ret i32 %38
}

LLVM IR (-O2):
define i32 @sweep_dobldobl_complex_run(i32 %0, double* nocapture %1, double* nocapture %2) {
%4 = alloca [2 x i32]
%5 = alloca [4 x double]
%6 = bitcast [2 x i32]* %4 to i8*
%7 = bitcast [4 x double]* %5 to i8*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 1, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %0, i32* %9
%10 = icmp eq i32 %0, 2
br i1 %10, label %11, label %19
11: ; preds = %3
%12 = bitcast double* %1 to <2 x double>*
%13 = load <2 x double>, <2 x double>* %12
%14 = bitcast [4 x double]* %5 to <2 x double>*
store <2 x double> %13, <2 x double>* %14
%15 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 2
%16 = bitcast double* %2 to <2 x double>*
%17 = load <2 x double>, <2 x double>* %16
%18 = bitcast double* %15 to <2 x double>*
store <2 x double> %17, <2 x double>* %18
br label %19
19: ; preds = %11, %3
%20 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%21 = call i32 @_ada_use_c2phc4c(i32 620, i32* %8, i32* undef, double* %20, i32 0)
ret i32 %21
}