#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main() {
  double X, Y;
  scanf(" %lf %lf", &X, &Y);
  if ((X == 0.0) && (Y == 0.0))
    printf("Origem\n");
  else if ((X == 0.0))
    printf("Eixo Y\n");
  else if (Y == 0.0)
    printf("Eixo X\n");
  else if ((X > 0.0) && (Y > 0.0))
    printf("Q1\n");
  else if ((X > 0.0) && (Y < 0.0))
    printf("Q4\n");
  else if ((X < 0.0) && (Y < 0.0))
    printf("Q3\n");
  else if ((X < 0.0) && (Y > 0.0))
    printf("Q2\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1184 <main+0x64>
jp     1184 <main+0x64>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1184 <main+0x64>
jp     1184 <main+0x64>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    12b3 <main+0x193>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11ad <main+0x8d>
jp     11ad <main+0x8d>
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
jmp    12ae <main+0x18e>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11d6 <main+0xb6>
jp     11d6 <main+0xb6>
lea    0xe4d(%rip),%rdi
call   1030 <printf@plt>
jmp    12a9 <main+0x189>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    120b <main+0xeb>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    120b <main+0xeb>
lea    0xe20(%rip),%rdi
call   1030 <printf@plt>
jmp    12a4 <main+0x184>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    123c <main+0x11c>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    123c <main+0x11c>
lea    0xdf3(%rip),%rdi
call   1030 <printf@plt>
jmp    129f <main+0x17f>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1269 <main+0x149>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1269 <main+0x149>
lea    0xdca(%rip),%rdi
call   1030 <printf@plt>
jmp    129a <main+0x17a>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1295 <main+0x175>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1295 <main+0x175>
lea    0xd9d(%rip),%rdi
call   1030 <printf@plt>
jmp    129a <main+0x17a>
jmp    129f <main+0x17f>
jmp    12a4 <main+0x184>
jmp    12a9 <main+0x189>
jmp    12ae <main+0x18e>
jmp    12b3 <main+0x193>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
lea    0xec7(%rip),%rax
lea    0xec7(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
ucomisd %xmm1,%xmm2
cmovne %rax,%rdi
cmovp  %rax,%rdi
lea    0xe9e(%rip),%rax
cmovne %rax,%rdi
cmovp  %rax,%rdi
ucomisd %xmm2,%xmm1
jne    1187 <main+0x67>
jnp    11f1 <main+0xd1>
ucomisd %xmm2,%xmm0
jne    118f <main+0x6f>
jnp    11f1 <main+0xd1>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jbe    11a8 <main+0x88>
ucomisd %xmm2,%xmm0
jbe    11a8 <main+0x88>
lea    0xe6c(%rip),%rdi
jmp    11f1 <main+0xd1>
ucomisd %xmm2,%xmm1
jbe    11c1 <main+0xa1>
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
jbe    11c1 <main+0xa1>
lea    0xe50(%rip),%rdi
jmp    11f1 <main+0xd1>
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
jbe    11da <main+0xba>
ucomisd %xmm0,%xmm2
jbe    11da <main+0xba>
lea    0xe34(%rip),%rdi
jmp    11f1 <main+0xd1>
ucomisd %xmm1,%xmm2
jbe    11f6 <main+0xd6>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11f6 <main+0xd6>
lea    0xe18(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c" %lf %lf\00"
@.str.1 = [8 x i8] c"Origem\0A\00"
@.str.2 = [8 x i8] c"Eixo Y\0A\00"
@.str.3 = [8 x i8] c"Eixo X\0A\00"
@.str.4 = [4 x i8] c"Q1\0A\00"
@.str.5 = [4 x i8] c"Q4\0A\00"
@.str.6 = [4 x i8] c"Q3\0A\00"
@.str.7 = [4 x i8] c"Q2\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%5 = load double, double* %2
%6 = fcmp oeq double %5, 0.000000e+00
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load double, double* %3
%9 = fcmp oeq double %8, 0.000000e+00
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %60
12: ; preds = %7, %0
%13 = load double, double* %2
%14 = fcmp oeq double %13, 0.000000e+00
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %59
17: ; preds = %12
%18 = load double, double* %3
%19 = fcmp oeq double %18, 0.000000e+00
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %58
22: ; preds = %17
%23 = load double, double* %2
%24 = fcmp ogt double %23, 0.000000e+00
br i1 %24, label %25, label %30
25: ; preds = %22
%26 = load double, double* %3
%27 = fcmp ogt double %26, 0.000000e+00
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %57
30: ; preds = %25, %22
%31 = load double, double* %2
%32 = fcmp ogt double %31, 0.000000e+00
br i1 %32, label %33, label %38
33: ; preds = %30
%34 = load double, double* %3
%35 = fcmp olt double %34, 0.000000e+00
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %56
38: ; preds = %33, %30
%39 = load double, double* %2
%40 = fcmp olt double %39, 0.000000e+00
br i1 %40, label %41, label %46
41: ; preds = %38
%42 = load double, double* %3
%43 = fcmp olt double %42, 0.000000e+00
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %55
46: ; preds = %41, %38
%47 = load double, double* %2
%48 = fcmp olt double %47, 0.000000e+00
br i1 %48, label %49, label %54
49: ; preds = %46
%50 = load double, double* %3
%51 = fcmp ogt double %50, 0.000000e+00
br i1 %51, label %52, label %54
52: ; preds = %49
%53 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %54
54: ; preds = %52, %49, %46
br label %55
55: ; preds = %54, %44
br label %56
56: ; preds = %55, %36
br label %57
57: ; preds = %56, %28
br label %58
58: ; preds = %57, %20
br label %59
59: ; preds = %58, %15
br label %60
60: ; preds = %59, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c" %lf %lf\00"
@str = [3 x i8] c"Q2\00"
@str.8 = [3 x i8] c"Q3\00"
@str.9 = [3 x i8] c"Q4\00"
@str.10 = [3 x i8] c"Q1\00"
@str.11 = [7 x i8] c"Eixo X\00"
@str.12 = [7 x i8] c"Eixo Y\00"
@str.13 = [7 x i8] c"Origem\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %1
%7 = fcmp oeq double %6, 0.000000e+00
%8 = load double, double* %2
%9 = fcmp oeq double %8, 0.000000e+00
%10 = select i1 %7, i1 %9, i1 false
%11 = select i1 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.13, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.12, i64 0, i64 0)
%12 = select i1 %7, i1 true, i1 %9
%13 = select i1 %7, i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.11, i64 0, i64 0)
br i1 %12, label %26, label %14
14: ; preds = %0
%15 = fcmp ogt double %6, 0.000000e+00
%16 = fcmp ogt double %8, 0.000000e+00
%17 = select i1 %15, i1 %16, i1 false
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = fcmp olt double %8, 0.000000e+00
%20 = select i1 %15, i1 %19, i1 false
br i1 %20, label %26, label %21
21: ; preds = %18
%22 = fcmp olt double %6, 0.000000e+00
%23 = select i1 %22, i1 %19, i1 false
br i1 %23, label %26, label %24
24: ; preds = %21
%25 = select i1 %22, i1 %16, i1 false
br i1 %25, label %26, label %29
26: ; preds = %0, %24, %21, %18, %14
%27 = phi i8* [ %13, %0 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.10, i64 0, i64 0), %14 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.9, i64 0, i64 0), %18 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.8, i64 0, i64 0), %21 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0), %24 ]
%28 = call i32 @puts(i8* dereferenceable(1) %27)
br label %29
29: ; preds = %26, %24
ret i32 0
}