#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void isSquareOutOfBounds(int squareSize, int maxMatrix, int minMatrix) {
  if (squareSize > maxMatrix || squareSize < minMatrix) {
    printf("Entered square size is: %d\n", squareSize);
    if (squareSize > maxMatrix)
      printf("Bigger than max possible value for this program, which is: %d\n",
             maxMatrix);
    else
      printf("Smaller than min possible value for this program, which is: %d\n",
             minMatrix);
    printf("Please try again, aborting the program..\n\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<isSquareOutOfBounds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1149 <isSquareOutOfBounds+0x29>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11a2 <isSquareOutOfBounds+0x82>
mov    -0x4(%rbp),%esi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    117c <isSquareOutOfBounds+0x5c>
mov    -0x8(%rbp),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118d <isSquareOutOfBounds+0x6d>
mov    -0xc(%rbp),%esi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSquareOutOfBounds>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
cmp    %esi,%edi
jg     1149 <isSquareOutOfBounds+0x19>
cmp    %r14d,%ebx
jl     1149 <isSquareOutOfBounds+0x19>
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %ebp,%ebx
cmovg  %ebp,%r14d
lea    0xeb6(%rip),%rax
lea    0xeee(%rip),%rdi
cmovg  %rax,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Entered square size is: %d\0A\00"
@.str.1 = [63 x i8] c"Bigger than max possible value for this program, which is: %d\0A\00"
@.str.2 = [64 x i8] c"Smaller than min possible value for this program, which is: %d\0A\00"
@.str.3 = [43 x i8] c"Please try again, aborting the program..\0A\0A\00"
define void @isSquareOutOfBounds(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp sgt i32 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %3
%11 = load i32, i32* %4
%12 = load i32, i32* %6
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %29
14: ; preds = %10, %3
%15 = load i32, i32* %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %14
%21 = load i32, i32* %5
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 %21)
br label %26
23: ; preds = %14
%24 = load i32, i32* %6
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0), i32 %24)
br label %26
26: ; preds = %23, %20
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%28 = call i32 @exit(i32 0)
unreachable
29: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Entered square size is: %d\0A\00"
@.str.1 = [63 x i8] c"Bigger than max possible value for this program, which is: %d\0A\00"
@.str.2 = [64 x i8] c"Smaller than min possible value for this program, which is: %d\0A\00"
@str = [42 x i8] c"Please try again, aborting the program..\0A\00"
define void @isSquareOutOfBounds(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = icmp slt i32 %0, %2
%6 = or i1 %4, %5
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0)
%9 = select i1 %4, i32 %1, i32 %2
%10 = select i1 %4, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %10, i32 %9)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%13 = tail call i32 @exit(i32 0)
unreachable
14: ; preds = %3
ret void
}