#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, int, int);
scalar_t__ scanf(char *, double *, double *, double *, double *, double *,
                 double *);
int main(void) {
  double x1, y1, x2, y2, xq, yq, t;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &xq, &yq) !=
         EOF) {
    t = ((x2 - x1) * (xq - x1) + (y2 - y1) * (yq - y1)) /
        ((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
    printf("%lf %lf\n", 2 * (1 - t) * x1 + 2 * t * x2 - xq,
           2 * (1 - t) * y1 + 2 * t * y2 - yq);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x30(%rbp),%r9
lea    -0x38(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <scanf@plt>
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%rax
je     126b <main+0x14b>
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm3
subsd  -0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
subsd  -0x10(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm4
subsd  -0x18(%rbp),%xmm4
mulsd  %xmm4,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe28(%rip),%xmm1
subsd  -0x40(%rbp),%xmm1
movsd  0xe13(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  0xe02(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%esi
movsd  0xde7(%rip),%xmm1
subsd  -0x40(%rbp),%xmm1
movsd  0xdd2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xdc1(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x38(%rbp),%xmm0
cvttsd2si %xmm0,%edx
lea    0xdc7(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0x8(%rsp),%rax
mov    %rax,(%rsp)
lea    0xeca(%rip),%rdi
lea    0x30(%rsp),%rsi
lea    0x28(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x10(%rsp),%r9
call   1040 <scanf@plt>
mov    0x2e85(%rip),%r15
cmp    (%r15),%rax
je     127c <main+0x15c>
lea    0x30(%rsp),%r12
lea    0x28(%rsp),%r13
lea    0x20(%rsp),%rbx
lea    0x18(%rsp),%rbp
lea    0x10(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x20(%rsp),%xmm3
movsd  0x30(%rsp),%xmm0
movsd  0x10(%rsp),%xmm8
movapd %xmm8,%xmm6
unpcklpd %xmm3,%xmm6
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
subpd  %xmm2,%xmm6
movsd  0x18(%rsp),%xmm5
movsd  0x28(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm7
unpcklpd %xmm5,%xmm7
movapd %xmm1,%xmm4
unpcklpd %xmm1,%xmm4
subpd  %xmm4,%xmm7
movapd %xmm7,%xmm4
unpckhpd %xmm7,%xmm4
mulpd  %xmm7,%xmm4
movapd %xmm6,%xmm7
unpckhpd %xmm6,%xmm7
mulpd  %xmm6,%xmm7
addpd  %xmm4,%xmm7
movapd %xmm7,%xmm4
unpckhpd %xmm7,%xmm4
divsd  %xmm4,%xmm7
movsd  0xdf2(%rip),%xmm4
subsd  %xmm7,%xmm4
addsd  %xmm4,%xmm4
addsd  %xmm7,%xmm7
mulsd  %xmm7,%xmm3
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
subsd  %xmm8,%xmm0
cvttsd2si %xmm0,%esi
mulsd  %xmm5,%xmm7
mulsd  %xmm1,%xmm4
addsd  %xmm7,%xmm4
subsd  %xmm2,%xmm4
cvttsd2si %xmm4,%edx
lea    0xdd6(%rip),%rdi
call   1030 <printf@plt>
lea    0x8(%rsp),%rax
mov    %rax,(%rsp)
lea    0xda9(%rip),%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
mov    %rbp,%r8
mov    %r14,%r9
call   1040 <scanf@plt>
cmp    (%r15),%rax
jne    1190 <main+0x70>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"%lf,%lf,%lf,%lf,%lf,%lf\00"
@EOF = global i64 0
@.str.1 = [9 x i8] c"%lf %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %1
br label %9
9: ; preds = %13, %0
%10 = call i64 @scanf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4, double* %5, double* %6, double* %7)
%11 = load i64, i64* @EOF
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %68
13: ; preds = %9
%14 = load double, double* %4
%15 = load double, double* %2
%16 = fsub double %14, %15
%17 = load double, double* %6
%18 = load double, double* %2
%19 = fsub double %17, %18
%20 = load double, double* %5
%21 = load double, double* %3
%22 = fsub double %20, %21
%23 = load double, double* %7
%24 = load double, double* %3
%25 = fsub double %23, %24
%26 = fmul double %22, %25
%27 = call double @llvm.fmuladd.f64(double %16, double %19, double %26)
%28 = load double, double* %4
%29 = load double, double* %2
%30 = fsub double %28, %29
%31 = load double, double* %4
%32 = load double, double* %2
%33 = fsub double %31, %32
%34 = load double, double* %5
%35 = load double, double* %3
%36 = fsub double %34, %35
%37 = load double, double* %5
%38 = load double, double* %3
%39 = fsub double %37, %38
%40 = fmul double %36, %39
%41 = call double @llvm.fmuladd.f64(double %30, double %33, double %40)
%42 = fdiv double %27, %41
store double %42, double* %8
%43 = load double, double* %8
%44 = fsub double 1.000000e+00, %43
%45 = fmul double 2.000000e+00, %44
%46 = load double, double* %2
%47 = load double, double* %8
%48 = fmul double 2.000000e+00, %47
%49 = load double, double* %4
%50 = fmul double %48, %49
%51 = call double @llvm.fmuladd.f64(double %45, double %46, double %50)
%52 = load double, double* %6
%53 = fsub double %51, %52
%54 = fptosi double %53 to i32
%55 = load double, double* %8
%56 = fsub double 1.000000e+00, %55
%57 = fmul double 2.000000e+00, %56
%58 = load double, double* %3
%59 = load double, double* %8
%60 = fmul double 2.000000e+00, %59
%61 = load double, double* %5
%62 = fmul double %60, %61
%63 = call double @llvm.fmuladd.f64(double %57, double %58, double %62)
%64 = load double, double* %7
%65 = fsub double %63, %64
%66 = fptosi double %65 to i32
%67 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %54, i32 %66)
br label %9
68: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"%lf,%lf,%lf,%lf,%lf,%lf\00"
@EOF = global i64 0
@.str.1 = [9 x i8] c"%lf %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %1 to i8*
%8 = bitcast double* %2 to i8*
%9 = bitcast double* %3 to i8*
%10 = bitcast double* %4 to i8*
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
%13 = call i64 @scanf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4, double* %5, double* %6)
%14 = load i64, i64* @EOF
%15 = icmp eq i64 %13, %14
br i1 %15, label %55, label %16
16: ; preds = %0, %16
%17 = load double, double* %3
%18 = load double, double* %1
%19 = load double, double* %5
%20 = insertelement <2 x double> poison, double %19, i64 0
%21 = insertelement <2 x double> %20, double %17, i64 1
%22 = insertelement <2 x double> poison, double %18, i64 0
%23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> zeroinitializer
%24 = fsub <2 x double> %21, %23
%25 = load double, double* %4
%26 = load double, double* %2
%27 = load double, double* %6
%28 = insertelement <2 x double> poison, double %27, i64 0
%29 = insertelement <2 x double> %28, double %25, i64 1
%30 = insertelement <2 x double> poison, double %26, i64 0
%31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
%32 = fsub <2 x double> %29, %31
%33 = shufflevector <2 x double> %32, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%34 = fmul <2 x double> %33, %32
%35 = shufflevector <2 x double> %24, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%36 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %35, <2 x double> %24, <2 x double> %34)
%37 = extractelement <2 x double> %36, i64 0
%38 = extractelement <2 x double> %36, i64 1
%39 = fdiv double %37, %38
%40 = fsub double 1.000000e+00, %39
%41 = fmul double %40, 2.000000e+00
%42 = fmul double %39, 2.000000e+00
%43 = fmul double %17, %42
%44 = call double @llvm.fmuladd.f64(double %41, double %18, double %43)
%45 = fsub double %44, %19
%46 = fptosi double %45 to i32
%47 = fmul double %25, %42
%48 = call double @llvm.fmuladd.f64(double %41, double %26, double %47)
%49 = fsub double %48, %27
%50 = fptosi double %49 to i32
%51 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %46, i32 %50)
%52 = call i64 @scanf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4, double* %5, double* %6)
%53 = load i64, i64* @EOF
%54 = icmp eq i64 %52, %53
br i1 %54, label %55, label %16
55: ; preds = %16, %0
ret i32 0
}