#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 ComputeDash(double *, double, double);
int /*<<< orphan*/ GluonHelp(double *, double);
int /*<<< orphan*/ SetDashSize(double, double);
int /*<<< orphan*/ SetTransferMatrix(double, double, double, double, double,
                                     double);
double sqrt(double);
void DashGluon(double *args) {
  double dx = args[2] - args[0];
  double dy = args[3] - args[1];
  double dr = sqrt(dx * dx + dy * dy);
  double dashsize;
  SetTransferMatrix(1, 0, 0, 1, args[0], args[1]);
  SetTransferMatrix(dx / dr, dy / dr, -dy / dr, dx / dr, 0, 0);
  dashsize = ComputeDash(args, dr, args[6]);
  SetDashSize(dashsize, dashsize / 2);
  GluonHelp(args, dr);
}


x86 assembly (clang, -O0):
<DashGluon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm4
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm5
movsd  0xe40(%rip),%xmm3
xorps  %xmm2,%xmm2
movaps %xmm3,%xmm0
movaps %xmm2,%xmm1
call   1060 <SetTransferMatrix@plt>
movsd  -0x10(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
divsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
divsd  -0x20(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
divsd  -0x20(%rbp),%xmm3
xorps  %xmm5,%xmm5
movaps %xmm5,%xmm4
call   1060 <SetTransferMatrix@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
call   1030 <ComputeDash@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xdb2(%rip),%xmm2
divsd  %xmm2,%xmm1
call   1040 <SetDashSize@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
call   1050 <GluonHelp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DashGluon>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
movsd  0x10(%rdi),%xmm0
movsd  0x18(%rdi),%xmm1
subsd  (%rdi),%xmm0
subsd  0x8(%rdi),%xmm1
movapd %xmm1,0x10(%rsp)
mulsd  %xmm1,%xmm1
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1193 <DashGluon+0x43>
sqrtsd %xmm0,%xmm0
jmp    1198 <DashGluon+0x48>
call   1070 <sqrt@plt>
movsd  %xmm0,(%rsp)
movsd  (%rbx),%xmm4
movsd  0x8(%rbx),%xmm5
movsd  0xe52(%rip),%xmm0
xorpd  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movaps %xmm0,%xmm3
call   1060 <SetTransferMatrix@plt>
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm3
divsd  %xmm3,%xmm0
movapd 0x10(%rsp),%xmm2
movapd %xmm2,%xmm1
divsd  %xmm3,%xmm1
xorpd  0xe2e(%rip),%xmm2
divsd  %xmm3,%xmm2
xorps  %xmm4,%xmm4
xorps  %xmm5,%xmm5
movapd %xmm0,%xmm3
call   1060 <SetTransferMatrix@plt>
movsd  0x30(%rbx),%xmm1
mov    %rbx,%rdi
movsd  (%rsp),%xmm0
call   1030 <ComputeDash@plt>
movsd  0xdf9(%rip),%xmm1
mulsd  %xmm0,%xmm1
call   1040 <SetDashSize@plt>
mov    %rbx,%rdi
movsd  (%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
jmp    1050 <GluonHelp@plt>

LLVM IR (-O0):
define void @DashGluon(double* %0) {
%2 = alloca double*
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double* %0, double** %2
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 2
%9 = load double, double* %8
%10 = load double*, double** %2
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fsub double %9, %12
store double %13, double* %3
%14 = load double*, double** %2
%15 = getelementptr inbounds double, double* %14, i64 3
%16 = load double, double* %15
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = fsub double %16, %19
store double %20, double* %4
%21 = load double, double* %3
%22 = load double, double* %3
%23 = load double, double* %4
%24 = load double, double* %4
%25 = fmul double %23, %24
%26 = call double @llvm.fmuladd.f64(double %21, double %22, double %25)
%27 = call double @sqrt(double %26)
store double %27, double* %5
%28 = load double*, double** %2
%29 = getelementptr inbounds double, double* %28, i64 0
%30 = load double, double* %29
%31 = load double*, double** %2
%32 = getelementptr inbounds double, double* %31, i64 1
%33 = load double, double* %32
%34 = call i32 @SetTransferMatrix(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, double %30, double %33)
%35 = load double, double* %3
%36 = load double, double* %5
%37 = fdiv double %35, %36
%38 = load double, double* %4
%39 = load double, double* %5
%40 = fdiv double %38, %39
%41 = load double, double* %4
%42 = fneg double %41
%43 = load double, double* %5
%44 = fdiv double %42, %43
%45 = load double, double* %3
%46 = load double, double* %5
%47 = fdiv double %45, %46
%48 = call i32 @SetTransferMatrix(double %37, double %40, double %44, double %47, double 0.000000e+00, double 0.000000e+00)
%49 = load double*, double** %2
%50 = load double, double* %5
%51 = load double*, double** %2
%52 = getelementptr inbounds double, double* %51, i64 6
%53 = load double, double* %52
%54 = call double @ComputeDash(double* %49, double %50, double %53)
store double %54, double* %6
%55 = load double, double* %6
%56 = load double, double* %6
%57 = fdiv double %56, 2.000000e+00
%58 = call i32 @SetDashSize(double %55, double %57)
%59 = load double*, double** %2
%60 = load double, double* %5
%61 = call i32 @GluonHelp(double* %59, double %60)
ret void
}

LLVM IR (-O2):
define void @DashGluon(double* %0) {
%2 = getelementptr inbounds double, double* %0, i64 2
%3 = load double, double* %2
%4 = load double, double* %0
%5 = fsub double %3, %4
%6 = getelementptr inbounds double, double* %0, i64 3
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = fsub double %7, %9
%11 = fmul double %10, %10
%12 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %11)
%13 = tail call double @sqrt(double %12)
%14 = load double, double* %0
%15 = load double, double* %8
%16 = tail call i32 @SetTransferMatrix(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, double %14, double %15)
%17 = fdiv double %5, %13
%18 = fdiv double %10, %13
%19 = fneg double %10
%20 = fdiv double %19, %13
%21 = tail call i32 @SetTransferMatrix(double %17, double %18, double %20, double %17, double 0.000000e+00, double 0.000000e+00)
%22 = getelementptr inbounds double, double* %0, i64 6
%23 = load double, double* %22
%24 = tail call double @ComputeDash(double* %0, double %13, double %23)
%25 = fmul double %24, 5.000000e-01
%26 = tail call i32 @SetDashSize(double %24, double %25)
%27 = tail call i32 @GluonHelp(double* %0, double %13)
ret void
}