#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 bingham_dF1_2d(double, double);
int /*<<< orphan*/ printf(char *, ...);
void compute_all_bingham_dF1_2d(double z1_min, double z1_max, double z1_step,
                                double z2_min, double z2_max, double z2_step) {
  double z1, z2;
  printf("dF1 = [ ...\n");
  for (z1 = z1_min; z1 <= z1_max; z1 += z1_step) {
    for (z2 = z2_min; z2 <= z2_max; z2 += z2_step)
      printf("%f ", z1 <= z2 ? bingham_dF1_2d(z1, z2) : 0.0);
    printf("; ...\n");
  }
  printf("];\n\n");
}


x86 assembly (clang, -O0):
<compute_all_bingham_dF1_2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1213 <compute_all_bingham_dF1_2d+0xf3>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11f1 <compute_all_bingham_dF1_2d+0xd1>
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11bd <compute_all_bingham_dF1_2d+0x9d>
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1040 <bingham_dF1_2d@plt>
movsd  %xmm0,-0x48(%rbp)
jmp    11ca <compute_all_bingham_dF1_2d+0xaa>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    11ca <compute_all_bingham_dF1_2d+0xaa>
movsd  -0x48(%rbp),%xmm0
lea    0xe37(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    117c <compute_all_bingham_dF1_2d+0x5c>
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    115e <compute_all_bingham_dF1_2d+0x3e>
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_all_bingham_dF1_2d>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movsd  %xmm5,0x30(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
movsd  0x8(%rsp),%xmm0
ucomisd (%rsp),%xmm0
jae    1186 <compute_all_bingham_dF1_2d+0x56>
lea    0xe96(%rip),%rdi
add    $0x38,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>
lea    0xe87(%rip),%r14
lea    0xe6c(%rip),%rbx
jmp    11c4 <compute_all_bingham_dF1_2d+0x94>
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
movsd  (%rsp),%xmm1
addsd  0x28(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
movsd  %xmm1,(%rsp)
ucomisd %xmm1,%xmm0
jb     1173 <compute_all_bingham_dF1_2d+0x43>
movsd  0x18(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
jb     11a0 <compute_all_bingham_dF1_2d+0x70>
movsd  0x10(%rsp),%xmm1
jmp    1202 <compute_all_bingham_dF1_2d+0xd2>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x20(%rsp),%xmm1
addsd  0x30(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
ucomisd %xmm1,%xmm0
jb     11a0 <compute_all_bingham_dF1_2d+0x70>
xorpd  %xmm0,%xmm0
movsd  %xmm1,0x20(%rsp)
ucomisd (%rsp),%xmm1
jb     11e0 <compute_all_bingham_dF1_2d+0xb0>
movsd  (%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
call   1050 <bingham_dF1_2d@plt>
jmp    11e0 <compute_all_bingham_dF1_2d+0xb0>

LLVM IR (-O0):
@.str = [13 x i8] c"dF1 = [ ...\0A\00"
@.str.1 = [4 x i8] c"%f \00"
@.str.2 = [7 x i8] c"; ...\0A\00"
@.str.3 = [5 x i8] c"];\0A\0A\00"
define void @compute_all_bingham_dF1_2d(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%16 = load double, double* %7
store double %16, double* %13
br label %17
17: ; preds = %45, %6
%18 = load double, double* %13
%19 = load double, double* %8
%20 = fcmp ole double %18, %19
br i1 %20, label %21, label %49
21: ; preds = %17
%22 = load double, double* %10
store double %22, double* %14
br label %23
23: ; preds = %39, %21
%24 = load double, double* %14
%25 = load double, double* %11
%26 = fcmp ole double %24, %25
br i1 %26, label %27, label %43
27: ; preds = %23
%28 = load double, double* %13
%29 = load double, double* %14
%30 = fcmp ole double %28, %29
br i1 %30, label %31, label %35
31: ; preds = %27
%32 = load double, double* %13
%33 = load double, double* %14
%34 = call double @bingham_dF1_2d(double %32, double %33)
br label %36
35: ; preds = %27
br label %36
36: ; preds = %35, %31
%37 = phi double [ %34, %31 ], [ 0.000000e+00, %35 ]
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %37)
br label %39
39: ; preds = %36
%40 = load double, double* %12
%41 = load double, double* %14
%42 = fadd double %41, %40
store double %42, double* %14
br label %23
43: ; preds = %23
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %45
45: ; preds = %43
%46 = load double, double* %9
%47 = load double, double* %13
%48 = fadd double %47, %46
store double %48, double* %13
br label %17
49: ; preds = %17
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%f \00"
@str = [12 x i8] c"dF1 = [ ...\00"
@str.4 = [4 x i8] c"];\0A\00"
@str.5 = [6 x i8] c"; ...\00"
define void @compute_all_bingham_dF1_2d(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%8 = fcmp ugt double %0, %1
br i1 %8, label %27, label %9
9: ; preds = %6
%10 = fcmp ugt double %3, %4
br label %11
11: ; preds = %9, %23
%12 = phi double [ %0, %9 ], [ %25, %23 ]
br i1 %10, label %23, label %13
13: ; preds = %11, %18
%14 = phi double [ %21, %18 ], [ %3, %11 ]
%15 = fcmp ugt double %12, %14
br i1 %15, label %18, label %16
16: ; preds = %13
%17 = tail call double @bingham_dF1_2d(double %12, double %14)
br label %18
18: ; preds = %13, %16
%19 = phi double [ %17, %16 ], [ 0.000000e+00, %13 ]
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %19)
%21 = fadd double %14, %5
%22 = fcmp ugt double %21, %4
br i1 %22, label %23, label %13
23: ; preds = %18, %11
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0))
%25 = fadd double %12, %2
%26 = fcmp ugt double %25, %1
br i1 %26, label %27, label %11
27: ; preds = %23, %6
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.4, i64 0, i64 0))
ret void
}