#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 padcon_get_homotopy_continuation_parameter(int k, double *val) {
  int fail, parval;
  if ((k == 2) || (k == 3) || (k == 11) || (k == 12)) {
    fail = _ada_use_c2phc4c(737, &k, &parval, val, 0);
    *val = (double)parval;
  } else
    fail = _ada_use_c2phc4c(737, &k, &parval, val, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_homotopy_continuation_parameter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     1147 <padcon_get_homotopy_continuation_parameter+0x37>
cmpl   $0x3,-0x4(%rbp)
je     1147 <padcon_get_homotopy_continuation_parameter+0x37>
cmpl   $0xb,-0x4(%rbp)
je     1147 <padcon_get_homotopy_continuation_parameter+0x37>
cmpl   $0xc,-0x4(%rbp)
jne    1175 <padcon_get_homotopy_continuation_parameter+0x65>
mov    -0x10(%rbp),%rcx
mov    $0x2e1,%edi
lea    -0x4(%rbp),%rsi
lea    -0x18(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
cvtsi2sdl -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1191 <padcon_get_homotopy_continuation_parameter+0x81>
mov    -0x10(%rbp),%rcx
mov    $0x2e1,%edi
lea    -0x4(%rbp),%rsi
lea    -0x18(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_homotopy_continuation_parameter>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,0xc(%rsp)
cmp    $0xc,%edi
ja     1155 <padcon_get_homotopy_continuation_parameter+0x45>
mov    $0x180c,%eax
bt     %edi,%eax
jae    1155 <padcon_get_homotopy_continuation_parameter+0x45>
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    $0x2e1,%edi
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
cvtsi2sdl 0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    $0x2e1,%edi
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
jmp    114f <padcon_get_homotopy_continuation_parameter+0x3f>

LLVM IR (-O0):
define i32 @padcon_get_homotopy_continuation_parameter(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store double* %1, double** %4
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 2
br i1 %8, label %18, label %9
9: ; preds = %2
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 3
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 11
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 12
br i1 %17, label %18, label %24
18: ; preds = %15, %12, %9, %2
%19 = load double*, double** %4
%20 = call i32 @_ada_use_c2phc4c(i32 737, i32* %3, i32* %6, double* %19, i32 0)
store i32 %20, i32* %5
%21 = load i32, i32* %6
%22 = sitofp i32 %21 to double
%23 = load double*, double** %4
store double %22, double* %23
br label %27
24: ; preds = %15
%25 = load double*, double** %4
%26 = call i32 @_ada_use_c2phc4c(i32 737, i32* %3, i32* %6, double* %25, i32 0)
store i32 %26, i32* %5
br label %27
27: ; preds = %24, %18
%28 = load i32, i32* %5
ret i32 %28
}

LLVM IR (-O2):
define i32 @padcon_get_homotopy_continuation_parameter(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = bitcast i32* %4 to i8*
switch i32 %0, label %10 [
i32 12, label %6
i32 11, label %6
i32 3, label %6
i32 2, label %6
]
6: ; preds = %2, %2, %2, %2
%7 = call i32 @_ada_use_c2phc4c(i32 737, i32* %3, i32* %4, double* %1, i32 0)
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
store double %9, double* %1
br label %12
10: ; preds = %2
%11 = call i32 @_ada_use_c2phc4c(i32 737, i32* %3, i32* %4, double* %1, i32 0)
br label %12
12: ; preds = %10, %6
%13 = phi i32 [ %7, %6 ], [ %11, %10 ]
ret i32 %13
}