#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, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int x = 0, y = 0;
  (void)scanf(" ( %d , %d)", &x, &y);
  if (x == 0) {
    if (y == 0) {
      printf("(%d, %d) is the origin point\n", x, y);
      return 0;
    }
    printf("(%d, %d) is on the y-axis\n", x, y);
    return 0;
  }
  if (y == 0) {
    printf("(%d, %d) is on the x-axis\n", x, y);
    return 0;
  }
  if (y > 0) {
    if (x > 0) {
      printf("(%d, %d) is in quadrant I\n", x, y);
      return 0;
    }
    printf("(%d, %d) is in quadrant II\n", x, y);
    return 0;
  }
  if (x > 0) {
    printf("(%d, %d) is in quadrant IV\n", x, y);
    return 0;
  }
  printf("(%d, %d) is in quadrant III\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    11a1 <main+0x81>
cmpl   $0x0,-0xc(%rbp)
jne    1183 <main+0x63>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    125a <main+0x13a>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    125a <main+0x13a>
cmpl   $0x0,-0xc(%rbp)
jne    11c9 <main+0xa9>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    125a <main+0x13a>
cmpl   $0x0,-0xc(%rbp)
jle    1219 <main+0xf9>
cmpl   $0x0,-0x8(%rbp)
jle    11fb <main+0xdb>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    125a <main+0x13a>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    125a <main+0x13a>
cmpl   $0x0,-0x8(%rbp)
jle    1241 <main+0x121>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    125a <main+0x13a>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xec9(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
test   %esi,%esi
je     1162 <main+0x42>
test   %edx,%edx
je     1171 <main+0x51>
jle    117c <main+0x5c>
test   %esi,%esi
jle    1196 <main+0x76>
lea    0xf00(%rip),%rdi
jmp    11a6 <main+0x86>
test   %edx,%edx
je     1189 <main+0x69>
lea    0xebd(%rip),%rdi
xor    %esi,%esi
jmp    11a6 <main+0x86>
lea    0xecd(%rip),%rdi
xor    %edx,%edx
jmp    11a6 <main+0x86>
test   %esi,%esi
jle    119f <main+0x7f>
lea    0xf10(%rip),%rdi
jmp    11a6 <main+0x86>
lea    0xe7c(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
jmp    11a6 <main+0x86>
lea    0xede(%rip),%rdi
jmp    11a6 <main+0x86>
lea    0xf0d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c" ( %d , %d)\00"
@.str.1 = [30 x i8] c"(%d, %d) is the origin point\0A\00"
@.str.2 = [27 x i8] c"(%d, %d) is on the y-axis\0A\00"
@.str.3 = [27 x i8] c"(%d, %d) is on the x-axis\0A\00"
@.str.4 = [27 x i8] c"(%d, %d) is in quadrant I\0A\00"
@.str.5 = [28 x i8] c"(%d, %d) is in quadrant II\0A\00"
@.str.6 = [28 x i8] c"(%d, %d) is in quadrant IV\0A\00"
@.str.7 = [29 x i8] c"(%d, %d) is in quadrant III\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32 %12)
store i32 0, i32* %1
br label %50
14: ; preds = %7
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %15, i32 %16)
store i32 0, i32* %1
br label %50
18: ; preds = %0
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %22, i32 %23)
store i32 0, i32* %1
br label %50
25: ; preds = %18
%26 = load i32, i32* %3
%27 = icmp sgt i32 %26, 0
br i1 %27, label %28, label %39
28: ; preds = %25
%29 = load i32, i32* %2
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = load i32, i32* %2
%33 = load i32, i32* %3
%34 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 %32, i32 %33)
store i32 0, i32* %1
br label %50
35: ; preds = %28
%36 = load i32, i32* %2
%37 = load i32, i32* %3
%38 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %36, i32 %37)
store i32 0, i32* %1
br label %50
39: ; preds = %25
%40 = load i32, i32* %2
%41 = icmp sgt i32 %40, 0
br i1 %41, label %42, label %46
42: ; preds = %39
%43 = load i32, i32* %2
%44 = load i32, i32* %3
%45 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %43, i32 %44)
store i32 0, i32* %1
br label %50
46: ; preds = %39
%47 = load i32, i32* %2
%48 = load i32, i32* %3
%49 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 %47, i32 %48)
store i32 0, i32* %1
br label %50
50: ; preds = %46, %42, %35, %31, %21, %14, %10
%51 = load i32, i32* %1
ret i32 %51
}

LLVM IR (-O2):
@.str = [12 x i8] c" ( %d , %d)\00"
@.str.1 = [30 x i8] c"(%d, %d) is the origin point\0A\00"
@.str.2 = [27 x i8] c"(%d, %d) is on the y-axis\0A\00"
@.str.3 = [27 x i8] c"(%d, %d) is on the x-axis\0A\00"
@.str.4 = [27 x i8] c"(%d, %d) is in quadrant I\0A\00"
@.str.5 = [28 x i8] c"(%d, %d) is in quadrant II\0A\00"
@.str.6 = [28 x i8] c"(%d, %d) is in quadrant IV\0A\00"
@.str.7 = [29 x i8] c"(%d, %d) is in quadrant III\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 0
br i1 %7, label %10, label %15
10: ; preds = %0
br i1 %9, label %11, label %13
11: ; preds = %10
%12 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 0)
br label %31
13: ; preds = %10
%14 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 %8)
br label %31
15: ; preds = %0
br i1 %9, label %16, label %18
16: ; preds = %15
%17 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %6, i32 0)
br label %31
18: ; preds = %15
%19 = icmp sgt i32 %8, 0
%20 = icmp sgt i32 %6, 0
br i1 %19, label %21, label %26
21: ; preds = %18
br i1 %20, label %22, label %24
22: ; preds = %21
%23 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 %6, i32 %8)
br label %31
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %6, i32 %8)
br label %31
26: ; preds = %18
br i1 %20, label %27, label %29
27: ; preds = %26
%28 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %6, i32 %8)
br label %31
29: ; preds = %26
%30 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), i32 %6, i32 %8)
br label %31
31: ; preds = %29, %27, %24, %22, %16, %13, %11
ret i32 0
}