#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 *, float *, float *);
int main() {
  float x, y;
  printf("Enter coordinates \n");
  scanf("%f %f", &x, &y);
  if (x > 0)
    if (y > 0)
      printf("I quadrant.\n");
    else if (y < 0)
      printf("IV quadrant.\n");
    else
      printf("Positive X axis.\n");
  else if (x < 0)
    if (y > 0)
      printf("II quadrant.\n");
    else if (y < 0)
      printf("III quadrant.\n");
    else
      printf("Negative X axis.\n");
  else if (y > 0)
    printf("Positive Y axis.\n");
  else if (y < 0)
    printf("Negative Y oska.\n");
  else
    printf("Origin.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    11b6 <main+0x96>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1182 <main+0x62>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    11b1 <main+0x91>
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    11a0 <main+0x80>
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
jmp    11ac <main+0x8c>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
jmp    11b1 <main+0x91>
jmp    1274 <main+0x154>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1219 <main+0xf9>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    11e5 <main+0xc5>
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
jmp    1214 <main+0xf4>
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1203 <main+0xe3>
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
jmp    120f <main+0xef>
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
jmp    1214 <main+0xf4>
jmp    126f <main+0x14f>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    123b <main+0x11b>
lea    0xe2a(%rip),%rdi
call   1030 <printf@plt>
jmp    126a <main+0x14a>
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1259 <main+0x139>
lea    0xe1e(%rip),%rdi
call   1030 <printf@plt>
jmp    1265 <main+0x145>
lea    0xe1f(%rip),%rdi
call   1030 <printf@plt>
jmp    126a <main+0x14a>
jmp    126f <main+0x14f>
jmp    1274 <main+0x154>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jbe    1162 <main+0x42>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    117d <main+0x5d>
lea    0xef6(%rip),%rdi
jmp    11c9 <main+0xa9>
ucomiss %xmm1,%xmm0
movss  (%rsp),%xmm0
xorps  %xmm1,%xmm1
jbe    1193 <main+0x73>
ucomiss %xmm1,%xmm0
jbe    11a1 <main+0x81>
lea    0xeda(%rip),%rdi
jmp    11c9 <main+0xa9>
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
lea    0xee9(%rip),%rax
lea    0xed1(%rip),%rdi
jmp    11c5 <main+0xa5>
ucomiss %xmm1,%xmm0
jbe    11b4 <main+0x94>
lea    0xe93(%rip),%rdi
jmp    11c9 <main+0xa9>
ucomiss %xmm0,%xmm1
lea    0xea9(%rip),%rax
lea    0xe91(%rip),%rdi
jmp    11c5 <main+0xa5>
ucomiss %xmm0,%xmm1
lea    0xe63(%rip),%rax
lea    0xe54(%rip),%rdi
cmova  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter coordinates \0A\00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [13 x i8] c"I quadrant.\0A\00"
@.str.3 = [14 x i8] c"IV quadrant.\0A\00"
@.str.4 = [18 x i8] c"Positive X axis.\0A\00"
@.str.5 = [14 x i8] c"II quadrant.\0A\00"
@.str.6 = [15 x i8] c"III quadrant.\0A\00"
@.str.7 = [18 x i8] c"Negative X axis.\0A\00"
@.str.8 = [18 x i8] c"Positive Y axis.\0A\00"
@.str.9 = [18 x i8] c"Negative Y oska.\0A\00"
@.str.10 = [9 x i8] c"Origin.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3)
%6 = load float, float* %2
%7 = fcmp ogt float %6, 0.000000e+00
br i1 %7, label %8, label %22
8: ; preds = %0
%9 = load float, float* %3
%10 = fcmp ogt float %9, 0.000000e+00
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %21
13: ; preds = %8
%14 = load float, float* %3
%15 = fcmp olt float %14, 0.000000e+00
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %20
18: ; preds = %13
%19 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
br label %21
21: ; preds = %20, %11
br label %54
22: ; preds = %0
%23 = load float, float* %2
%24 = fcmp olt float %23, 0.000000e+00
br i1 %24, label %25, label %39
25: ; preds = %22
%26 = load float, float* %3
%27 = fcmp ogt float %26, 0.000000e+00
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
br label %38
30: ; preds = %25
%31 = load float, float* %3
%32 = fcmp olt float %31, 0.000000e+00
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %37
35: ; preds = %30
%36 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
br label %37
37: ; preds = %35, %33
br label %38
38: ; preds = %37, %28
br label %53
39: ; preds = %22
%40 = load float, float* %3
%41 = fcmp ogt float %40, 0.000000e+00
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
br label %52
44: ; preds = %39
%45 = load float, float* %3
%46 = fcmp olt float %45, 0.000000e+00
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %51
49: ; preds = %44
%50 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
br label %51
51: ; preds = %49, %47
br label %52
52: ; preds = %51, %42
br label %53
53: ; preds = %52, %38
br label %54
54: ; preds = %53, %21
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%f %f\00"
@str = [19 x i8] c"Enter coordinates \00"
@str.11 = [8 x i8] c"Origin.\00"
@str.12 = [17 x i8] c"Negative Y oska.\00"
@str.13 = [17 x i8] c"Positive Y axis.\00"
@str.14 = [17 x i8] c"Negative X axis.\00"
@str.15 = [14 x i8] c"III quadrant.\00"
@str.16 = [13 x i8] c"II quadrant.\00"
@str.17 = [17 x i8] c"Positive X axis.\00"
@str.18 = [13 x i8] c"IV quadrant.\00"
@str.19 = [12 x i8] c"I quadrant.\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2)
%7 = load float, float* %1
%8 = fcmp ogt float %7, 0.000000e+00
br i1 %8, label %9, label %15
9: ; preds = %0
%10 = load float, float* %2
%11 = fcmp ogt float %10, 0.000000e+00
br i1 %11, label %27, label %12
12: ; preds = %9
%13 = fcmp olt float %10, 0.000000e+00
%14 = select i1 %13, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.18, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.17, i64 0, i64 0)
br label %27
15: ; preds = %0
%16 = fcmp olt float %7, 0.000000e+00
%17 = load float, float* %2
%18 = fcmp ogt float %17, 0.000000e+00
br i1 %16, label %19, label %23
19: ; preds = %15
br i1 %18, label %27, label %20
20: ; preds = %19
%21 = fcmp olt float %17, 0.000000e+00
%22 = select i1 %21, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.15, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.14, i64 0, i64 0)
br label %27
23: ; preds = %15
br i1 %18, label %27, label %24
24: ; preds = %23
%25 = fcmp olt float %17, 0.000000e+00
%26 = select i1 %25, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.12, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.11, i64 0, i64 0)
br label %27
27: ; preds = %24, %23, %20, %19, %12, %9
%28 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.19, i64 0, i64 0), %9 ], [ %14, %12 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @str.16, i64 0, i64 0), %19 ], [ %22, %20 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.13, i64 0, i64 0), %23 ], [ %26, %24 ]
%29 = call i32 @puts(i8* dereferenceable(1) %28)
ret i32 0
}