#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*/ endwin();
int getRange();
int getUsSetpoint();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ printBanner();
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ run(int, int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ waitExit();
int main() {
  int usSetpoint, usRange;
  initscr();
  printBanner();
  sleep(1);
  usSetpoint = getUsSetpoint();
  usRange = getRange();
  if (usRange < usSetpoint) {
    printw("Ok.\n\n\r");
    run(usSetpoint, usRange);
  } else {
    printw("You can not setup this value\n\r");
  }
  waitExit();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <printBanner@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
mov    $0x0,%al
call   1080 <getUsSetpoint@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1070 <getRange@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11f3 <main+0x63>
lea    0xe22(%rip),%rdi
call   1090 <printw@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <run@plt>
jmp    11ff <main+0x6f>
lea    0xe0d(%rip),%rdi
call   1090 <printw@plt>
mov    $0x0,%al
call   1060 <waitExit@plt>
mov    $0x0,%al
call   10a0 <endwin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <printBanner@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
xor    %eax,%eax
call   1080 <getUsSetpoint@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <getRange@plt>
cmp    %ebx,%eax
jge    11d8 <main+0x48>
mov    %eax,%ebp
lea    0xe38(%rip),%rdi
call   1090 <printw@plt>
mov    %ebx,%edi
mov    %ebp,%esi
call   1040 <run@plt>
jmp    11e4 <main+0x54>
lea    0xe28(%rip),%rdi
call   1090 <printw@plt>
xor    %eax,%eax
call   1060 <waitExit@plt>
xor    %eax,%eax
call   10a0 <endwin@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Ok.\0A\0A\0D\00"
@.str.1 = [31 x i8] c"You can not setup this value\0A\0D\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @initscr()
%5 = call i32 (...) @printBanner()
%6 = call i32 @sleep(i32 1)
%7 = call i32 (...) @getUsSetpoint()
store i32 %7, i32* %2
%8 = call i32 (...) @getRange()
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %0
%13 = call i32 @printw(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = call i32 @run(i32 %14, i32 %15)
br label %19
17: ; preds = %0
%18 = call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %12
%20 = call i32 (...) @waitExit()
%21 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Ok.\0A\0A\0D\00"
@.str.1 = [31 x i8] c"You can not setup this value\0A\0D\00"
define i32 @main() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @printBanner()
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 (...) @getUsSetpoint()
%5 = tail call i32 (...) @getRange()
%6 = icmp slt i32 %5, %4
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = tail call i32 @printw(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @run(i32 %4, i32 %5)
br label %12
10: ; preds = %0
%11 = tail call i32 @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
%13 = tail call i32 (...) @waitExit()
%14 = tail call i32 (...) @endwin()
ret i32 0
}