#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 abs(double);
void ABC(double x1, double y1, double x2, double y2, double *A, double *B,
         double *C) {
  if (abs(x2 - x1) < 0.000000001) {
    *A = 1.0;
    *B = 0;
    *C = -1 * x1;
    return;
  }
  double m = (y2 - y1) / (x2 - x1);
  double b = y1 - (m * x1);
  *A = -1 * m;
  *B = 1.0;
  *C = -1 * b;
  return;
}


x86 assembly (clang, -O0):
<ABC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movsd  0xeae(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1191 <ABC+0x81>
mov    -0x28(%rbp),%rax
movsd  0xea8(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movsd  0xe89(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    121b <ABC+0x10b>
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe1f(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0xe0e(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  0xdfa(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ABC>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
movaps %xmm3,0x20(%rsp)
movsd  %xmm1,0x8(%rsp)
movapd %xmm0,0x10(%rsp)
subsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
movapd %xmm2,%xmm0
call   1030 <abs@plt>
movsd  0xebb(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1167 <ABC+0x57>
xorpd  %xmm0,%xmm0
movsd  0xea1(%rip),%xmm2
movapd 0x10(%rsp),%xmm1
jmp    119a <ABC+0x8a>
movapd 0x20(%rsp),%xmm2
movsd  0x8(%rsp),%xmm0
subsd  %xmm0,%xmm2
xorpd  0xe91(%rip),%xmm2
divsd  (%rsp),%xmm2
movapd 0x10(%rsp),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe66(%rip),%xmm0
movsd  %xmm2,(%rbx)
movsd  %xmm0,(%r15)
xorpd  0xe65(%rip),%xmm1
movlpd %xmm1,(%r14)
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ABC(double %0, double %1, double %2, double %3, double* %4, double* %5, double* %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double
%16 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%17 = load double, double* %10
%18 = load double, double* %8
%19 = fsub double %17, %18
%20 = call double @abs(double %19)
%21 = fcmp olt double %20, 1.000000e-09
br i1 %21, label %22, label %28
22: ; preds = %7
%23 = load double*, double** %12
store double 1.000000e+00, double* %23
%24 = load double*, double** %13
store double 0.000000e+00, double* %24
%25 = load double, double* %8
%26 = fmul double -1.000000e+00, %25
%27 = load double*, double** %14
store double %26, double* %27
br label %48
28: ; preds = %7
%29 = load double, double* %11
%30 = load double, double* %9
%31 = fsub double %29, %30
%32 = load double, double* %10
%33 = load double, double* %8
%34 = fsub double %32, %33
%35 = fdiv double %31, %34
store double %35, double* %15
%36 = load double, double* %9
%37 = load double, double* %15
%38 = load double, double* %8
%39 = fneg double %37
%40 = call double @llvm.fmuladd.f64(double %39, double %38, double %36)
store double %40, double* %16
%41 = load double, double* %15
%42 = fmul double -1.000000e+00, %41
%43 = load double*, double** %12
store double %42, double* %43
%44 = load double*, double** %13
store double 1.000000e+00, double* %44
%45 = load double, double* %16
%46 = fmul double -1.000000e+00, %45
%47 = load double*, double** %14
store double %46, double* %47
br label %48
48: ; preds = %28, %22
ret void
}

LLVM IR (-O2):
define void @ABC(double %0, double %1, double %2, double %3, double* nocapture writeonly %4, double* nocapture writeonly %5, double* nocapture writeonly %6) {
%8 = fsub double %2, %0
%9 = tail call double @abs(double %8)
%10 = fcmp olt double %9, 1.000000e-09
br i1 %10, label %16, label %11
11: ; preds = %7
%12 = fsub double %3, %1
%13 = fneg double %12
%14 = fdiv double %13, %8
%15 = tail call double @llvm.fmuladd.f64(double %14, double %0, double %1)
br label %16
16: ; preds = %7, %11
%17 = phi double [ %14, %11 ], [ 1.000000e+00, %7 ]
%18 = phi double [ 1.000000e+00, %11 ], [ 0.000000e+00, %7 ]
%19 = phi double [ %15, %11 ], [ %0, %7 ]
store double %17, double* %4
store double %18, double* %5
%20 = fneg double %19
store double %20, double* %6
ret void
}