#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*/ getch();
int /*<<< orphan*/ gotoxy(int, int);
int /*<<< orphan*/ printf(char *, ...);
void load() {
  int row, col, r, c, q;
  gotoxy(36, 14);
  printf("loading...");
  gotoxy(30, 15);
  for (r = 1; r <= 20; r++) {
    for (q = 0; q <= 100000000; q++)
      ;
    printf("%c", 177);
  }
  getch();
}


x86 assembly (clang, -O0):
<load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x24,%edi
mov    $0xe,%esi
call   1050 <gotoxy@plt>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1e,%edi
mov    $0xf,%esi
call   1050 <gotoxy@plt>
movl   $0x1,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jg     11bd <load+0x8d>
movl   $0x0,-0x14(%rbp)
cmpl   $0x5f5e100,-0x14(%rbp)
jg     119c <load+0x6c>
jmp    118e <load+0x5e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    117c <load+0x4c>
lea    0xe68(%rip),%rdi
mov    $0xb1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116b <load+0x3b>
mov    $0x0,%al
call   1040 <getch@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load>:
push   %rax
mov    $0x24,%edi
mov    $0xe,%esi
call   1060 <gotoxy@plt>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1e,%edi
mov    $0xf,%esi
call   1060 <gotoxy@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
mov    $0xb1,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <getch@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"loading...\00"
@.str.1 = [3 x i8] c"%c\00"
define void @load() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i32 @gotoxy(i32 36, i32 14)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @gotoxy(i32 30, i32 15)
store i32 1, i32* %3
br label %9
9: ; preds = %22, %0
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 20
br i1 %11, label %12, label %25
12: ; preds = %9
store i32 0, i32* %5
br label %13
13: ; preds = %17, %12
%14 = load i32, i32* %5
%15 = icmp sle i32 %14, 100000000
br i1 %15, label %16, label %20
16: ; preds = %13
br label %17
17: ; preds = %16
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %13
20: ; preds = %13
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 177)
br label %22
22: ; preds = %20
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %9
25: ; preds = %9
%26 = call i32 (...) @getch()
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"loading...\00"
define void @load() {
%1 = tail call i32 @gotoxy(i32 36, i32 14)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @gotoxy(i32 30, i32 15)
%4 = tail call i32 @putchar(i32 177)
%5 = tail call i32 @putchar(i32 177)
%6 = tail call i32 @putchar(i32 177)
%7 = tail call i32 @putchar(i32 177)
%8 = tail call i32 @putchar(i32 177)
%9 = tail call i32 @putchar(i32 177)
%10 = tail call i32 @putchar(i32 177)
%11 = tail call i32 @putchar(i32 177)
%12 = tail call i32 @putchar(i32 177)
%13 = tail call i32 @putchar(i32 177)
%14 = tail call i32 @putchar(i32 177)
%15 = tail call i32 @putchar(i32 177)
%16 = tail call i32 @putchar(i32 177)
%17 = tail call i32 @putchar(i32 177)
%18 = tail call i32 @putchar(i32 177)
%19 = tail call i32 @putchar(i32 177)
%20 = tail call i32 @putchar(i32 177)
%21 = tail call i32 @putchar(i32 177)
%22 = tail call i32 @putchar(i32 177)
%23 = tail call i32 @putchar(i32 177)
%24 = tail call i32 (...) @getch()
ret void
}