#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 *, int *, int *);
int main() {
  int x, y;
  scanf("%d%d", &x, &y);
  if (x > 0) {
    if (y > 0) {
      printf("primeiro\n");
    } else if (y < 0) {
      printf("quarto\n");
    } else {
      printf("eixo x\n");
    }
  } else if (x < 0) {
    if (y > 0) {
      printf("segundo\n");
    } else if (y < 0) {
      printf("terceiro\n");
    } else {
      printf("eixo x\n");
    }
  } else {
    if (y > 0 || y < 0) {
      printf("eixo y\n");
    } else {
      printf("origem\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1199 <main+0x79>
cmpl   $0x0,-0xc(%rbp)
jle    1168 <main+0x48>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
jmp    1194 <main+0x74>
cmpl   $0x0,-0xc(%rbp)
jge    1183 <main+0x63>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    118f <main+0x6f>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
jmp    1194 <main+0x74>
jmp    122a <main+0x10a>
cmpl   $0x0,-0x8(%rbp)
jge    11ef <main+0xcf>
cmpl   $0x0,-0xc(%rbp)
jle    11be <main+0x9e>
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
jmp    11ea <main+0xca>
cmpl   $0x0,-0xc(%rbp)
jge    11d9 <main+0xb9>
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
jmp    11e5 <main+0xc5>
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
jmp    11ea <main+0xca>
jmp    1225 <main+0x105>
cmpl   $0x0,-0xc(%rbp)
jg     1203 <main+0xe3>
cmpl   $0x0,-0xc(%rbp)
jge    1214 <main+0xf4>
lea    0xe28(%rip),%rdi
call   1030 <printf@plt>
jmp    1220 <main+0x100>
lea    0xe1f(%rip),%rdi
call   1030 <printf@plt>
jmp    1225 <main+0x105>
jmp    122a <main+0x10a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    114b <main+0x2b>
cmpl   $0x0,(%rsp)
jle    1162 <main+0x42>
lea    0xee9(%rip),%rdi
jmp    1174 <main+0x54>
mov    (%rsp),%eax
js     117d <main+0x5d>
test   %eax,%eax
lea    0xeac(%rip),%rax
lea    0xeac(%rip),%rdi
jmp    1170 <main+0x50>
lea    0xebb(%rip),%rax
lea    0xebb(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
test   %eax,%eax
jle    118a <main+0x6a>
lea    0xe94(%rip),%rdi
jmp    1174 <main+0x54>
lea    0xe93(%rip),%rax
lea    0xe7b(%rip),%rdi
jmp    1170 <main+0x50>

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [10 x i8] c"primeiro\0A\00"
@.str.2 = [8 x i8] c"quarto\0A\00"
@.str.3 = [8 x i8] c"eixo x\0A\00"
@.str.4 = [9 x i8] c"segundo\0A\00"
@.str.5 = [10 x i8] c"terceiro\0A\00"
@.str.6 = [8 x i8] c"eixo y\0A\00"
@.str.7 = [8 x i8] c"origem\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %20
12: ; preds = %7
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 0
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 ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
br label %20
20: ; preds = %19, %10
br label %50
21: ; preds = %0
%22 = load i32, i32* %2
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %38
24: ; preds = %21
%25 = load i32, i32* %3
%26 = icmp sgt i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
br label %37
29: ; preds = %24
%30 = load i32, i32* %3
%31 = icmp slt i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %36
34: ; preds = %29
%35 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %34, %32
br label %37
37: ; preds = %36, %27
br label %49
38: ; preds = %21
%39 = load i32, i32* %3
%40 = icmp sgt i32 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %38
%42 = load i32, i32* %3
%43 = icmp slt i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41, %38
%45 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %48
46: ; preds = %41
%47 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
br label %48
48: ; preds = %46, %44
br label %49
49: ; preds = %48, %37
br label %50
50: ; preds = %49, %20
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@str = [7 x i8] c"origem\00"
@str.8 = [7 x i8] c"eixo y\00"
@str.10 = [9 x i8] c"terceiro\00"
@str.11 = [8 x i8] c"segundo\00"
@str.12 = [7 x i8] c"eixo x\00"
@str.13 = [7 x i8] c"quarto\00"
@str.14 = [9 x i8] c"primeiro\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
br i1 %10, label %25, label %11
11: ; preds = %8
%12 = icmp eq i32 %9, 0
%13 = select i1 %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.12, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.13, i64 0, i64 0)
br label %25
14: ; preds = %0
%15 = icmp slt i32 %6, 0
%16 = load i32, i32* %2
br i1 %15, label %17, label %22
17: ; preds = %14
%18 = icmp sgt i32 %16, 0
br i1 %18, label %25, label %19
19: ; preds = %17
%20 = icmp eq i32 %16, 0
%21 = select i1 %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.12, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.10, i64 0, i64 0)
br label %25
22: ; preds = %14
%23 = icmp eq i32 %16, 0
%24 = select i1 %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0)
br label %25
25: ; preds = %22, %19, %17, %11, %8
%26 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @str.14, i64 0, i64 0), %8 ], [ %13, %11 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.11, i64 0, i64 0), %17 ], [ %21, %19 ], [ %24, %22 ]
%27 = call i32 @puts(i8* dereferenceable(1) %26)
ret i32 0
}