#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;
  printf("Enter values of co-ordinates:");
  scanf("%d %d", &x, &y);
  if ((x == 0) && (y == 0)) {
    printf("Point is on Origin\n");
  } else if ((x == 0) && (y != 0)) {
    printf("Point is on Y axis\n");
  } else
    printf("Point is on X axis\n");
}


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    0xedc(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1174 <main+0x54>
cmpl   $0x0,-0xc(%rbp)
jne    1174 <main+0x54>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <main+0x8a>
cmpl   $0x0,-0x8(%rbp)
jne    1199 <main+0x79>
cmpl   $0x0,-0xc(%rbp)
je     1199 <main+0x79>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    11a5 <main+0x85>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <main+0x8a>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    (%rsp),%eax
test   %eax,%eax
lea    0xeda(%rip),%rcx
lea    0xec0(%rip),%rdx
cmove  %rdx,%rcx
mov    0x4(%rsp),%esi
test   %esi,%esi
cmovne %rdx,%rcx
lea    0xed1(%rip),%rdi
or     %eax,%esi
cmovne %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Enter values of co-ordinates:\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [20 x i8] c"Point is on Origin\0A\00"
@.str.3 = [20 x i8] c"Point is on Y axis\0A\00"
@.str.4 = [20 x i8] c"Point is on X axis\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 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), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %0
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %24
13: ; preds = %8, %0
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load i32, i32* %3
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %23
21: ; preds = %16, %13
%22 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
br label %24
24: ; preds = %23, %11
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
@.str = [30 x i8] c"Enter values of co-ordinates:\00"
@.str.1 = [6 x i8] c"%d %d\00"
@str = [19 x i8] c"Point is on X axis\00"
@str.5 = [19 x i8] c"Point is on Y axis\00"
@str.6 = [19 x i8] c"Point is on Origin\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 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), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 0
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 0
%11 = select i1 %8, i1 %10, i1 false
%12 = icmp ne i32 %9, 0
%13 = select i1 %8, i1 %12, i1 false
%14 = select i1 %13, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0)
%15 = select i1 %11, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.6, i64 0, i64 0), i8* %14
%16 = call i32 @puts(i8* dereferenceable(1) %15)
ret i32 0
}