#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*/ circle_circle_intersection(double, double, double, double,
                                              double, double, double *,
                                              double *, double *, double *);
int /*<<< orphan*/ printf(char *, double, double, double, double, ...);
void run_test(double x0, double y0, double r0, double x1, double y1,
              double r1) {
  double x3, y3, x3_prime, y3_prime;
  printf("x0=%F, y0=%F, r0=%F, x1=%F, y1=%F, r1=%F :\n", x0, y0, r0, x1, y1,
         r1);
  circle_circle_intersection(x0, y0, r0, x1, y1, r1, &x3, &y3, &x3_prime,
                             &y3_prime);
  printf("  x3=%F, y3=%F, x3_prime=%F, y3_prime=%F\n", x3, y3, x3_prime,
         y3_prime);
}


x86 assembly (clang, -O0):
<run_test>:
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)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
lea    0xe95(%rip),%rdi
mov    $0x6,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
lea    -0x38(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x48(%rbp),%rdx
lea    -0x50(%rbp),%rcx
call   1030 <circle_circle_intersection@plt>
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm3
lea    0xe6c(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_test>:
sub    $0x58,%rsp
movsd  %xmm5,0x30(%rsp)
movsd  %xmm4,0x28(%rsp)
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
lea    0xeb1(%rip),%rdi
mov    $0x6,%al
call   1040 <printf@plt>
lea    0x50(%rsp),%rdi
lea    0x48(%rsp),%rsi
lea    0x40(%rsp),%rdx
lea    0x38(%rsp),%rcx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x28(%rsp),%xmm4
movsd  0x30(%rsp),%xmm5
call   1030 <circle_circle_intersection@plt>
movsd  0x50(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
movsd  0x38(%rsp),%xmm3
lea    0xe7a(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"x0=%F, y0=%F, r0=%F, x1=%F, y1=%F, r1=%F :\0A\00"
@.str.1 = [42 x i8] c" x3=%F, y3=%F, x3_prime=%F, y3_prime=%F\0A\00"
define void @run_test(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
%15 = alloca double
%16 = 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
%17 = load double, double* %7
%18 = load double, double* %8
%19 = load double, double* %9
%20 = load double, double* %10
%21 = load double, double* %11
%22 = load double, double* %12
%23 = call i32 (i8*, double, double, double, double, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), double %17, double %18, double %19, double %20, double %21, double %22)
%24 = load double, double* %7
%25 = load double, double* %8
%26 = load double, double* %9
%27 = load double, double* %10
%28 = load double, double* %11
%29 = load double, double* %12
%30 = call i32 @circle_circle_intersection(double %24, double %25, double %26, double %27, double %28, double %29, double* %13, double* %14, double* %15, double* %16)
%31 = load double, double* %13
%32 = load double, double* %14
%33 = load double, double* %15
%34 = load double, double* %16
%35 = call i32 (i8*, double, double, double, double, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), double %31, double %32, double %33, double %34)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"x0=%F, y0=%F, r0=%F, x1=%F, y1=%F, r1=%F :\0A\00"
@.str.1 = [42 x i8] c" x3=%F, y3=%F, x3_prime=%F, y3_prime=%F\0A\00"
define void @run_test(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 = bitcast double* %7 to i8*
%12 = bitcast double* %8 to i8*
%13 = bitcast double* %9 to i8*
%14 = bitcast double* %10 to i8*
%15 = tail call i32 (i8*, double, double, double, double, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), double %0, double %1, double %2, double %3, double %4, double %5)
%16 = call i32 @circle_circle_intersection(double %0, double %1, double %2, double %3, double %4, double %5, double* %7, double* %8, double* %9, double* %10)
%17 = load double, double* %7
%18 = load double, double* %8
%19 = load double, double* %9
%20 = load double, double* %10
%21 = call i32 (i8*, double, double, double, double, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), double %17, double %18, double %19, double %20)
ret void
}