#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 checkSum(float, float);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
float sqrt(int);
int main() {
  float x, y, root;
  int ret, m, n, parm, parn;
  printf("\n x &y \n");
  scanf("%f%f", &x, &y);
  printf("\nm & n\n");
  scanf("%d%d", &m, &n);
  ret = checkSum(x, y);
  if (ret == 0)
    printf("\nx+y is integer\n");
  else
    printf("\nx+y is not integer\n");
  if ((x < m) && (m < y))
    printf("\nm belongs to (x,y)\n");
  else
    printf("\nm is not contained in (x,y)\n");
  if (m == (int)x)
    printf("\nm is equal to integer part of x\n");
  else
    printf("\nm is not equal to integer part of x\n");
  if (((int)x >= 3) && ((x - (int)x) < 0.3))
    printf("\n x has integer part atleast 3 and frac part less than 0.3\n");
  else
    printf("\n x > 3.3\n");
  parm = m % 2;
  parn = n % 2;
  if (parm == 1 && parn == 1)
    printf("\nm and n have same parity and are odd numbers\n");
  else if (parm == 1 && parn == 0)
    printf("\nm and n have different parity and m is odd,n is even\n");
  else if (parn == 1 && parm == 0)
    printf("\nm and n have different parity and n is odd,m is even\n");
  else
    printf("\nm and n have same parity and both are even\n");
  root = sqrt(m);
  if (0 == root - (int)root)
    printf("\nm is perfect square\n");
  else
    printf("\nm is not perfect square\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9a(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <checkSum@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    11c0 <main+0x80>
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
jmp    11cc <main+0x8c>
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0x18(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1203 <main+0xc3>
cvtsi2ssl -0x18(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1203 <main+0xc3>
lea    0xe50(%rip),%rdi
call   1040 <printf@plt>
jmp    120f <main+0xcf>
lea    0xe54(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
cvttss2si -0x8(%rbp),%ecx
cmp    %ecx,%eax
jne    1230 <main+0xf0>
lea    0xe56(%rip),%rdi
call   1040 <printf@plt>
jmp    123c <main+0xfc>
lea    0xe67(%rip),%rdi
call   1040 <printf@plt>
cvttss2si -0x8(%rbp),%eax
cmp    $0x3,%eax
jl     1283 <main+0x143>
movss  -0x8(%rbp),%xmm0
cvttss2si -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd98(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1283 <main+0x143>
lea    0xe4b(%rip),%rdi
call   1040 <printf@plt>
jmp    128f <main+0x14f>
lea    0xe76(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x24(%rbp)
cmpl   $0x1,-0x20(%rbp)
jne    12d0 <main+0x190>
cmpl   $0x1,-0x24(%rbp)
jne    12d0 <main+0x190>
lea    0xe45(%rip),%rdi
call   1040 <printf@plt>
jmp    1330 <main+0x1f0>
cmpl   $0x1,-0x20(%rbp)
jne    12f5 <main+0x1b5>
cmpl   $0x0,-0x24(%rbp)
jne    12f5 <main+0x1b5>
lea    0xe4f(%rip),%rdi
call   1040 <printf@plt>
jmp    132b <main+0x1eb>
cmpl   $0x1,-0x24(%rbp)
jne    131a <main+0x1da>
cmpl   $0x0,-0x20(%rbp)
jne    131a <main+0x1da>
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
jmp    1326 <main+0x1e6>
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
jmp    132b <main+0x1eb>
jmp    1330 <main+0x1f0>
mov    -0x18(%rbp),%edi
call   1060 <sqrt@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
cvttss2si -0x10(%rbp),%eax
cvtsi2ss %eax,%xmm0
subss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jne    1372 <main+0x232>
jp     1372 <main+0x232>
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
jmp    137e <main+0x23e>
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec7(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb1(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeab(%rip),%rdi
call   1040 <puts@plt>
lea    0xe92(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
call   1030 <checkSum@plt>
test   %eax,%eax
lea    0x103f(%rip),%rax
lea    0xe74(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x8(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
ucomiss %xmm0,%xmm1
lea    0x1002(%rip),%rdi
lea    0xe5f(%rip),%rax
cmovbe %rax,%rdi
ucomiss 0xc(%rsp),%xmm0
cmovbe %rax,%rdi
call   1040 <puts@plt>
cvttss2si 0xc(%rsp),%eax
cmp    %eax,0x8(%rsp)
lea    0xfb7(%rip),%rax
lea    0xe52(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
movss  0xc(%rsp),%xmm0
cvttss2si %xmm0,%eax
cmp    $0x3,%eax
jl     123e <main+0xfe>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdd1(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    123e <main+0xfe>
lea    0xf39(%rip),%rdi
jmp    1245 <main+0x105>
lea    0xe32(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
mov    0x14(%rsp),%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
add    %ecx,%edx
and    $0xfffffffe,%edx
sub    %edx,%ecx
cmp    $0x1,%eax
jne    127d <main+0x13d>
cmp    $0x1,%ecx
jne    127d <main+0x13d>
lea    0xecc(%rip),%rdi
jmp    12a6 <main+0x166>
cmp    $0x1,%eax
jne    128f <main+0x14f>
test   %ecx,%ecx
jne    128f <main+0x14f>
lea    0xe84(%rip),%rdi
jmp    12a6 <main+0x166>
xor    $0x1,%ecx
lea    0xe42(%rip),%rdx
lea    0xde1(%rip),%rdi
or     %eax,%ecx
cmove  %rdx,%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%edi
call   1060 <sqrt@plt>
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
lea    0xde1(%rip),%rax
lea    0xdf3(%rip),%rdi
cmovne %rax,%rdi
cmovp  %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"\0A x &y \0A\00"
@.str.1 = [5 x i8] c"%f%f\00"
@.str.2 = [8 x i8] c"\0Am & n\0A\00"
@.str.3 = [5 x i8] c"%d%d\00"
@.str.4 = [17 x i8] c"\0Ax+y is integer\0A\00"
@.str.5 = [21 x i8] c"\0Ax+y is not integer\0A\00"
@.str.6 = [21 x i8] c"\0Am belongs to (x,y)\0A\00"
@.str.7 = [30 x i8] c"\0Am is not contained in (x,y)\0A\00"
@.str.8 = [34 x i8] c"\0Am is equal to integer part of x\0A\00"
@.str.9 = [38 x i8] c"\0Am is not equal to integer part of x\0A\00"
@.str.10 = [60 x i8] c"\0A x has integer part atleast 3 and frac part less than 0.3\0A\00"
@.str.11 = [11 x i8] c"\0A x > 3.3\0A\00"
@.str.12 = [47 x i8] c"\0Am and n have same parity and are odd numbers\0A\00"
@.str.13 = [55 x i8] c"\0Am and n have different parity and m is odd,n is even\0A\00"
@.str.14 = [55 x i8] c"\0Am and n have different parity and n is odd,m is even\0A\00"
@.str.15 = [45 x i8] c"\0Am and n have same parity and both are even\0A\00"
@.str.16 = [22 x i8] c"\0Am is perfect square\0A\00"
@.str.17 = [26 x i8] c"\0Am is not perfect square\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3)
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32* %6, i32* %7)
%14 = load float, float* %2
%15 = load float, float* %3
%16 = call i32 @checkSum(float %14, float %15)
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %0
%20 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %23
21: ; preds = %0
%22 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
%24 = load float, float* %2
%25 = load i32, i32* %6
%26 = sitofp i32 %25 to float
%27 = fcmp olt float %24, %26
br i1 %27, label %28, label %35
28: ; preds = %23
%29 = load i32, i32* %6
%30 = sitofp i32 %29 to float
%31 = load float, float* %3
%32 = fcmp olt float %30, %31
br i1 %32, label %33, label %35
33: ; preds = %28
%34 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
br label %37
35: ; preds = %28, %23
%36 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
br label %37
37: ; preds = %35, %33
%38 = load i32, i32* %6
%39 = load float, float* %2
%40 = fptosi float %39 to i32
%41 = icmp eq i32 %38, %40
br i1 %41, label %42, label %44
42: ; preds = %37
%43 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
br label %46
44: ; preds = %37
%45 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0))
br label %46
46: ; preds = %44, %42
%47 = load float, float* %2
%48 = fptosi float %47 to i32
%49 = icmp sge i32 %48, 3
br i1 %49, label %50, label %60
50: ; preds = %46
%51 = load float, float* %2
%52 = load float, float* %2
%53 = fptosi float %52 to i32
%54 = sitofp i32 %53 to float
%55 = fsub float %51, %54
%56 = fpext float %55 to double
%57 = fcmp olt double %56, 3.000000e-01
br i1 %57, label %58, label %60
58: ; preds = %50
%59 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.10, i64 0, i64 0))
br label %62
60: ; preds = %50, %46
%61 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
br label %62
62: ; preds = %60, %58
%63 = load i32, i32* %6
%64 = srem i32 %63, 2
store i32 %64, i32* %8
%65 = load i32, i32* %7
%66 = srem i32 %65, 2
store i32 %66, i32* %9
%67 = load i32, i32* %8
%68 = icmp eq i32 %67, 1
br i1 %68, label %69, label %74
69: ; preds = %62
%70 = load i32, i32* %9
%71 = icmp eq i32 %70, 1
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.12, i64 0, i64 0))
br label %94
74: ; preds = %69, %62
%75 = load i32, i32* %8
%76 = icmp eq i32 %75, 1
br i1 %76, label %77, label %82
77: ; preds = %74
%78 = load i32, i32* %9
%79 = icmp eq i32 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %77
%81 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.13, i64 0, i64 0))
br label %93
82: ; preds = %77, %74
%83 = load i32, i32* %9
%84 = icmp eq i32 %83, 1
br i1 %84, label %85, label %90
85: ; preds = %82
%86 = load i32, i32* %8
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %85
%89 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0))
br label %92
90: ; preds = %85, %82
%91 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.15, i64 0, i64 0))
br label %92
92: ; preds = %90, %88
br label %93
93: ; preds = %92, %80
br label %94
94: ; preds = %93, %72
%95 = load i32, i32* %6
%96 = call float @sqrt(i32 %95)
store float %96, float* %4
%97 = load float, float* %4
%98 = load float, float* %4
%99 = fptosi float %98 to i32
%100 = sitofp i32 %99 to float
%101 = fsub float %97, %100
%102 = fcmp oeq float 0.000000e+00, %101
br i1 %102, label %103, label %105
103: ; preds = %94
%104 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0))
br label %107
105: ; preds = %94
%106 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.17, i64 0, i64 0))
br label %107
107: ; preds = %105, %103
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%f%f\00"
@.str.3 = [5 x i8] c"%d%d\00"
@str = [8 x i8] c"\0A x &y \00"
@str.18 = [7 x i8] c"\0Am & n\00"
@str.19 = [20 x i8] c"\0Ax+y is not integer\00"
@str.20 = [29 x i8] c"\0Am is not contained in (x,y)\00"
@str.21 = [37 x i8] c"\0Am is not equal to integer part of x\00"
@str.22 = [10 x i8] c"\0A x > 3.3\00"
@str.23 = [44 x i8] c"\0Am and n have same parity and both are even\00"
@str.24 = [25 x i8] c"\0Am is not perfect square\00"
@str.25 = [21 x i8] c"\0Am is perfect square\00"
@str.26 = [54 x i8] c"\0Am and n have different parity and n is odd,m is even\00"
@str.27 = [54 x i8] c"\0Am and n have different parity and m is odd,n is even\00"
@str.28 = [46 x i8] c"\0Am and n have same parity and are odd numbers\00"
@str.29 = [59 x i8] c"\0A x has integer part atleast 3 and frac part less than 0.3\00"
@str.30 = [33 x i8] c"\0Am is equal to integer part of x\00"
@str.31 = [20 x i8] c"\0Am belongs to (x,y)\00"
@str.32 = [16 x i8] c"\0Ax+y is integer\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = bitcast float* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.18, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32* %3, i32* %4)
%13 = load float, float* %1
%14 = load float, float* %2
%15 = call i32 @checkSum(float %13, float %14)
%16 = icmp eq i32 %15, 0
%17 = select i1 %16, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.32, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.19, i64 0, i64 0)
%18 = call i32 @puts(i8* dereferenceable(1) %17)
%19 = load float, float* %1
%20 = load i32, i32* %3
%21 = sitofp i32 %20 to float
%22 = fcmp olt float %19, %21
%23 = load float, float* %2
%24 = fcmp ogt float %23, %21
%25 = select i1 %22, i1 %24, i1 false
%26 = select i1 %25, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.31, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str.20, i64 0, i64 0)
%27 = call i32 @puts(i8* dereferenceable(1) %26)
%28 = load i32, i32* %3
%29 = load float, float* %1
%30 = fptosi float %29 to i32
%31 = icmp eq i32 %28, %30
%32 = select i1 %31, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.30, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @str.21, i64 0, i64 0)
%33 = call i32 @puts(i8* dereferenceable(1) %32)
%34 = load float, float* %1
%35 = fptosi float %34 to i32
%36 = icmp sgt i32 %35, 2
br i1 %36, label %37, label %42
37: ; preds = %0
%38 = sitofp i32 %35 to float
%39 = fsub float %34, %38
%40 = fpext float %39 to double
%41 = fcmp olt double %40, 3.000000e-01
br i1 %41, label %43, label %42
42: ; preds = %37, %0
br label %43
43: ; preds = %37, %42
%44 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.22, i64 0, i64 0), %42 ], [ getelementptr inbounds ([59 x i8], [59 x i8]* @str.29, i64 0, i64 0), %37 ]
%45 = call i32 @puts(i8* dereferenceable(1) %44)
%46 = load i32, i32* %3
%47 = srem i32 %46, 2
%48 = load i32, i32* %4
%49 = srem i32 %48, 2
%50 = icmp eq i32 %47, 1
%51 = icmp eq i32 %49, 1
%52 = select i1 %50, i1 %51, i1 false
br i1 %52, label %60, label %53
53: ; preds = %43
%54 = icmp eq i32 %49, 0
%55 = select i1 %50, i1 %54, i1 false
br i1 %55, label %60, label %56
56: ; preds = %53
%57 = icmp eq i32 %47, 0
%58 = select i1 %51, i1 %57, i1 false
%59 = select i1 %58, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @str.26, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @str.23, i64 0, i64 0)
br label %60
60: ; preds = %56, %53, %43
%61 = phi i8* [ getelementptr inbounds ([46 x i8], [46 x i8]* @str.28, i64 0, i64 0), %43 ], [ getelementptr inbounds ([54 x i8], [54 x i8]* @str.27, i64 0, i64 0), %53 ], [ %59, %56 ]
%62 = call i32 @puts(i8* dereferenceable(1) %61)
%63 = load i32, i32* %3
%64 = call float @sqrt(i32 %63)
%65 = fptosi float %64 to i32
%66 = sitofp i32 %65 to float
%67 = fsub float %64, %66
%68 = fcmp oeq float %67, 0.000000e+00
%69 = select i1 %68, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @str.25, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @str.24, i64 0, i64 0)
%70 = call i32 @puts(i8* dereferenceable(1) %69)
ret i32 0
}