#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*/ Sleep(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void put_logo() {
  int i;
  for (i = 0; i < 8; i++) {
    printf("\n");
  }
  for (i = 0; i < 35; i++) {
    printf(" ");
  }
  printf("snake");
  Sleep(2000);
  system("cls");
}


x86 assembly (clang, -O0):
<put_logo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jge    1163 <put_logo+0x33>
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <put_logo+0xf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x23,-0x4(%rbp)
jge    118e <put_logo+0x5e>
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    116a <put_logo+0x3a>
lea    0xe6f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x7d0,%edi
call   1050 <Sleep@plt>
lea    0xe5f(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_logo>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
lea    0xd0a(%rip),%rdi
call   1050 <printf@plt>
mov    $0x7d0,%edi
call   1060 <Sleep@plt>
lea    0xcfa(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [6 x i8] c"snake\00"
@.str.3 = [4 x i8] c"cls\00"
define void @put_logo() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 8
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
store i32 0, i32* %1
br label %11
11: ; preds = %16, %10
%12 = load i32, i32* %1
%13 = icmp slt i32 %12, 35
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %11
19: ; preds = %11
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @Sleep(i32 2000)
%22 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.2 = [6 x i8] c"snake\00"
@.str.3 = [4 x i8] c"cls\00"
define void @put_logo() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @putchar(i32 10)
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 @putchar(i32 32)
%10 = tail call i32 @putchar(i32 32)
%11 = tail call i32 @putchar(i32 32)
%12 = tail call i32 @putchar(i32 32)
%13 = tail call i32 @putchar(i32 32)
%14 = tail call i32 @putchar(i32 32)
%15 = tail call i32 @putchar(i32 32)
%16 = tail call i32 @putchar(i32 32)
%17 = tail call i32 @putchar(i32 32)
%18 = tail call i32 @putchar(i32 32)
%19 = tail call i32 @putchar(i32 32)
%20 = tail call i32 @putchar(i32 32)
%21 = tail call i32 @putchar(i32 32)
%22 = tail call i32 @putchar(i32 32)
%23 = tail call i32 @putchar(i32 32)
%24 = tail call i32 @putchar(i32 32)
%25 = tail call i32 @putchar(i32 32)
%26 = tail call i32 @putchar(i32 32)
%27 = tail call i32 @putchar(i32 32)
%28 = tail call i32 @putchar(i32 32)
%29 = tail call i32 @putchar(i32 32)
%30 = tail call i32 @putchar(i32 32)
%31 = tail call i32 @putchar(i32 32)
%32 = tail call i32 @putchar(i32 32)
%33 = tail call i32 @putchar(i32 32)
%34 = tail call i32 @putchar(i32 32)
%35 = tail call i32 @putchar(i32 32)
%36 = tail call i32 @putchar(i32 32)
%37 = tail call i32 @putchar(i32 32)
%38 = tail call i32 @putchar(i32 32)
%39 = tail call i32 @putchar(i32 32)
%40 = tail call i32 @putchar(i32 32)
%41 = tail call i32 @putchar(i32 32)
%42 = tail call i32 @putchar(i32 32)
%43 = tail call i32 @putchar(i32 32)
%44 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%45 = tail call i32 @Sleep(i32 2000)
%46 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}