#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 a, b;
  scanf("%lf %lf", &a, &b);
  if (a == 0.0 && b == 0.0) {
    printf("Origem\n");
    return 0;
  }
  if (a == 0.0) {
    printf("Eixo Y\n");
    return 0;
  }
  if (b == 0.0) {
    printf("Eixo X\n");
    return 0;
  }
  if (a > 0.0 && b > 0.0) {
    printf("Q1\n");
    return 0;
  }
  if (a < 0.0 && b > 0.0) {
    printf("Q2\n");
    return 0;
  }
  if (a < 0.0 && b < 0.0) {
    printf("Q3\n");
    return 0;
  }
  if (a > 0.0 && b < 0.0) {
    printf("Q4\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    118b <main+0x6b>
jp     118b <main+0x6b>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    118b <main+0x6b>
jp     118b <main+0x6b>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12c6 <main+0x1a6>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11bb <main+0x9b>
jp     11bb <main+0x9b>
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12c6 <main+0x1a6>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11eb <main+0xcb>
jp     11eb <main+0xcb>
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12c6 <main+0x1a6>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1227 <main+0x107>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1227 <main+0x107>
lea    0xe0a(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12c6 <main+0x1a6>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    125f <main+0x13f>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    125f <main+0x13f>
lea    0xdd6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12c6 <main+0x1a6>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1293 <main+0x173>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1293 <main+0x173>
lea    0xda6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    12c6 <main+0x1a6>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    12c6 <main+0x1a6>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    12c6 <main+0x1a6>
lea    0xd72(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%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    0xec6(%rip),%rax
lea    0xec6(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
ucomisd %xmm1,%xmm2
cmovne %rax,%rdi
cmovp  %rax,%rdi
lea    0xe9d(%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    0xe6b(%rip),%rdi
jmp    11f1 <main+0xd1>
ucomisd %xmm1,%xmm2
jbe    11c1 <main+0xa1>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jbe    11c1 <main+0xa1>
lea    0xe4f(%rip),%rdi
jmp    11f1 <main+0xd1>
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
jbe    11da <main+0xba>
ucomisd %xmm0,%xmm2
jbe    11da <main+0xba>
lea    0xe33(%rip),%rdi
jmp    11f1 <main+0xd1>
ucomisd %xmm2,%xmm1
jbe    11f6 <main+0xd6>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    11f6 <main+0xd6>
lea    0xe17(%rip),%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 = [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"Q2\0A\00"
@.str.6 = [4 x i8] c"Q3\0A\00"
@.str.7 = [4 x i8] c"Q4\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 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))
store i32 0, i32* %1
br label %54
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))
store i32 0, i32* %1
br label %54
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))
store i32 0, i32* %1
br label %54
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))
store i32 0, i32* %1
br label %54
30: ; preds = %25, %22
%31 = load double, double* %2
%32 = fcmp olt double %31, 0.000000e+00
br i1 %32, label %33, label %38
33: ; preds = %30
%34 = load double, double* %3
%35 = fcmp ogt 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))
store i32 0, i32* %1
br label %54
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))
store i32 0, i32* %1
br label %54
46: ; preds = %41, %38
%47 = load double, double* %2
%48 = fcmp ogt double %47, 0.000000e+00
br i1 %48, label %49, label %54
49: ; preds = %46
%50 = load double, double* %3
%51 = fcmp olt 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))
store i32 0, i32* %1
br label %54
54: ; preds = %10, %15, %20, %28, %36, %44, %52, %49, %46
%55 = load i32, i32* %1
ret i32 %55
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@str = [3 x i8] c"Q4\00"
@str.8 = [3 x i8] c"Q3\00"
@str.9 = [3 x i8] c"Q2\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 ([8 x i8], [8 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 %6, 0.000000e+00
%20 = select i1 %19, i1 %16, i1 false
br i1 %20, label %26, label %21
21: ; preds = %18
%22 = fcmp olt double %8, 0.000000e+00
%23 = select i1 %19, i1 %22, i1 false
br i1 %23, label %26, label %24
24: ; preds = %21
%25 = select i1 %15, i1 %22, 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
}