#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 && y == 0)
    printf("Origem\n");
  else if (y == 0)
    printf("Eixo X\n");
  else if (x == 0)
    printf("Eixo Y\n");
  else if (x > 0) {
    if (y > 0)
      printf("Q1\n");
    else
      printf("Q4\n");
  } else {
    if (y > 0)
      printf("Q2\n");
    else
      printf("Q3\n");
  }
}


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    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    125f <main+0x13f>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11ad <main+0x8d>
jp     11ad <main+0x8d>
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
jmp    125a <main+0x13a>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11d6 <main+0xb6>
jp     11d6 <main+0xb6>
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
jmp    1255 <main+0x135>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    121c <main+0xfc>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    120b <main+0xeb>
lea    0xe1f(%rip),%rdi
call   1030 <printf@plt>
jmp    1217 <main+0xf7>
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <main+0x130>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    123f <main+0x11f>
lea    0xdf3(%rip),%rdi
call   1030 <printf@plt>
jmp    124b <main+0x12b>
lea    0xde6(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <main+0x130>
jmp    1255 <main+0x135>
jmp    125a <main+0x13a>
jmp    125f <main+0x13f>
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),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
setnp  %al
sete   %cl
and    %al,%cl
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm2
setnp  %al
sete   %dl
and    %al,%dl
and    %dl,%cl
or     %cl,%dl
lea    0xeb5(%rip),%rax
lea    0xea7(%rip),%rsi
test   %cl,%cl
cmovne %rax,%rsi
lea    0xe93(%rip),%rdi
test   %dl,%dl
cmovne %rsi,%rdi
jne    11c5 <main+0xa5>
ucomisd %xmm2,%xmm0
jne    1191 <main+0x71>
jnp    11c5 <main+0xa5>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jbe    11af <main+0x8f>
ucomisd %xmm2,%xmm1
lea    0xe6b(%rip),%rax
lea    0xe61(%rip),%rdi
jmp    11c1 <main+0xa1>
ucomisd %xmm2,%xmm1
lea    0xe51(%rip),%rax
lea    0xe47(%rip),%rdi
cmova  %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 = [8 x i8] c"Origem\0A\00"
@.str.2 = [8 x i8] c"Eixo X\0A\00"
@.str.3 = [8 x i8] c"Eixo Y\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"Q2\0A\00"
@.str.7 = [4 x i8] c"Q3\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))
br label %44
12: ; preds = %7, %0
%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 %43
17: ; preds = %12
%18 = load double, double* %2
%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 %42
22: ; preds = %17
%23 = load double, double* %2
%24 = fcmp ogt double %23, 0.000000e+00
br i1 %24, label %25, label %33
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 %32
30: ; preds = %25
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
br label %41
33: ; preds = %22
%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.6, i64 0, i64 0))
br label %40
38: ; preds = %33
%39 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %40
40: ; preds = %38, %36
br label %41
41: ; preds = %40, %32
br label %42
42: ; preds = %41, %20
br label %43
43: ; preds = %42, %15
br label %44
44: ; preds = %43, %10
%45 = load i32, i32* %1
ret i32 %45
}

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