#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("Vnesi koordinati \n");
  scanf("%f %f", &x, &y);
  if (x > 0)
    if (y > 0)
      printf("I kvadrant.\n");
    else
      printf("IV kvadrant.\n");
  else if (y > 0)
    printf("II kvadrant.\n");
  else
    printf("III kvadrant.\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    0xed1(%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    1193 <main+0x73>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1182 <main+0x62>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    118e <main+0x6e>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    11c6 <main+0xa6>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    11b5 <main+0x95>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
jmp    11c1 <main+0xa1>
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
jmp    11c6 <main+0xa6>
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  (%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
lea    0xec7(%rip),%rax
lea    0xecc(%rip),%rcx
cmova  %rax,%rcx
lea    0xeb4(%rip),%rax
lea    0xeac(%rip),%rdi
cmova  %rax,%rdi
movss  0x4(%rsp),%xmm0
ucomiss %xmm1,%xmm0
cmova  %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Vnesi koordinati \0A\00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [13 x i8] c"I kvadrant.\0A\00"
@.str.3 = [14 x i8] c"IV kvadrant.\0A\00"
@.str.4 = [14 x i8] c"II kvadrant.\0A\00"
@.str.5 = [15 x i8] c"III kvadrant.\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 ([19 x i8], [19 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 %16
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 %15
13: ; preds = %8
%14 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
br label %24
16: ; preds = %0
%17 = load float, float* %3
%18 = fcmp ogt float %17, 0.000000e+00
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %23
21: ; preds = %16
%22 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
br label %24
24: ; preds = %23, %15
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%f %f\00"
@str = [18 x i8] c"Vnesi koordinati \00"
@str.6 = [14 x i8] c"III kvadrant.\00"
@str.7 = [13 x i8] c"II kvadrant.\00"
@str.8 = [13 x i8] c"IV kvadrant.\00"
@str.9 = [12 x i8] c"I kvadrant.\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 ([18 x i8], [18 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
%9 = load float, float* %2
%10 = fcmp ogt float %9, 0.000000e+00
%11 = select i1 %10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.8, i64 0, i64 0)
%12 = select i1 %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.6, i64 0, i64 0)
%13 = select i1 %8, i8* %11, i8* %12
%14 = call i32 @puts(i8* dereferenceable(1) %13)
ret i32 0
}