#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 */
double compute_d1F1_dz1_2d(int, double, double, int);
scalar_t__ fabs(double);
double bingham_dF1_2d(double z1, double z2) {
  int iter =
      (((int)((fabs(z1)) > (fabs(z2)) ? (fabs(z1)) : (fabs(z2))) * 10) > (10)
           ? ((int)((fabs(z1)) > (fabs(z2)) ? (fabs(z1)) : (fabs(z2))) * 10)
           : (10));
  return compute_d1F1_dz1_2d(2, z1, z2, iter);
}


x86 assembly (clang, -O0):
<bingham_dF1_2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %rax,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
jle    116d <bingham_dF1_2d+0x4d>
movsd  -0x8(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %rax,-0x28(%rbp)
jmp    117b <bingham_dF1_2d+0x5b>
movsd  -0x10(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
imul   $0xa,%eax,%eax
cmp    $0xa,%eax
jle    11e3 <bingham_dF1_2d+0xc3>
movsd  -0x8(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %rax,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
cmp    %rcx,%rax
jle    11c6 <bingham_dF1_2d+0xa6>
movsd  -0x8(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %rax,-0x38(%rbp)
jmp    11d4 <bingham_dF1_2d+0xb4>
movsd  -0x10(%rbp),%xmm0
call   1040 <fabs@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
imul   $0xa,%eax,%eax
mov    %eax,-0x3c(%rbp)
jmp    11f0 <bingham_dF1_2d+0xd0>
mov    $0xa,%eax
mov    %eax,-0x3c(%rbp)
jmp    11f0 <bingham_dF1_2d+0xd0>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x14(%rbp),%esi
mov    $0x2,%edi
call   1030 <compute_d1F1_dz1_2d@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bingham_dF1_2d>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1040 <fabs@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
call   1040 <fabs@plt>
movsd  0x8(%rsp),%xmm0
cmp    %rax,%rbx
jg     1152 <bingham_dF1_2d+0x32>
movsd  (%rsp),%xmm0
call   1040 <fabs@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
mov    $0xa,%esi
cmp    $0xb,%eax
jl     1198 <bingham_dF1_2d+0x78>
movsd  0x8(%rsp),%xmm0
call   1040 <fabs@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
call   1040 <fabs@plt>
movsd  0x8(%rsp),%xmm0
cmp    %rax,%rbx
jg     118e <bingham_dF1_2d+0x6e>
movsd  (%rsp),%xmm0
call   1040 <fabs@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%esi
mov    $0x2,%edi
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
add    $0x10,%rsp
pop    %rbx
jmp    1030 <compute_d1F1_dz1_2d@plt>

LLVM IR (-O0):
define double @bingham_dF1_2d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call i64 @fabs(double %6)
%8 = load double, double* %4
%9 = call i64 @fabs(double %8)
%10 = icmp sgt i64 %7, %9
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load double, double* %3
%13 = call i64 @fabs(double %12)
br label %17
14: ; preds = %2
%15 = load double, double* %4
%16 = call i64 @fabs(double %15)
br label %17
17: ; preds = %14, %11
%18 = phi i64 [ %13, %11 ], [ %16, %14 ]
%19 = trunc i64 %18 to i32
%20 = mul nsw i32 %19, 10
%21 = icmp sgt i32 %20, 10
br i1 %21, label %22, label %38
22: ; preds = %17
%23 = load double, double* %3
%24 = call i64 @fabs(double %23)
%25 = load double, double* %4
%26 = call i64 @fabs(double %25)
%27 = icmp sgt i64 %24, %26
br i1 %27, label %28, label %31
28: ; preds = %22
%29 = load double, double* %3
%30 = call i64 @fabs(double %29)
br label %34
31: ; preds = %22
%32 = load double, double* %4
%33 = call i64 @fabs(double %32)
br label %34
34: ; preds = %31, %28
%35 = phi i64 [ %30, %28 ], [ %33, %31 ]
%36 = trunc i64 %35 to i32
%37 = mul nsw i32 %36, 10
br label %39
38: ; preds = %17
br label %39
39: ; preds = %38, %34
%40 = phi i32 [ %37, %34 ], [ 10, %38 ]
store i32 %40, i32* %5
%41 = load double, double* %3
%42 = load double, double* %4
%43 = load i32, i32* %5
%44 = call double @compute_d1F1_dz1_2d(i32 2, double %41, double %42, i32 %43)
ret double %44
}

LLVM IR (-O2):
define double @bingham_dF1_2d(double %0, double %1) {
%3 = tail call i64 @fabs(double %0)
%4 = tail call i64 @fabs(double %1)
%5 = icmp sgt i64 %3, %4
%6 = select i1 %5, double %0, double %1
%7 = tail call i64 @fabs(double %6)
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %8, 10
%10 = icmp sgt i32 %9, 10
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = tail call i64 @fabs(double %0)
%13 = tail call i64 @fabs(double %1)
%14 = icmp sgt i64 %12, %13
%15 = select i1 %14, double %0, double %1
%16 = tail call i64 @fabs(double %15)
%17 = trunc i64 %16 to i32
%18 = mul nsw i32 %17, 10
br label %19
19: ; preds = %2, %11
%20 = phi i32 [ %18, %11 ], [ 10, %2 ]
%21 = tail call double @compute_d1F1_dz1_2d(i32 2, double %0, double %1, i32 %20)
ret double %21
}