#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 */
float arctan(float);
float alfa(float x, float y) {
  float pi = 3.14, aux, radianos;
  if (x == 0 && y == 0) {
    return -1;
  }
  if (y < x) {
    aux = y / x;
    radianos = arctan(aux);
  } else {
    aux = (x / y);
    radianos = pi / 2 - arctan(aux);
  }
  return (180 * radianos) / pi;
}


x86 assembly (clang, -O0):
<alfa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  0xed6(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    116f <alfa+0x5f>
jp     116f <alfa+0x5f>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    116f <alfa+0x5f>
jp     116f <alfa+0x5f>
movss  0xea7(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11fc <alfa+0xec>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11a5 <alfa+0x95>
movss  -0xc(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
call   1030 <arctan@plt>
movss  %xmm0,-0x18(%rbp)
jmp    11e5 <alfa+0xd5>
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xe43(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
call   1030 <arctan@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe1b(%rip),%xmm0
mulss  -0x18(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alfa>:
push   %rax
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jne    112c <alfa+0x1c>
jp     112c <alfa+0x1c>
ucomiss %xmm2,%xmm1
jne    112c <alfa+0x1c>
jp     112c <alfa+0x1c>
movss  0xed6(%rip),%xmm0
pop    %rax
ret
ucomiss %xmm1,%xmm0
jbe    113f <alfa+0x2f>
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
call   1030 <arctan@plt>
jmp    1157 <alfa+0x47>
divss  %xmm1,%xmm0
call   1030 <arctan@plt>
movaps %xmm0,%xmm1
movss  0xeb1(%rip),%xmm0
subss  %xmm1,%xmm0
mulss  0xea9(%rip),%xmm0
divss  0xea5(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @alfa(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %4
store float %1, float* %5
store float 0x40091EB860000000, float* %6
%9 = load float, float* %4
%10 = fcmp oeq float %9, 0.000000e+00
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load float, float* %5
%13 = fcmp oeq float %12, 0.000000e+00
br i1 %13, label %14, label %15
14: ; preds = %11
store float -1.000000e+00, float* %3
br label %39
15: ; preds = %11, %2
%16 = load float, float* %5
%17 = load float, float* %4
%18 = fcmp olt float %16, %17
br i1 %18, label %19, label %25
19: ; preds = %15
%20 = load float, float* %5
%21 = load float, float* %4
%22 = fdiv float %20, %21
store float %22, float* %7
%23 = load float, float* %7
%24 = call float @arctan(float %23)
store float %24, float* %8
br label %34
25: ; preds = %15
%26 = load float, float* %4
%27 = load float, float* %5
%28 = fdiv float %26, %27
store float %28, float* %7
%29 = load float, float* %6
%30 = fdiv float %29, 2.000000e+00
%31 = load float, float* %7
%32 = call float @arctan(float %31)
%33 = fsub float %30, %32
store float %33, float* %8
br label %34
34: ; preds = %25, %19
%35 = load float, float* %8
%36 = fmul float 1.800000e+02, %35
%37 = load float, float* %6
%38 = fdiv float %36, %37
store float %38, float* %3
br label %39
39: ; preds = %34, %14
%40 = load float, float* %3
ret float %40
}

LLVM IR (-O2):
define float @alfa(float %0, float %1) {
%3 = fcmp oeq float %0, 0.000000e+00
%4 = fcmp oeq float %1, 0.000000e+00
%5 = and i1 %3, %4
br i1 %5, label %19, label %6
6: ; preds = %2
%7 = fcmp olt float %1, %0
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = fdiv float %1, %0
%10 = tail call float @arctan(float %9)
br label %15
11: ; preds = %6
%12 = fdiv float %0, %1
%13 = tail call float @arctan(float %12)
%14 = fsub float 0x3FF91EB860000000, %13
br label %15
15: ; preds = %11, %8
%16 = phi float [ %10, %8 ], [ %14, %11 ]
%17 = fmul float %16, 1.800000e+02
%18 = fdiv float %17, 0x40091EB860000000
br label %19
19: ; preds = %2, %15
%20 = phi float [ %18, %15 ], [ -1.000000e+00, %2 ]
ret float %20
}