#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__ calcAngleA(double, double, double);
double calcDist(int, int, int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *, int *, int *);
int main() {
  int x1, y1, x2, y2, x3, y3;
  scanf("%d,%d;%d,%d;%d,%d;", &x1, &y1, &x2, &y2, &x3, &y3);
  double a, b, c;
  a = calcDist(x2, y2, x3, y3);
  b = calcDist(x1, y1, x3, y3);
  c = calcDist(x1, y1, x2, y2);
  printf("%d,%d,%d\n", (int)calcAngleA(a, b, c), (int)calcAngleA(b, a, c),
         (int)calcAngleA(c, a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
lea    -0x18(%rbp),%r9
lea    -0x1c(%rbp),%rax
mov    %rax,(%rsp)
call   1060 <scanf@plt>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <calcDist@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <calcDist@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <calcDist@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
call   1050 <calcAngleA@plt>
mov    %eax,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
call   1050 <calcAngleA@plt>
mov    %eax,-0x3c(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
call   1050 <calcAngleA@plt>
mov    -0x40(%rbp),%esi
mov    -0x3c(%rbp),%edx
mov    %eax,%ecx
lea    0xe09(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0x8(%rsp),%rax
mov    %rax,(%rsp)
lea    0xea9(%rip),%rdi
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0xc(%rsp),%r9
call   1060 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
call   1030 <calcDist@plt>
movsd  %xmm0,0x28(%rsp)
mov    0x1c(%rsp),%edi
mov    0x18(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
call   1030 <calcDist@plt>
movsd  %xmm0,0x20(%rsp)
mov    0x1c(%rsp),%edi
mov    0x18(%rsp),%esi
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%ecx
call   1030 <calcDist@plt>
movaps %xmm0,%xmm2
movsd  %xmm0,0x30(%rsp)
movsd  0x28(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
call   1050 <calcAngleA@plt>
mov    %rax,%r14
movsd  0x20(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
call   1050 <calcAngleA@plt>
mov    %rax,%rbx
movsd  0x30(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
call   1050 <calcAngleA@plt>
lea    0xdfe(%rip),%rdi
mov    %r14d,%esi
mov    %ebx,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%d,%d;%d,%d;%d,%d;\00"
@.str.1 = [10 x i8] c"%d,%d,%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 0, i32* %1
%11 = call i32 @scanf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7)
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = call double @calcDist(i32 %12, i32 %13, i32 %14, i32 %15)
store double %16, double* %8
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = call double @calcDist(i32 %17, i32 %18, i32 %19, i32 %20)
store double %21, double* %9
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = call double @calcDist(i32 %22, i32 %23, i32 %24, i32 %25)
store double %26, double* %10
%27 = load double, double* %8
%28 = load double, double* %9
%29 = load double, double* %10
%30 = call i64 @calcAngleA(double %27, double %28, double %29)
%31 = trunc i64 %30 to i32
%32 = load double, double* %9
%33 = load double, double* %8
%34 = load double, double* %10
%35 = call i64 @calcAngleA(double %32, double %33, double %34)
%36 = trunc i64 %35 to i32
%37 = load double, double* %10
%38 = load double, double* %8
%39 = load double, double* %9
%40 = call i64 @calcAngleA(double %37, double %38, double %39)
%41 = trunc i64 %40 to i32
%42 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %31, i32 %36, i32 %41)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"%d,%d;%d,%d;%d,%d;\00"
@.str.1 = [10 x i8] c"%d,%d,%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %1 to i8*
%8 = bitcast i32* %2 to i8*
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
%11 = bitcast i32* %5 to i8*
%12 = bitcast i32* %6 to i8*
%13 = call i32 @scanf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6)
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = call double @calcDist(i32 %14, i32 %15, i32 %16, i32 %17)
%19 = load i32, i32* %1
%20 = load i32, i32* %2
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = call double @calcDist(i32 %19, i32 %20, i32 %21, i32 %22)
%24 = load i32, i32* %1
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = call double @calcDist(i32 %24, i32 %25, i32 %26, i32 %27)
%29 = call i64 @calcAngleA(double %18, double %23, double %28)
%30 = trunc i64 %29 to i32
%31 = call i64 @calcAngleA(double %23, double %18, double %28)
%32 = trunc i64 %31 to i32
%33 = call i64 @calcAngleA(double %28, double %18, double %23)
%34 = trunc i64 %33 to i32
%35 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %30, i32 %32, i32 %34)
ret i32 0
}