#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(void) {
  float fXcor, fYcor;
  printf("\nEnter the coordinates\n");
  scanf("%g%g", &fXcor, &fYcor);
  if (0 == fXcor && 0 == fYcor) {
    printf("\n(%g,%g) is at origin\n", fXcor, fYcor);
  } else if (0 == fXcor) {
    printf("\n(%g,%g) is on Y-axis\n", fXcor, fYcor);
  } else if (0 == fYcor) {
    printf("\n(%g,%g) is on X-axis\n", fXcor, fYcor);
  } else if (fXcor > 0 && fYcor > 0) {
    printf("\n(%g,%g) is in Quadrant I\n", fXcor, fYcor);
  } else if (fXcor < 0 && fYcor > 0) {
    printf("\n(%g,%g) is in Quadrant II\n", fXcor, fYcor);
  } else if (fXcor < 0 && fYcor < 0) {
    printf("\n(%g,%g) is in Quadrant III\n", fXcor, fYcor);
  } else {
    printf("\n(%g,%g) is in Quadrant IV\n", fXcor, fYcor);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jne    119c <main+0x7c>
jp     119c <main+0x7c>
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    119c <main+0x7c>
jp     119c <main+0x7c>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe8d(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    130e <main+0x1ee>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jne    11d4 <main+0xb4>
jp     11d4 <main+0xb4>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe6c(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    1309 <main+0x1e9>
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    120c <main+0xec>
jp     120c <main+0xec>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe4b(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    1304 <main+0x1e4>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1253 <main+0x133>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1253 <main+0x133>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe1b(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    12ff <main+0x1df>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1296 <main+0x176>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1296 <main+0x176>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdf3(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    12fa <main+0x1da>
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    12d5 <main+0x1b5>
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    12d5 <main+0x1b5>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdd0(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    12f5 <main+0x1d5>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdc8(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    12fa <main+0x1da>
jmp    12ff <main+0x1df>
jmp    1304 <main+0x1e4>
jmp    1309 <main+0x1e9>
jmp    130e <main+0x1ee>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf82(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
movss  (%rsp),%xmm2
jne    1184 <main+0x54>
jp     1184 <main+0x54>
ucomiss %xmm1,%xmm2
jne    1184 <main+0x54>
jp     1184 <main+0x54>
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
lea    0xe86(%rip),%rdi
jmp    122a <main+0xfa>
ucomiss %xmm1,%xmm0
jne    11a2 <main+0x72>
jp     11a2 <main+0x72>
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
lea    0xe7f(%rip),%rdi
jmp    122a <main+0xfa>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm2
jne    11c0 <main+0x90>
jp     11c0 <main+0x90>
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
lea    0xe75(%rip),%rdi
jmp    122a <main+0xfa>
ucomiss %xmm1,%xmm0
jbe    11e1 <main+0xb1>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm2
jbe    11e1 <main+0xb1>
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
lea    0xe6b(%rip),%rdi
jmp    122a <main+0xfa>
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1202 <main+0xd2>
ucomiss %xmm1,%xmm2
jbe    1202 <main+0xd2>
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
lea    0xe65(%rip),%rdi
jmp    122a <main+0xfa>
ucomiss %xmm0,%xmm1
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
jbe    1223 <main+0xf3>
xorps  %xmm3,%xmm3
ucomiss %xmm2,%xmm3
jbe    1223 <main+0xf3>
lea    0xe60(%rip),%rdi
jmp    122a <main+0xfa>
lea    0xe74(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"\0AEnter the coordinates\0A\00"
@.str.1 = [5 x i8] c"%g%g\00"
@.str.2 = [23 x i8] c"\0A(%g,%g) is at origin\0A\00"
@.str.3 = [23 x i8] c"\0A(%g,%g) is on Y-axis\0A\00"
@.str.4 = [23 x i8] c"\0A(%g,%g) is on X-axis\0A\00"
@.str.5 = [27 x i8] c"\0A(%g,%g) is in Quadrant I\0A\00"
@.str.6 = [28 x i8] c"\0A(%g,%g) is in Quadrant II\0A\00"
@.str.7 = [29 x i8] c"\0A(%g,%g) is in Quadrant III\0A\00"
@.str.8 = [28 x i8] c"\0A(%g,%g) is in Quadrant IV\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3)
%6 = load float, float* %2
%7 = fcmp oeq float 0.000000e+00, %6
br i1 %7, label %8, label %17
8: ; preds = %0
%9 = load float, float* %3
%10 = fcmp oeq float 0.000000e+00, %9
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load float, float* %2
%13 = fpext float %12 to double
%14 = load float, float* %3
%15 = fpext float %14 to double
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %13, double %15)
br label %82
17: ; preds = %8, %0
%18 = load float, float* %2
%19 = fcmp oeq float 0.000000e+00, %18
br i1 %19, label %20, label %26
20: ; preds = %17
%21 = load float, float* %2
%22 = fpext float %21 to double
%23 = load float, float* %3
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %22, double %24)
br label %81
26: ; preds = %17
%27 = load float, float* %3
%28 = fcmp oeq float 0.000000e+00, %27
br i1 %28, label %29, label %35
29: ; preds = %26
%30 = load float, float* %2
%31 = fpext float %30 to double
%32 = load float, float* %3
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), double %31, double %33)
br label %80
35: ; preds = %26
%36 = load float, float* %2
%37 = fcmp ogt float %36, 0.000000e+00
br i1 %37, label %38, label %47
38: ; preds = %35
%39 = load float, float* %3
%40 = fcmp ogt float %39, 0.000000e+00
br i1 %40, label %41, label %47
41: ; preds = %38
%42 = load float, float* %2
%43 = fpext float %42 to double
%44 = load float, float* %3
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), double %43, double %45)
br label %79
47: ; preds = %38, %35
%48 = load float, float* %2
%49 = fcmp olt float %48, 0.000000e+00
br i1 %49, label %50, label %59
50: ; preds = %47
%51 = load float, float* %3
%52 = fcmp ogt float %51, 0.000000e+00
br i1 %52, label %53, label %59
53: ; preds = %50
%54 = load float, float* %2
%55 = fpext float %54 to double
%56 = load float, float* %3
%57 = fpext float %56 to double
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double %55, double %57)
br label %78
59: ; preds = %50, %47
%60 = load float, float* %2
%61 = fcmp olt float %60, 0.000000e+00
br i1 %61, label %62, label %71
62: ; preds = %59
%63 = load float, float* %3
%64 = fcmp olt float %63, 0.000000e+00
br i1 %64, label %65, label %71
65: ; preds = %62
%66 = load float, float* %2
%67 = fpext float %66 to double
%68 = load float, float* %3
%69 = fpext float %68 to double
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), double %67, double %69)
br label %77
71: ; preds = %62, %59
%72 = load float, float* %2
%73 = fpext float %72 to double
%74 = load float, float* %3
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), double %73, double %75)
br label %77
77: ; preds = %71, %65
br label %78
78: ; preds = %77, %53
br label %79
79: ; preds = %78, %41
br label %80
80: ; preds = %79, %29
br label %81
81: ; preds = %80, %20
br label %82
82: ; preds = %81, %11
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%g%g\00"
@.str.2 = [23 x i8] c"\0A(%g,%g) is at origin\0A\00"
@.str.3 = [23 x i8] c"\0A(%g,%g) is on Y-axis\0A\00"
@.str.4 = [23 x i8] c"\0A(%g,%g) is on X-axis\0A\00"
@.str.5 = [27 x i8] c"\0A(%g,%g) is in Quadrant I\0A\00"
@.str.6 = [28 x i8] c"\0A(%g,%g) is in Quadrant II\0A\00"
@.str.7 = [29 x i8] c"\0A(%g,%g) is in Quadrant III\0A\00"
@.str.8 = [28 x i8] c"\0A(%g,%g) is in Quadrant IV\0A\00"
@str = [23 x i8] c"\0AEnter the coordinates\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 ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2)
%7 = load float, float* %1
%8 = fcmp oeq float %7, 0.000000e+00
%9 = load float, float* %2
%10 = fcmp oeq float %9, 0.000000e+00
%11 = select i1 %8, i1 %10, i1 false
br i1 %11, label %12, label %16
12: ; preds = %0
%13 = fpext float %7 to double
%14 = fpext float %9 to double
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %13, double %14)
br label %50
16: ; preds = %0
br i1 %8, label %17, label %21
17: ; preds = %16
%18 = fpext float %7 to double
%19 = fpext float %9 to double
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %18, double %19)
br label %50
21: ; preds = %16
br i1 %10, label %22, label %26
22: ; preds = %21
%23 = fpext float %7 to double
%24 = fpext float %9 to double
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), double %23, double %24)
br label %50
26: ; preds = %21
%27 = fcmp ogt float %7, 0.000000e+00
%28 = fcmp ogt float %9, 0.000000e+00
%29 = select i1 %27, i1 %28, i1 false
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = fpext float %7 to double
%32 = fpext float %9 to double
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), double %31, double %32)
br label %50
34: ; preds = %26
%35 = fcmp olt float %7, 0.000000e+00
%36 = select i1 %35, i1 %28, i1 false
br i1 %36, label %37, label %41
37: ; preds = %34
%38 = fpext float %7 to double
%39 = fpext float %9 to double
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double %38, double %39)
br label %50
41: ; preds = %34
%42 = fcmp olt float %9, 0.000000e+00
%43 = select i1 %35, i1 %42, i1 false
%44 = fpext float %7 to double
%45 = fpext float %9 to double
br i1 %43, label %46, label %48
46: ; preds = %41
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0), double %44, double %45)
br label %50
48: ; preds = %41
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), double %44, double %45)
br label %50
50: ; preds = %17, %30, %46, %48, %37, %22, %12
ret i32 0
}