#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 /*<<< orphan*/ DashDoubleZigZag(double *);
int /*<<< orphan*/ DashZigZag(double *);
int /*<<< orphan*/ DoubleZigZag(double *);
int /*<<< orphan*/ ZigZag(double *);
void AxoZigZag(double *args) {
  if (args[7]) {
    if (args[6]) {
      DashDoubleZigZag(args);
    } else {
      args[6] = args[7];
      DashZigZag(args);
    }
  } else {
    if (args[6]) {
      DoubleZigZag(args);
    } else {
      ZigZag(args);
    }
  }
}


x86 assembly (clang, -O0):
<AxoZigZag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    116d <AxoZigZag+0x2d>
jp     116d <AxoZigZag+0x2d>
jmp    11bc <AxoZigZag+0x7c>
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    118e <AxoZigZag+0x4e>
jp     118e <AxoZigZag+0x4e>
jmp    119c <AxoZigZag+0x5c>
mov    -0x8(%rbp),%rdi
call   1050 <DashDoubleZigZag@plt>
jmp    11b7 <AxoZigZag+0x77>
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <DashZigZag@plt>
jmp    11f9 <AxoZigZag+0xb9>
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11dd <AxoZigZag+0x9d>
jp     11dd <AxoZigZag+0x9d>
jmp    11eb <AxoZigZag+0xab>
mov    -0x8(%rbp),%rdi
call   1040 <DoubleZigZag@plt>
jmp    11f4 <AxoZigZag+0xb4>
mov    -0x8(%rbp),%rdi
call   1060 <ZigZag@plt>
jmp    11f9 <AxoZigZag+0xb9>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AxoZigZag>:
movsd  0x30(%rdi),%xmm1
movsd  0x38(%rdi),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    1156 <AxoZigZag+0x16>
jnp    1163 <AxoZigZag+0x23>
ucomisd %xmm2,%xmm1
jne    115e <AxoZigZag+0x1e>
jnp    1170 <AxoZigZag+0x30>
jmp    1050 <DashDoubleZigZag@plt>
ucomisd %xmm2,%xmm1
jne    116b <AxoZigZag+0x2b>
jnp    117a <AxoZigZag+0x3a>
jmp    1040 <DoubleZigZag@plt>
movsd  %xmm0,0x30(%rdi)
jmp    1030 <DashZigZag@plt>
jmp    1060 <ZigZag@plt>

LLVM IR (-O0):
define void @AxoZigZag(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 7
%5 = load double, double* %4
%6 = fcmp une double %5, 0.000000e+00
br i1 %6, label %7, label %24
7: ; preds = %1
%8 = load double*, double** %2
%9 = getelementptr inbounds double, double* %8, i64 6
%10 = load double, double* %9
%11 = fcmp une double %10, 0.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load double*, double** %2
%14 = call i32 @DashDoubleZigZag(double* %13)
br label %23
15: ; preds = %7
%16 = load double*, double** %2
%17 = getelementptr inbounds double, double* %16, i64 7
%18 = load double, double* %17
%19 = load double*, double** %2
%20 = getelementptr inbounds double, double* %19, i64 6
store double %18, double* %20
%21 = load double*, double** %2
%22 = call i32 @DashZigZag(double* %21)
br label %23
23: ; preds = %15, %12
br label %36
24: ; preds = %1
%25 = load double*, double** %2
%26 = getelementptr inbounds double, double* %25, i64 6
%27 = load double, double* %26
%28 = fcmp une double %27, 0.000000e+00
br i1 %28, label %29, label %32
29: ; preds = %24
%30 = load double*, double** %2
%31 = call i32 @DoubleZigZag(double* %30)
br label %35
32: ; preds = %24
%33 = load double*, double** %2
%34 = call i32 @ZigZag(double* %33)
br label %35
35: ; preds = %32, %29
br label %36
36: ; preds = %35, %23
ret void
}

LLVM IR (-O2):
define void @AxoZigZag(double* %0) {
%2 = getelementptr inbounds double, double* %0, i64 7
%3 = load double, double* %2
%4 = fcmp une double %3, 0.000000e+00
%5 = getelementptr inbounds double, double* %0, i64 6
%6 = load double, double* %5
%7 = fcmp une double %6, 0.000000e+00
br i1 %4, label %8, label %13
8: ; preds = %1
br i1 %7, label %9, label %11
9: ; preds = %8
%10 = tail call i32 @DashDoubleZigZag(double* %0)
br label %18
11: ; preds = %8
store double %3, double* %5
%12 = tail call i32 @DashZigZag(double* %0)
br label %18
13: ; preds = %1
br i1 %7, label %14, label %16
14: ; preds = %13
%15 = tail call i32 @DoubleZigZag(double* %0)
br label %18
16: ; preds = %13
%17 = tail call i32 @ZigZag(double* %0)
br label %18
18: ; preds = %14, %16, %9, %11
ret void
}