#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*/ Put_sprite(int, unsigned char, int, int, int, unsigned char);
void Draw_Title() {
  unsigned char i;
  for (i = 0; i < 40; i++) {
    Put_sprite(4, (i * 8), 0, 8, 40, i);
    Put_sprite(4, (i * 8), 40, 8, 40, i + 40);
    Put_sprite(4, (i * 8), 80, 8, 40, i + 80);
    Put_sprite(4, (i * 8), 120, 8, 40, i + 120);
    Put_sprite(4, (i * 8), 160, 8, 40, i + 160);
    Put_sprite(4, (i * 8), 200, 8, 40, i + 200);
  }
}


x86 assembly (clang, -O0):
<Draw_Title>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x28,%eax
jge    125b <Draw_Title+0x14b>
movzbl -0x1(%rbp),%eax
shl    $0x3,%eax
mov    $0x4,%edi
xor    %edx,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
movzbl %al,%esi
movzbl -0x1(%rbp),%r9d
call   1030 <Put_sprite@plt>
movzbl -0x1(%rbp),%eax
shl    $0x3,%eax
mov    %al,%dl
movzbl -0x1(%rbp),%eax
add    $0x28,%eax
mov    $0x4,%edi
mov    $0x28,%r8d
mov    $0x8,%ecx
movzbl %dl,%esi
mov    %r8d,%edx
movzbl %al,%r9d
call   1030 <Put_sprite@plt>
movzbl -0x1(%rbp),%eax
shl    $0x3,%eax
mov    %al,%sil
movzbl -0x1(%rbp),%eax
add    $0x50,%eax
mov    $0x4,%edi
mov    $0x50,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
movzbl %sil,%esi
movzbl %al,%r9d
call   1030 <Put_sprite@plt>
movzbl -0x1(%rbp),%eax
shl    $0x3,%eax
mov    %al,%sil
movzbl -0x1(%rbp),%eax
add    $0x78,%eax
mov    $0x4,%edi
mov    $0x78,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
movzbl %sil,%esi
movzbl %al,%r9d
call   1030 <Put_sprite@plt>
movzbl -0x1(%rbp),%eax
shl    $0x3,%eax
mov    %al,%sil
movzbl -0x1(%rbp),%eax
add    $0xa0,%eax
mov    $0x4,%edi
mov    $0xa0,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
movzbl %sil,%esi
movzbl %al,%r9d
call   1030 <Put_sprite@plt>
movzbl -0x1(%rbp),%eax
shl    $0x3,%eax
mov    %al,%sil
movzbl -0x1(%rbp),%eax
add    $0xc8,%eax
mov    $0x4,%edi
mov    $0xc8,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
movzbl %sil,%esi
movzbl %al,%r9d
call   1030 <Put_sprite@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    111c <Draw_Title+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Draw_Title>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movzbl %bpl,%ebp
movzbl %bl,%ebx
mov    $0x4,%edi
mov    %ebp,%esi
xor    %edx,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
mov    %ebx,%r9d
call   1030 <Put_sprite@plt>
lea    0x28(%rbx),%eax
movzbl %al,%r9d
mov    $0x4,%edi
mov    %ebp,%esi
mov    $0x28,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
call   1030 <Put_sprite@plt>
lea    0x50(%rbx),%eax
movzbl %al,%r9d
mov    $0x4,%edi
mov    %ebp,%esi
mov    $0x50,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
call   1030 <Put_sprite@plt>
lea    0x78(%rbx),%eax
movzbl %al,%r9d
mov    $0x4,%edi
mov    %ebp,%esi
mov    $0x78,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
call   1030 <Put_sprite@plt>
lea    -0x60(%rbx),%eax
movzbl %al,%r9d
mov    $0x4,%edi
mov    %ebp,%esi
mov    $0xa0,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
call   1030 <Put_sprite@plt>
lea    -0x38(%rbx),%eax
movzbl %al,%r9d
mov    $0x4,%edi
mov    %ebp,%esi
mov    $0xc8,%edx
mov    $0x8,%ecx
mov    $0x28,%r8d
call   1030 <Put_sprite@plt>
add    $0x8,%bpl
add    $0x1,%bl
cmp    $0x28,%bl
jne    1120 <Draw_Title+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @Draw_Title() {
%1 = alloca i8
store i8 0, i8* %1
br label %2
2: ; preds = %58, %0
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = icmp slt i32 %4, 40
br i1 %5, label %6, label %61
6: ; preds = %2
%7 = load i8, i8* %1
%8 = zext i8 %7 to i32
%9 = mul nsw i32 %8, 8
%10 = trunc i32 %9 to i8
%11 = load i8, i8* %1
%12 = call i32 @Put_sprite(i32 4, i8 zeroext %10, i32 0, i32 8, i32 40, i8 zeroext %11)
%13 = load i8, i8* %1
%14 = zext i8 %13 to i32
%15 = mul nsw i32 %14, 8
%16 = trunc i32 %15 to i8
%17 = load i8, i8* %1
%18 = zext i8 %17 to i32
%19 = add nsw i32 %18, 40
%20 = trunc i32 %19 to i8
%21 = call i32 @Put_sprite(i32 4, i8 zeroext %16, i32 40, i32 8, i32 40, i8 zeroext %20)
%22 = load i8, i8* %1
%23 = zext i8 %22 to i32
%24 = mul nsw i32 %23, 8
%25 = trunc i32 %24 to i8
%26 = load i8, i8* %1
%27 = zext i8 %26 to i32
%28 = add nsw i32 %27, 80
%29 = trunc i32 %28 to i8
%30 = call i32 @Put_sprite(i32 4, i8 zeroext %25, i32 80, i32 8, i32 40, i8 zeroext %29)
%31 = load i8, i8* %1
%32 = zext i8 %31 to i32
%33 = mul nsw i32 %32, 8
%34 = trunc i32 %33 to i8
%35 = load i8, i8* %1
%36 = zext i8 %35 to i32
%37 = add nsw i32 %36, 120
%38 = trunc i32 %37 to i8
%39 = call i32 @Put_sprite(i32 4, i8 zeroext %34, i32 120, i32 8, i32 40, i8 zeroext %38)
%40 = load i8, i8* %1
%41 = zext i8 %40 to i32
%42 = mul nsw i32 %41, 8
%43 = trunc i32 %42 to i8
%44 = load i8, i8* %1
%45 = zext i8 %44 to i32
%46 = add nsw i32 %45, 160
%47 = trunc i32 %46 to i8
%48 = call i32 @Put_sprite(i32 4, i8 zeroext %43, i32 160, i32 8, i32 40, i8 zeroext %47)
%49 = load i8, i8* %1
%50 = zext i8 %49 to i32
%51 = mul nsw i32 %50, 8
%52 = trunc i32 %51 to i8
%53 = load i8, i8* %1
%54 = zext i8 %53 to i32
%55 = add nsw i32 %54, 200
%56 = trunc i32 %55 to i8
%57 = call i32 @Put_sprite(i32 4, i8 zeroext %52, i32 200, i32 8, i32 40, i8 zeroext %56)
br label %58
58: ; preds = %6
%59 = load i8, i8* %1
%60 = add i8 %59, 1
store i8 %60, i8* %1
br label %2
61: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @Draw_Title() {
br label %1
1: ; preds = %0, %1
%2 = phi i8 [ 0, %0 ], [ %15, %1 ]
%3 = shl i8 %2, 3
%4 = tail call i32 @Put_sprite(i32 4, i8 zeroext %3, i32 0, i32 8, i32 40, i8 zeroext %2)
%5 = add nuw nsw i8 %2, 40
%6 = tail call i32 @Put_sprite(i32 4, i8 zeroext %3, i32 40, i32 8, i32 40, i8 zeroext %5)
%7 = add nuw nsw i8 %2, 80
%8 = tail call i32 @Put_sprite(i32 4, i8 zeroext %3, i32 80, i32 8, i32 40, i8 zeroext %7)
%9 = add nuw i8 %2, 120
%10 = tail call i32 @Put_sprite(i32 4, i8 zeroext %3, i32 120, i32 8, i32 40, i8 zeroext %9)
%11 = add nuw nsw i8 %2, -96
%12 = tail call i32 @Put_sprite(i32 4, i8 zeroext %3, i32 160, i32 8, i32 40, i8 zeroext %11)
%13 = add nuw nsw i8 %2, -56
%14 = tail call i32 @Put_sprite(i32 4, i8 zeroext %3, i32 200, i32 8, i32 40, i8 zeroext %13)
%15 = add nuw nsw i8 %2, 1
%16 = icmp eq i8 %15, 40
br i1 %16, label %17, label %1
17: ; preds = %1
ret void
}