#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(void) {
  double x1, y1;
  scanf("%lf %lf", &x1, &y1);
  if (x1 < 0) {
    if (y1 < 0) {
      printf("Q3\n");
    } else if (y1 == 0) {
      printf("Eixo X\n");
    } else {
      printf("Q2\n");
    }
  } else if (x1 == 0) {
    if (y1 == 0) {
      printf("Origem\n");
    } else {
      printf("Eixo Y\n");
    }
  } else {
    if (y1 < 0) {
      printf("Q4\n");
    } else if (y1 == 0) {
      printf("Eixo X\n");
    } else {
      printf("Q1\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>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11af <main+0x8f>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1170 <main+0x50>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <main+0x8a>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1199 <main+0x79>
jp     1199 <main+0x79>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
jmp    11a5 <main+0x85>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <main+0x8a>
jmp    1264 <main+0x144>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1201 <main+0xe1>
jp     1201 <main+0xe1>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11f0 <main+0xd0>
jp     11f0 <main+0xd0>
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
jmp    11fc <main+0xdc>
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
jmp    125f <main+0x13f>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1220 <main+0x100>
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
jmp    125a <main+0x13a>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1249 <main+0x129>
jp     1249 <main+0x129>
lea    0xdcd(%rip),%rdi
call   1030 <printf@plt>
jmp    1255 <main+0x135>
lea    0xddc(%rip),%rdi
call   1030 <printf@plt>
jmp    125a <main+0x13a>
jmp    125f <main+0x13f>
jmp    1264 <main+0x144>
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
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    115f <main+0x3f>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm0
jbe    1185 <main+0x65>
lea    0xec9(%rip),%rdi
jmp    11bf <main+0x9f>
ucomisd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
xorpd  %xmm1,%xmm1
jne    1196 <main+0x76>
jp     1196 <main+0x76>
ucomisd %xmm1,%xmm0
lea    0xe92(%rip),%rax
lea    0xe92(%rip),%rdi
jmp    11b7 <main+0x97>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
lea    0xe88(%rip),%rax
jmp    11b0 <main+0x90>
ucomisd %xmm0,%xmm1
jbe    11a5 <main+0x85>
lea    0xe68(%rip),%rdi
jmp    11bf <main+0x9f>
ucomisd %xmm1,%xmm0
lea    0xe58(%rip),%rax
lea    0xe68(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [4 x i8] c"Q3\0A\00"
@.str.2 = [8 x i8] c"Eixo X\0A\00"
@.str.3 = [4 x i8] c"Q2\0A\00"
@.str.4 = [8 x i8] c"Origem\0A\00"
@.str.5 = [8 x i8] c"Eixo Y\0A\00"
@.str.6 = [4 x i8] c"Q4\0A\00"
@.str.7 = [4 x i8] c"Q1\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 ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%5 = load double, double* %2
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %21
7: ; preds = %0
%8 = load double, double* %3
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %20
12: ; preds = %7
%13 = load double, double* %3
%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 %19
17: ; preds = %12
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
br label %20
20: ; preds = %19, %10
br label %47
21: ; preds = %0
%22 = load double, double* %2
%23 = fcmp oeq double %22, 0.000000e+00
br i1 %23, label %24, label %32
24: ; preds = %21
%25 = load double, double* %3
%26 = fcmp oeq double %25, 0.000000e+00
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %31
29: ; preds = %24
%30 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %31
31: ; preds = %29, %27
br label %46
32: ; preds = %21
%33 = load double, double* %3
%34 = fcmp olt double %33, 0.000000e+00
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %45
37: ; preds = %32
%38 = load double, double* %3
%39 = fcmp oeq double %38, 0.000000e+00
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %44
42: ; preds = %37
%43 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %44
44: ; preds = %42, %40
br label %45
45: ; preds = %44, %35
br label %46
46: ; preds = %45, %31
br label %47
47: ; preds = %46, %20
ret i32 0
}

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