#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*/ getchar();
int /*<<< orphan*/ gotoxy(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, long *);
int /*<<< orphan*/ system(char *);
int main() {
  long int a, b;
  system("clear");
  gotoxy(10, 10);
  printf("Enter value that is smaller than 50:\n");
  gotoxy(10, 12);
  scanf("%ld", &a);
  system("clear");
  if (a < 50) {
    gotoxy(10, 10);
    printf("Value you entrered is: %ld", a);
    system("clear");
  } else {
    gotoxy(10, 10);
    printf("Value is wrong, try again. Enter value that is smaller than 50:\n");
    gotoxy(10, 12);
    scanf("%ld", &a);
    system("clear");
  }
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1030 <system@plt>
mov    $0xa,%esi
mov    %esi,%edi
call   1070 <gotoxy@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xa,%edi
mov    $0xc,%esi
call   1070 <gotoxy@plt>
lea    0xe82(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xe55(%rip),%rdi
call   1030 <system@plt>
cmpq   $0x32,-0x10(%rbp)
jge    11ea <main+0x9a>
mov    $0xa,%esi
mov    %esi,%edi
call   1070 <gotoxy@plt>
mov    -0x10(%rbp),%rsi
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe20(%rip),%rdi
call   1030 <system@plt>
jmp    122f <main+0xdf>
mov    $0xa,%esi
mov    %esi,%edi
call   1070 <gotoxy@plt>
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xa,%edi
mov    $0xc,%esi
call   1070 <gotoxy@plt>
lea    0xe03(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xdd6(%rip),%rdi
call   1030 <system@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xe94(%rip),%rbx
mov    %rbx,%rdi
call   1040 <system@plt>
mov    $0xa,%edi
mov    $0xa,%esi
call   1080 <gotoxy@plt>
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
mov    $0xc,%esi
call   1080 <gotoxy@plt>
lea    0xe78(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
mov    0x8(%rsp),%rbx
mov    $0xa,%edi
mov    $0xa,%esi
call   1080 <gotoxy@plt>
cmp    $0x31,%rbx
jg     11e6 <main+0x86>
mov    0x8(%rsp),%rsi
lea    0xe29(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1212 <main+0xb2>
lea    0xe34(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
mov    $0xc,%esi
call   1080 <gotoxy@plt>
lea    0xe15(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1070 <scanf@plt>
lea    0xde7(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [38 x i8] c"Enter value that is smaller than 50:\0A\00"
@.str.2 = [4 x i8] c"%ld\00"
@.str.3 = [27 x i8] c"Value you entrered is: %ld\00"
@.str.4 = [65 x i8] c"Value is wrong, try again. Enter value that is smaller than 50:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @gotoxy(i32 10, i32 10)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @gotoxy(i32 10, i32 12)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %2)
%9 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = load i64, i64* %2
%11 = icmp slt i64 %10, 50
br i1 %11, label %12, label %17
12: ; preds = %0
%13 = call i32 @gotoxy(i32 10, i32 10)
%14 = load i64, i64* %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i64 %14)
%16 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %23
17: ; preds = %0
%18 = call i32 @gotoxy(i32 10, i32 10)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.4, i64 0, i64 0))
%20 = call i32 @gotoxy(i32 10, i32 12)
%21 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %2)
%22 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %23
23: ; preds = %17, %12
%24 = call i32 (...) @getchar()
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.2 = [4 x i8] c"%ld\00"
@.str.3 = [27 x i8] c"Value you entrered is: %ld\00"
@str = [37 x i8] c"Enter value that is smaller than 50:\00"
@str.5 = [64 x i8] c"Value is wrong, try again. Enter value that is smaller than 50:\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @gotoxy(i32 10, i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @gotoxy(i32 10, i32 12)
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %1)
%8 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = load i64, i64* %1
%10 = icmp slt i64 %9, 50
%11 = call i32 @gotoxy(i32 10, i32 10)
br i1 %10, label %12, label %15
12: ; preds = %0
%13 = load i64, i64* %1
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i64 %13)
br label %19
15: ; preds = %0
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.5, i64 0, i64 0))
%17 = call i32 @gotoxy(i32 10, i32 12)
%18 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64* %1)
br label %19
19: ; preds = %15, %12
%20 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%21 = call i32 (...) @getchar()
ret i32 0
}