#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 rand();
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void main() {
  int m, n;
  srand(time(NULL));
  n = rand() % 100 + 1;
  do {
    scanf("%d", &m);
    if (m < n)
      printf("low\n");
    else if (n < m)
      printf("high\n");
  } while (m != n);
  printf("right\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
lea    0xe7c(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11aa <main+0x5a>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
jmp    11c7 <main+0x77>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11c2 <main+0x72>
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
jmp    11c7 <main+0x77>
jmp    11cc <main+0x7c>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    117d <main+0x2d>
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1070 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
mov    %eax,%ebp
sub    %ecx,%ebp
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x1,%ebx
lea    0xe64(%rip),%r14
lea    0x4(%rsp),%r15
lea    0xe66(%rip),%r12
lea    0xe5a(%rip),%r13
jmp    11cb <main+0x7b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1030 <puts@plt>
cmp    %ebx,0x4(%rsp)
je     11ea <main+0x9a>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %r12,%rdi
cmp    %ebp,%eax
jle    11c0 <main+0x70>
mov    %r13,%rdi
cmp    %eax,%ebx
jl     11c0 <main+0x70>
jmp    11c5 <main+0x75>
lea    0xe12(%rip),%rdi
call   1030 <puts@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"low\0A\00"
@.str.2 = [6 x i8] c"high\0A\00"
@.str.3 = [7 x i8] c"right\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 100
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
br label %8
8: ; preds = %23, %0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %22
15: ; preds = %8
%16 = load i32, i32* %2
%17 = load i32, i32* %1
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %15
br label %22
22: ; preds = %21, %13
br label %23
23: ; preds = %22
%24 = load i32, i32* %1
%25 = load i32, i32* %2
%26 = icmp ne i32 %24, %25
br i1 %26, label %8, label %27
27: ; preds = %23
%28 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [6 x i8] c"right\00"
@str.4 = [5 x i8] c"high\00"
@str.5 = [4 x i8] c"low\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 100
%7 = add nsw i32 %6, 1
br label %8
8: ; preds = %17, %0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, %6
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = icmp slt i32 %7, %10
br i1 %13, label %14, label %17
14: ; preds = %12, %8
%15 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @str.5, i64 0, i64 0), %8 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.4, i64 0, i64 0), %12 ]
%16 = call i32 @puts(i8* dereferenceable(1) %15)
br label %17
17: ; preds = %14, %12
%18 = load i32, i32* %1
%19 = icmp eq i32 %18, %7
br i1 %19, label %20, label %8
20: ; preds = %17
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}