#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 x, y;
  scanf("%lf %lf", &x, &y);
  if (x > 0 && y > 0) {
    printf("Q1\n");
  } else if (x < 0 && y > 0) {
    printf("Q2\n");
  } else if (x < 0 && y < 0) {
    printf("Q3\n");
  } else if (x > 0 && y < 0) {
    printf("Q4\n");
  } else if (x == 0 && y == 0) {
    printf("Origem\n");
  } else if (x == 0 && y != 0) {
    printf("Eixo Y\n");
  } else if (x != 0 && y == 0) {
    printf("Eixo X\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
jbe    1178 <main+0x58>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1178 <main+0x58>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    12ed <main+0x1cd>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11a9 <main+0x89>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11a9 <main+0x89>
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
jmp    12e8 <main+0x1c8>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11d6 <main+0xb6>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11d6 <main+0xb6>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
jmp    12e3 <main+0x1c3>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1207 <main+0xe7>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1207 <main+0xe7>
lea    0xe17(%rip),%rdi
call   1030 <printf@plt>
jmp    12de <main+0x1be>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1248 <main+0x128>
jp     1248 <main+0x128>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1248 <main+0x128>
jp     1248 <main+0x128>
lea    0xdda(%rip),%rdi
call   1030 <printf@plt>
jmp    12d9 <main+0x1b9>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    128e <main+0x16e>
jp     128e <main+0x16e>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    127d <main+0x15d>
jp     127d <main+0x15d>
jmp    128e <main+0x16e>
lea    0xd9c(%rip),%rdi
call   1030 <printf@plt>
jmp    12d4 <main+0x1b4>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12ab <main+0x18b>
jp     12ab <main+0x18b>
jmp    12cf <main+0x1af>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12cf <main+0x1af>
jp     12cf <main+0x1af>
lea    0xd5e(%rip),%rdi
call   1030 <printf@plt>
jmp    12d4 <main+0x1b4>
jmp    12d9 <main+0x1b9>
jmp    12de <main+0x1be>
jmp    12e3 <main+0x1c3>
jmp    12e8 <main+0x1c8>
jmp    12ed <main+0x1cd>
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  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
movsd  0x8(%rsp),%xmm0
jbe    1162 <main+0x42>
ucomisd %xmm2,%xmm0
jbe    1162 <main+0x42>
lea    0xec9(%rip),%rdi
jmp    1205 <main+0xe5>
ucomisd %xmm1,%xmm2
jbe    117e <main+0x5e>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jbe    117e <main+0x5e>
lea    0xeaa(%rip),%rdi
jmp    1205 <main+0xe5>
xorpd  %xmm2,%xmm2
ucomisd %xmm1,%xmm2
jbe    1197 <main+0x77>
ucomisd %xmm0,%xmm2
jbe    1197 <main+0x77>
lea    0xe8b(%rip),%rdi
jmp    1205 <main+0xe5>
ucomisd %xmm2,%xmm1
jbe    11b0 <main+0x90>
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
jbe    11b0 <main+0x90>
lea    0xe6f(%rip),%rdi
jmp    1205 <main+0xe5>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    11cd <main+0xad>
jp     11cd <main+0xad>
ucomisd %xmm2,%xmm0
jne    11cd <main+0xad>
jp     11cd <main+0xad>
lea    0xe4b(%rip),%rdi
jmp    1205 <main+0xe5>
ucomisd %xmm2,%xmm1
jne    11ea <main+0xca>
jp     11ea <main+0xca>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    11e1 <main+0xc1>
jnp    11ea <main+0xca>
lea    0xe27(%rip),%rdi
jmp    1205 <main+0xe5>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    11f6 <main+0xd6>
jnp    120a <main+0xea>
ucomisd %xmm2,%xmm0
jne    120a <main+0xea>
jp     120a <main+0xea>
lea    0xe03(%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 = [4 x i8] c"Q1\0A\00"
@.str.2 = [4 x i8] c"Q2\0A\00"
@.str.3 = [4 x i8] c"Q3\0A\00"
@.str.4 = [4 x i8] c"Q4\0A\00"
@.str.5 = [8 x i8] c"Origem\0A\00"
@.str.6 = [8 x i8] c"Eixo Y\0A\00"
@.str.7 = [8 x i8] c"Eixo X\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 ogt double %5, 0.000000e+00
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load double, double* %3
%9 = fcmp ogt 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 %66
12: ; preds = %7, %0
%13 = load double, double* %2
%14 = fcmp olt double %13, 0.000000e+00
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load double, double* %3
%17 = fcmp ogt double %16, 0.000000e+00
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %65
20: ; preds = %15, %12
%21 = load double, double* %2
%22 = fcmp olt double %21, 0.000000e+00
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load double, double* %3
%25 = fcmp olt double %24, 0.000000e+00
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %64
28: ; preds = %23, %20
%29 = load double, double* %2
%30 = fcmp ogt double %29, 0.000000e+00
br i1 %30, label %31, label %36
31: ; preds = %28
%32 = load double, double* %3
%33 = fcmp olt double %32, 0.000000e+00
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %63
36: ; preds = %31, %28
%37 = load double, double* %2
%38 = fcmp oeq double %37, 0.000000e+00
br i1 %38, label %39, label %44
39: ; preds = %36
%40 = load double, double* %3
%41 = fcmp oeq double %40, 0.000000e+00
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %62
44: ; preds = %39, %36
%45 = load double, double* %2
%46 = fcmp oeq double %45, 0.000000e+00
br i1 %46, label %47, label %52
47: ; preds = %44
%48 = load double, double* %3
%49 = fcmp une double %48, 0.000000e+00
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %61
52: ; preds = %47, %44
%53 = load double, double* %2
%54 = fcmp une double %53, 0.000000e+00
br i1 %54, label %55, label %60
55: ; preds = %52
%56 = load double, double* %3
%57 = fcmp oeq double %56, 0.000000e+00
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
br label %60
60: ; preds = %58, %55, %52
br label %61
61: ; preds = %60, %50
br label %62
62: ; preds = %61, %42
br label %63
63: ; preds = %62, %34
br label %64
64: ; preds = %63, %26
br label %65
65: ; preds = %64, %18
br label %66
66: ; preds = %65, %10
ret i32 0
}

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