#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 /*<<< orphan*/ usleep(int);
int /*<<< orphan*/ writechars(char **, int);
void runend(void) {
  char *prnt[23];
  int i;
  for (i = 0; i < 23; i++)
    printf("\n");
  prnt[0] =
      "    "
      "=======================================================================";
  prnt[1] =
      "    "
      "Allt liv i min kropp upphörde och livet så som jag ser det var nu slut!";
  prnt[2] =
      "    "
      "=======================================================================";
  writechars(prnt, 3);
  for (i = 0; i < 10; i++)
    printf("\n");
  usleep(5000000);
  for (i = 0; i < 23; i++)
    printf("\n");
  prnt[0] = "                  "
            "============================================";
  prnt[1] = "                  "
            "   ___                           ___________";
  prnt[2] = "                  "
            "  /   \\    |          |       |       |";
  prnt[3] = "                  "
            " /     \\   |          |       |       |";
  prnt[4] = "                  "
            "|          |          |       |       |";
  prnt[5] = "                  "
            " \\_____    |          |       |       |";
  prnt[6] = "                  "
            "       \\   |          |       |       |";
  prnt[7] = "                  "
            "        |  |          |       |       |";
  prnt[8] = "                  "
            "\\      /   |           \\     /        |";
  prnt[9] = "                  "
            " \\____/    |_______     \\___/         |";
  prnt[10] = "                  "
             "============================================";
  writechars(prnt, 11);
  for (i = 0; i < 6; i++)
    printf("\n");
}


x86 assembly (clang, -O0):
<runend>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0xc4(%rbp)
cmpl   $0x17,-0xc4(%rbp)
jge    1172 <runend+0x42>
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1145 <runend+0x15>
lea    0xe89(%rip),%rax
mov    %rax,-0xc0(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0xb8(%rbp)
lea    0xe6d(%rip),%rax
mov    %rax,-0xb0(%rbp)
lea    -0xc0(%rbp),%rdi
mov    $0x3,%esi
call   1030 <writechars@plt>
movl   $0x0,-0xc4(%rbp)
cmpl   $0xa,-0xc4(%rbp)
jge    11e4 <runend+0xb4>
lea    0xe35(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    11b7 <runend+0x87>
mov    $0x4c4b40,%edi
call   1050 <usleep@plt>
movl   $0x0,-0xc4(%rbp)
cmpl   $0x17,-0xc4(%rbp)
jge    1225 <runend+0xf5>
lea    0xdf4(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    11f8 <runend+0xc8>
lea    0xe70(%rip),%rax
mov    %rax,-0xc0(%rbp)
lea    0xea1(%rip),%rax
mov    %rax,-0xb8(%rbp)
lea    0xed2(%rip),%rax
mov    %rax,-0xb0(%rbp)
lea    0xefe(%rip),%rax
mov    %rax,-0xa8(%rbp)
lea    0xf2a(%rip),%rax
mov    %rax,-0xa0(%rbp)
lea    0xf56(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    0xf82(%rip),%rax
mov    %rax,-0x90(%rbp)
lea    0xfae(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    0xfda(%rip),%rax
mov    %rax,-0x80(%rbp)
lea    0x1009(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    0xdea(%rip),%rax
mov    %rax,-0x70(%rbp)
lea    -0xc0(%rbp),%rdi
mov    $0xb,%esi
call   1030 <writechars@plt>
movl   $0x0,-0xc4(%rbp)
cmpl   $0x6,-0xc4(%rbp)
jge    12fe <runend+0x1ce>
lea    0xd1b(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    12d1 <runend+0x1a1>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runend>:
push   %rbx
sub    $0xc0,%rsp
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    $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    $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>
lea    0xddb(%rip),%rax
mov    %rax,(%rsp)
lea    0xe1c(%rip),%rcx
mov    %rcx,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <writechars@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    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4c4b40,%edi
call   1050 <usleep@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    $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    $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>
lea    0xcf5(%rip),%rax
mov    %rax,(%rsp)
lea    0xd29(%rip),%rcx
mov    %rcx,0x8(%rsp)
lea    0xd5c(%rip),%rcx
mov    %rcx,0x10(%rsp)
lea    0xd8a(%rip),%rcx
mov    %rcx,0x18(%rsp)
lea    0xdb8(%rip),%rcx
mov    %rcx,0x20(%rsp)
lea    0xde6(%rip),%rcx
mov    %rcx,0x28(%rsp)
lea    0xe14(%rip),%rcx
mov    %rcx,0x30(%rsp)
lea    0xe42(%rip),%rcx
mov    %rcx,0x38(%rsp)
lea    0xe70(%rip),%rcx
mov    %rcx,0x40(%rsp)
lea    0xe9e(%rip),%rcx
mov    %rcx,0x48(%rsp)
mov    %rax,0x50(%rsp)
mov    %rbx,%rdi
mov    $0xb,%esi
call   1040 <writechars@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>
add    $0xc0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [76 x i8] c" =======================================================================\00"
@.str.2 = [78 x i8] c" Allt liv i min kropp upph\C3\B6rde och livet s\C3\A5 som jag ser det var nu slut!\00"
@.str.3 = [63 x i8] c" ============================================\00"
@.str.4 = [63 x i8] c" ___ ___________\00"
@.str.5 = [58 x i8] c" / \\ | | | |\00"
@.str.6 = [58 x i8] c" / \\ | | | |\00"
@.str.7 = [58 x i8] c" | | | | |\00"
@.str.8 = [58 x i8] c" \\_____ | | | |\00"
@.str.9 = [58 x i8] c" \\ | | | |\00"
@.str.10 = [58 x i8] c" | | | | |\00"
@.str.11 = [58 x i8] c" \\ / | \\ / |\00"
@.str.12 = [58 x i8] c" \\____/ |_______ \\___/ |\00"
define void @runend() {
%1 = alloca [23 x i8*]
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 23
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
%12 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 1
store i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0), i8** %13
%14 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 2
store i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8** %14
%15 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 0
%16 = call i32 @writechars(i8** %15, i32 3)
store i32 0, i32* %2
br label %17
17: ; preds = %22, %11
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 10
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %22
22: ; preds = %20
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %17
25: ; preds = %17
%26 = call i32 @usleep(i32 5000000)
store i32 0, i32* %2
br label %27
27: ; preds = %32, %25
%28 = load i32, i32* %2
%29 = icmp slt i32 %28, 23
br i1 %29, label %30, label %35
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %32
32: ; preds = %30
%33 = load i32, i32* %2
%34 = add nsw i32 %33, 1
store i32 %34, i32* %2
br label %27
35: ; preds = %27
%36 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i8** %36
%37 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 1
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0), i8** %37
%38 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 2
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0), i8** %38
%39 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 3
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i64 0, i64 0), i8** %39
%40 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 4
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.7, i64 0, i64 0), i8** %40
%41 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 5
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0), i8** %41
%42 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 6
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8** %42
%43 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 7
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0), i8** %43
%44 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 8
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0), i8** %44
%45 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 9
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.12, i64 0, i64 0), i8** %45
%46 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 10
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i8** %46
%47 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 0
%48 = call i32 @writechars(i8** %47, i32 11)
store i32 0, i32* %2
br label %49
49: ; preds = %54, %35
%50 = load i32, i32* %2
%51 = icmp slt i32 %50, 6
br i1 %51, label %52, label %57
52: ; preds = %49
%53 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %54
54: ; preds = %52
%55 = load i32, i32* %2
%56 = add nsw i32 %55, 1
store i32 %56, i32* %2
br label %49
57: ; preds = %49
ret void
}

LLVM IR (-O2):
@.str.1 = [76 x i8] c" =======================================================================\00"
@.str.2 = [78 x i8] c" Allt liv i min kropp upph\C3\B6rde och livet s\C3\A5 som jag ser det var nu slut!\00"
@.str.3 = [63 x i8] c" ============================================\00"
@.str.4 = [63 x i8] c" ___ ___________\00"
@.str.5 = [58 x i8] c" / \\ | | | |\00"
@.str.6 = [58 x i8] c" / \\ | | | |\00"
@.str.7 = [58 x i8] c" | | | | |\00"
@.str.8 = [58 x i8] c" \\_____ | | | |\00"
@.str.9 = [58 x i8] c" \\ | | | |\00"
@.str.10 = [58 x i8] c" | | | | |\00"
@.str.11 = [58 x i8] c" \\ / | \\ / |\00"
@.str.12 = [58 x i8] c" \\____/ |_______ \\___/ |\00"
define void @runend() {
%1 = alloca [23 x i8*]
%2 = bitcast [23 x i8*]* %1 to i8*
%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 10)
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @putchar(i32 10)
%13 = tail call i32 @putchar(i32 10)
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 @putchar(i32 10)
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i32 @putchar(i32 10)
%19 = tail call i32 @putchar(i32 10)
%20 = tail call i32 @putchar(i32 10)
%21 = tail call i32 @putchar(i32 10)
%22 = tail call i32 @putchar(i32 10)
%23 = tail call i32 @putchar(i32 10)
%24 = tail call i32 @putchar(i32 10)
%25 = tail call i32 @putchar(i32 10)
%26 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8** %26
%27 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 1
store i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0), i8** %27
%28 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 2
store i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i8** %28
%29 = call i32 @writechars(i8** %26, i32 3)
%30 = call i32 @putchar(i32 10)
%31 = call i32 @putchar(i32 10)
%32 = call i32 @putchar(i32 10)
%33 = call i32 @putchar(i32 10)
%34 = call i32 @putchar(i32 10)
%35 = call i32 @putchar(i32 10)
%36 = call i32 @putchar(i32 10)
%37 = call i32 @putchar(i32 10)
%38 = call i32 @putchar(i32 10)
%39 = call i32 @putchar(i32 10)
%40 = call i32 @usleep(i32 5000000)
%41 = call i32 @putchar(i32 10)
%42 = call i32 @putchar(i32 10)
%43 = call i32 @putchar(i32 10)
%44 = call i32 @putchar(i32 10)
%45 = call i32 @putchar(i32 10)
%46 = call i32 @putchar(i32 10)
%47 = call i32 @putchar(i32 10)
%48 = call i32 @putchar(i32 10)
%49 = call i32 @putchar(i32 10)
%50 = call i32 @putchar(i32 10)
%51 = call i32 @putchar(i32 10)
%52 = call i32 @putchar(i32 10)
%53 = call i32 @putchar(i32 10)
%54 = call i32 @putchar(i32 10)
%55 = call i32 @putchar(i32 10)
%56 = call i32 @putchar(i32 10)
%57 = call i32 @putchar(i32 10)
%58 = call i32 @putchar(i32 10)
%59 = call i32 @putchar(i32 10)
%60 = call i32 @putchar(i32 10)
%61 = call i32 @putchar(i32 10)
%62 = call i32 @putchar(i32 10)
%63 = call i32 @putchar(i32 10)
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i8** %26
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0), i8** %27
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0), i8** %28
%64 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 3
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i64 0, i64 0), i8** %64
%65 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 4
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.7, i64 0, i64 0), i8** %65
%66 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 5
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0), i8** %66
%67 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 6
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i8** %67
%68 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 7
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0), i8** %68
%69 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 8
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.11, i64 0, i64 0), i8** %69
%70 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 9
store i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.12, i64 0, i64 0), i8** %70
%71 = getelementptr inbounds [23 x i8*], [23 x i8*]* %1, i64 0, i64 10
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0), i8** %71
%72 = call i32 @writechars(i8** %26, i32 11)
%73 = call i32 @putchar(i32 10)
%74 = call i32 @putchar(i32 10)
%75 = call i32 @putchar(i32 10)
%76 = call i32 @putchar(i32 10)
%77 = call i32 @putchar(i32 10)
%78 = call i32 @putchar(i32 10)
ret void
}