#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ print64(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ system(char *);
void asksave(void) {
  printf("\e[44m");
  fflush(stdout);
  system("clear");
  printf("\e["
         "15"
         ";"
         "21"
         "H");
  printf("\e[41m");
  print64(28);
  printf("\e["
         "16"
         ";"
         "21"
         "H");
  print64(25);
  printf("\e["
         "17"
         ";"
         "21"
         "H");
  print64(26);
  printf("\e["
         "18"
         ";"
         "21"
         "H");
  print64(28);
  printf("\e["
         "19"
         ";"
         "21"
         "H");
  print64(27);
  printf("\e["
         "20"
         ";"
         "21"
         "H");
  print64(28);
  printf("\e["
         "21"
         ";"
         "21"
         "H");
  print64(16);
  printf("\e["
         "15"
         ";"
         "85"
         "H");
  printf("\e[44m"
         " ");
  printf("\e["
         "19"
         ";"
         "82"
         "H");
}


x86 assembly (clang, -O0):
<asksave>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    0xea1(%rip),%rdi
call   1030 <system@plt>
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1c,%edi
call   1060 <print64@plt>
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
mov    $0x19,%edi
call   1060 <print64@plt>
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1a,%edi
call   1060 <print64@plt>
lea    0xe6e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1c,%edi
call   1060 <print64@plt>
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1b,%edi
call   1060 <print64@plt>
lea    0xe54(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1c,%edi
call   1060 <print64@plt>
lea    0xe47(%rip),%rdi
call   1040 <printf@plt>
mov    $0x10,%edi
call   1060 <print64@plt>
lea    0xe3a(%rip),%rdi
call   1040 <printf@plt>
lea    0xe37(%rip),%rdi
call   1040 <printf@plt>
lea    0xe32(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<asksave>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    0xea4(%rip),%rdi
call   1030 <system@plt>
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1c,%edi
call   1060 <print64@plt>
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x19,%edi
call   1060 <print64@plt>
lea    0xe7e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1a,%edi
call   1060 <print64@plt>
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1c,%edi
call   1060 <print64@plt>
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1b,%edi
call   1060 <print64@plt>
lea    0xe57(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1c,%edi
call   1060 <print64@plt>
lea    0xe4a(%rip),%rdi
call   1040 <printf@plt>
mov    $0x10,%edi
call   1060 <print64@plt>
lea    0xe3d(%rip),%rdi
call   1040 <printf@plt>
lea    0xe3a(%rip),%rdi
call   1040 <printf@plt>
lea    0xe35(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[44m\00"
@stdout = global i32 0
@.str.1 = [6 x i8] c"clear\00"
@.str.2 = [9 x i8] c"\1B[15;21H\00"
@.str.3 = [6 x i8] c"\1B[41m\00"
@.str.4 = [9 x i8] c"\1B[16;21H\00"
@.str.5 = [9 x i8] c"\1B[17;21H\00"
@.str.6 = [9 x i8] c"\1B[18;21H\00"
@.str.7 = [9 x i8] c"\1B[19;21H\00"
@.str.8 = [9 x i8] c"\1B[20;21H\00"
@.str.9 = [9 x i8] c"\1B[21;21H\00"
@.str.10 = [9 x i8] c"\1B[15;85H\00"
@.str.11 = [7 x i8] c"\1B[44m \00"
@.str.12 = [9 x i8] c"\1B[19;82H\00"
define void @asksave() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @print64(i32 28)
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @print64(i32 25)
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @print64(i32 26)
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 @print64(i32 28)
%14 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 @print64(i32 27)
%16 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 @print64(i32 28)
%18 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%19 = call i32 @print64(i32 16)
%20 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[44m\00"
@stdout = global i32 0
@.str.1 = [6 x i8] c"clear\00"
@.str.2 = [9 x i8] c"\1B[15;21H\00"
@.str.3 = [6 x i8] c"\1B[41m\00"
@.str.4 = [9 x i8] c"\1B[16;21H\00"
@.str.5 = [9 x i8] c"\1B[17;21H\00"
@.str.6 = [9 x i8] c"\1B[18;21H\00"
@.str.7 = [9 x i8] c"\1B[19;21H\00"
@.str.8 = [9 x i8] c"\1B[20;21H\00"
@.str.9 = [9 x i8] c"\1B[21;21H\00"
@.str.10 = [9 x i8] c"\1B[15;85H\00"
@.str.11 = [7 x i8] c"\1B[44m \00"
@.str.12 = [9 x i8] c"\1B[19;82H\00"
define void @asksave() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @print64(i32 28)
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call i32 @print64(i32 25)
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 @print64(i32 26)
%12 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%13 = tail call i32 @print64(i32 28)
%14 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%15 = tail call i32 @print64(i32 27)
%16 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%17 = tail call i32 @print64(i32 28)
%18 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%19 = tail call i32 @print64(i32 16)
%20 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%21 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%22 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
ret void
}