#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 const, int const, int, char *);
int setIntInbound(const int max, const int min, const int val, const int option,
                  const int isShowErr) {
  int tmp = val;
  if ((max < val) && ((option & 0x1) == 0)) {
    tmp = max;
    if (isShowErr == 1) {
      printf("Error in setDoubleInbound Val is greater than MAX : %d > %d , "
             "ln:%d, file:%s\n",
             val, max, 513,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/Chalearm/MachineLearning-/refs/heads/"
             "master/mProject/library_jui/dataStruct/src/basicVarArea.c");
    } else {
    }
  } else if ((min > val) && ((option & 0x2) == 0)) {
    tmp = min;
    if (isShowErr == 1) {
      printf("Error in setDoubleInbound Val is leaster than Min : %d < %d , "
             "ln:%d, file:%s\n",
             val, max, 525,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/Chalearm/MachineLearning-/refs/heads/"
             "master/mProject/library_jui/dataStruct/src/basicVarArea.c");
    } else {
    }
  } else {
  }
  return tmp;
}


x86 assembly (clang, -O0):
<setIntInbound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1186 <setIntInbound+0x76>
mov    -0x10(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1186 <setIntInbound+0x76>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    117c <setIntInbound+0x6c>
mov    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xe9a(%rip),%rdi
mov    $0x201,%ecx
lea    0xedc(%rip),%r8
call   1030 <printf@plt>
jmp    1181 <setIntInbound+0x71>
jmp    1181 <setIntInbound+0x71>
jmp    11e8 <setIntInbound+0xd8>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11de <setIntInbound+0xce>
mov    -0x10(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
jne    11de <setIntInbound+0xce>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    11d4 <setIntInbound+0xc4>
mov    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xf49(%rip),%rdi
mov    $0x20d,%ecx
lea    0xe84(%rip),%r8
call   1030 <printf@plt>
jmp    11d9 <setIntInbound+0xc9>
jmp    11d9 <setIntInbound+0xc9>
jmp    11e3 <setIntInbound+0xd3>
jmp    11e3 <setIntInbound+0xd3>
jmp    11e8 <setIntInbound+0xd8>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setIntInbound>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
cmp    %edx,%edi
jge    1146 <setIntInbound+0x36>
mov    %ecx,%eax
and    $0x1,%eax
jne    1146 <setIntInbound+0x36>
cmp    $0x1,%r8d
jne    1177 <setIntInbound+0x67>
lea    0xed1(%rip),%rdi
lea    0xf18(%rip),%r8
mov    %edx,%esi
mov    %ebx,%edx
mov    $0x201,%ecx
call   1030 <printf@plt>
jmp    1177 <setIntInbound+0x67>
cmp    %edx,%ebp
jle    1175 <setIntInbound+0x65>
and    $0x2,%ecx
jne    1175 <setIntInbound+0x65>
cmp    $0x1,%r8d
jne    1171 <setIntInbound+0x61>
lea    0xfab(%rip),%rdi
lea    0xeeb(%rip),%r8
mov    %edx,%esi
mov    %ebx,%edx
mov    $0x20d,%ecx
call   1030 <printf@plt>
mov    %ebp,%ebx
jmp    1177 <setIntInbound+0x67>
mov    %edx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [78 x i8] c"Error in setDoubleInbound Val is greater than MAX : %d > %d , ln:%d, file:%s\0A\00"
@.str.1 = [185 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chalearm/MachineLearning-/refs/heads/master/mProject/library_jui/dataStruct/src/basicVarArea.c\00"
@.str.2 = [78 x i8] c"Error in setDoubleInbound Val is leaster than Min : %d < %d , ln:%d, file:%s\0A\00"
define i32 @setIntInbound(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %8
store i32 %12, i32* %11
%13 = load i32, i32* %6
%14 = load i32, i32* %8
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %30
16: ; preds = %5
%17 = load i32, i32* %9
%18 = and i32 %17, 1
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %30
20: ; preds = %16
%21 = load i32, i32* %6
store i32 %21, i32* %11
%22 = load i32, i32* %10
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i32, i32* %8
%26 = load i32, i32* %6
%27 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %26, i32 513, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %29
28: ; preds = %20
br label %29
29: ; preds = %28, %24
br label %50
30: ; preds = %16, %5
%31 = load i32, i32* %7
%32 = load i32, i32* %8
%33 = icmp sgt i32 %31, %32
br i1 %33, label %34, label %48
34: ; preds = %30
%35 = load i32, i32* %9
%36 = and i32 %35, 2
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %48
38: ; preds = %34
%39 = load i32, i32* %7
store i32 %39, i32* %11
%40 = load i32, i32* %10
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %46
42: ; preds = %38
%43 = load i32, i32* %8
%44 = load i32, i32* %6
%45 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0), i32 %43, i32 %44, i32 525, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %47
46: ; preds = %38
br label %47
47: ; preds = %46, %42
br label %49
48: ; preds = %34, %30
br label %49
49: ; preds = %48, %47
br label %50
50: ; preds = %49, %29
%51 = load i32, i32* %11
ret i32 %51
}

LLVM IR (-O2):
@.str = [78 x i8] c"Error in setDoubleInbound Val is greater than MAX : %d > %d , ln:%d, file:%s\0A\00"
@.str.1 = [185 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chalearm/MachineLearning-/refs/heads/master/mProject/library_jui/dataStruct/src/basicVarArea.c\00"
@.str.2 = [78 x i8] c"Error in setDoubleInbound Val is leaster than Min : %d < %d , ln:%d, file:%s\0A\00"
define i32 @setIntInbound(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp slt i32 %0, %2
%7 = and i32 %3, 1
%8 = icmp eq i32 %7, 0
%9 = and i1 %6, %8
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = icmp eq i32 %4, 1
br i1 %11, label %12, label %23
12: ; preds = %10
%13 = tail call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0, i32 513, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %23
14: ; preds = %5
%15 = icmp sgt i32 %1, %2
%16 = and i32 %3, 2
%17 = icmp eq i32 %16, 0
%18 = and i1 %15, %17
br i1 %18, label %19, label %23
19: ; preds = %14
%20 = icmp eq i32 %4, 1
br i1 %20, label %21, label %23
21: ; preds = %19
%22 = tail call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32 %0, i32 525, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %19, %21, %14, %12, %10
%24 = phi i32 [ %0, %12 ], [ %0, %10 ], [ %1, %21 ], [ %1, %19 ], [ %2, %14 ]
ret i32 %24
}