int already_solved(double *angles, double *sides) {
  double sum_of_all_angles;
  register int i;
  for (i = 0; i < 3; i++)
    if (!((angles[i]) > 0))
      return 0;
  for (i = 0; i < 3; i++)
    if (!((sides[i]) > 0))
      return 0;
  sum_of_all_angles = 0;
  for (i = 0; i < 3; i++)
    sum_of_all_angles += angles[i];
  if (sum_of_all_angles != (180 * ((3) - 2)))
    return -1;
  return 1;
}


x86 assembly (clang, -O0):
<already_solved>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jge    1156 <already_solved+0x56>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     1143 <already_solved+0x43>
movl   $0x0,-0x4(%rbp)
jmp    1213 <already_solved+0x113>
jmp    1148 <already_solved+0x48>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1113 <already_solved+0x13>
movl   $0x0,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jge    11a0 <already_solved+0xa0>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     118d <already_solved+0x8d>
movl   $0x0,-0x4(%rbp)
jmp    1213 <already_solved+0x113>
jmp    1192 <already_solved+0x92>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    115d <already_solved+0x5d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jge    11de <already_solved+0xde>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11af <already_solved+0xaf>
movsd  -0x20(%rbp),%xmm0
movsd  0xe15(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1200 <already_solved+0x100>
jp     1200 <already_solved+0x100>
jmp    120c <already_solved+0x10c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1213 <already_solved+0x113>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<already_solved>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jbe    1174 <already_solved+0x74>
movsd  0x8(%rdi),%xmm1
ucomisd %xmm2,%xmm1
jbe    1174 <already_solved+0x74>
movsd  0x10(%rdi),%xmm2
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm2
jbe    1174 <already_solved+0x74>
movsd  (%rsi),%xmm4
ucomisd %xmm3,%xmm4
jbe    1174 <already_solved+0x74>
movsd  0x8(%rsi),%xmm4
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm4
jbe    1174 <already_solved+0x74>
movsd  0x10(%rsi),%xmm4
ucomisd %xmm3,%xmm4
jbe    1174 <already_solved+0x74>
xorpd  %xmm3,%xmm3
addsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
cmpeqsd 0xe99(%rip),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @already_solved(double* %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
%7 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 0, i32* %7
br label %8
8: ; preds = %20, %2
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %23
11: ; preds = %8
%12 = load double*, double** %4
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
%16 = load double, double* %15
%17 = fcmp ogt double %16, 0.000000e+00
br i1 %17, label %19, label %18
18: ; preds = %11
store i32 0, i32* %3
br label %59
19: ; preds = %11
br label %20
20: ; preds = %19
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
store i32 %22, i32* %7
br label %8
23: ; preds = %8
store i32 0, i32* %7
br label %24
24: ; preds = %36, %23
%25 = load i32, i32* %7
%26 = icmp slt i32 %25, 3
br i1 %26, label %27, label %39
27: ; preds = %24
%28 = load double*, double** %5
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %28, i64 %30
%32 = load double, double* %31
%33 = fcmp ogt double %32, 0.000000e+00
br i1 %33, label %35, label %34
34: ; preds = %27
store i32 0, i32* %3
br label %59
35: ; preds = %27
br label %36
36: ; preds = %35
%37 = load i32, i32* %7
%38 = add nsw i32 %37, 1
store i32 %38, i32* %7
br label %24
39: ; preds = %24
store double 0.000000e+00, double* %6
store i32 0, i32* %7
br label %40
40: ; preds = %51, %39
%41 = load i32, i32* %7
%42 = icmp slt i32 %41, 3
br i1 %42, label %43, label %54
43: ; preds = %40
%44 = load double*, double** %4
%45 = load i32, i32* %7
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double, double* %44, i64 %46
%48 = load double, double* %47
%49 = load double, double* %6
%50 = fadd double %49, %48
store double %50, double* %6
br label %51
51: ; preds = %43
%52 = load i32, i32* %7
%53 = add nsw i32 %52, 1
store i32 %53, i32* %7
br label %40
54: ; preds = %40
%55 = load double, double* %6
%56 = fcmp une double %55, 1.800000e+02
br i1 %56, label %57, label %58
57: ; preds = %54
store i32 -1, i32* %3
br label %59
58: ; preds = %54
store i32 1, i32* %3
br label %59
59: ; preds = %58, %57, %34, %18
%60 = load i32, i32* %3
ret i32 %60
}

LLVM IR (-O2):
define i32 @already_solved(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %30
5: ; preds = %2
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %30
9: ; preds = %5
%10 = getelementptr inbounds double, double* %0, i64 2
%11 = load double, double* %10
%12 = fcmp ogt double %11, 0.000000e+00
br i1 %12, label %13, label %30
13: ; preds = %9
%14 = load double, double* %1
%15 = fcmp ogt double %14, 0.000000e+00
br i1 %15, label %16, label %30
16: ; preds = %13
%17 = getelementptr inbounds double, double* %1, i64 1
%18 = load double, double* %17
%19 = fcmp ogt double %18, 0.000000e+00
br i1 %19, label %20, label %30
20: ; preds = %16
%21 = getelementptr inbounds double, double* %1, i64 2
%22 = load double, double* %21
%23 = fcmp ogt double %22, 0.000000e+00
br i1 %23, label %24, label %30
24: ; preds = %20
%25 = fadd double %3, 0.000000e+00
%26 = fadd double %25, %7
%27 = fadd double %26, %11
%28 = fcmp une double %27, 1.800000e+02
%29 = select i1 %28, i32 -1, i32 1
br label %30
30: ; preds = %2, %5, %9, %13, %16, %20, %24
%31 = phi i32 [ %29, %24 ], [ 0, %20 ], [ 0, %16 ], [ 0, %13 ], [ 0, %9 ], [ 0, %5 ], [ 0, %2 ]
ret i32 %31
}