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


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

x86 assembly (clang, -O2):
<sweep_standard_complex_run>:
sub    $0x28,%rsp
movl   $0x0,0x8(%rsp)
mov    %edi,0xc(%rsp)
cmp    $0x2,%edi
jne    1139 <sweep_standard_complex_run+0x29>
movsd  (%rsi),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rdx),%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0x26c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @sweep_standard_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 [2 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 0, 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 %23
16: ; preds = %3
%17 = load double*, double** %5
%18 = load double, double* %17
%19 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
store double %18, double* %19
%20 = load double*, double** %6
%21 = load double, double* %20
%22 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 1
store double %21, double* %22
br label %23
23: ; preds = %16, %3
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%25 = load i32*, i32** %9
%26 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%27 = call i32 @_ada_use_c2phc4c(i32 620, i32* %24, i32* %25, double* %26, i32 0)
store i32 %27, i32* %7
%28 = load i32, i32* %7
ret i32 %28
}

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