void OSD_Scroll() {
  int i;
  volatile unsigned char *p1, *p2;
  p1 = ((volatile unsigned char *)(0xFFFFFC00));
  p2 = ((volatile unsigned char *)(0xFFFFFC00)) + 32;
  for (i = 0; i < (512 - (2 * 32)); ++i) {
    *p1++ = *p2++;
  }
  for (i = 0; i < 32; ++i)
    *p1++ = ' ';
}


x86 assembly (clang, -O0):
<OSD_Scroll>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffc00,%eax
mov    %rax,-0x10(%rbp)
mov    $0xfffffc00,%eax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x1c0,-0x4(%rbp)
jge    115e <OSD_Scroll+0x5e>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1121 <OSD_Scroll+0x21>
movl   $0x0,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jge    118f <OSD_Scroll+0x8f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x20,(%rax)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <OSD_Scroll+0x65>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSD_Scroll>:
mov    $0xfffffc00,%eax
xor    %ecx,%ecx
lea    0x1df(%rax),%rsi
xchg   %ax,%ax
movzbl 0x20(%rax,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
movzbl 0x21(%rax,%rcx,1),%edx
mov    %dl,0x1(%rax,%rcx,1)
movzbl 0x22(%rax,%rcx,1),%edx
mov    %dl,0x2(%rax,%rcx,1)
movzbl 0x23(%rax,%rcx,1),%edx
mov    %dl,0x3(%rax,%rcx,1)
movzbl 0x24(%rax,%rcx,1),%edx
mov    %dl,0x4(%rax,%rcx,1)
movzbl 0x25(%rax,%rcx,1),%edx
mov    %dl,0x5(%rax,%rcx,1)
movzbl 0x26(%rax,%rcx,1),%edx
mov    %dl,0x6(%rax,%rcx,1)
lea    (%rax,%rcx,1),%rdi
add    $0x27,%rdi
movzbl 0x27(%rax,%rcx,1),%edx
mov    %dl,0x7(%rax,%rcx,1)
add    $0x8,%rcx
cmp    %rsi,%rdi
jne    1110 <OSD_Scroll+0x10>
movb   $0x20,(%rax,%rcx,1)
movb   $0x20,0x1(%rax,%rcx,1)
movb   $0x20,0x2(%rax,%rcx,1)
movb   $0x20,0x3(%rax,%rcx,1)
movb   $0x20,0x4(%rax,%rcx,1)
movb   $0x20,0x5(%rax,%rcx,1)
movb   $0x20,0x6(%rax,%rcx,1)
movb   $0x20,0x7(%rax,%rcx,1)
movb   $0x20,0x8(%rax,%rcx,1)
movb   $0x20,0x9(%rax,%rcx,1)
movb   $0x20,0xa(%rax,%rcx,1)
movb   $0x20,0xb(%rax,%rcx,1)
movb   $0x20,0xc(%rax,%rcx,1)
movb   $0x20,0xd(%rax,%rcx,1)
movb   $0x20,0xe(%rax,%rcx,1)
movb   $0x20,0xf(%rax,%rcx,1)
movb   $0x20,0x10(%rax,%rcx,1)
movb   $0x20,0x11(%rax,%rcx,1)
movb   $0x20,0x12(%rax,%rcx,1)
movb   $0x20,0x13(%rax,%rcx,1)
movb   $0x20,0x14(%rax,%rcx,1)
movb   $0x20,0x15(%rax,%rcx,1)
movb   $0x20,0x16(%rax,%rcx,1)
movb   $0x20,0x17(%rax,%rcx,1)
movb   $0x20,0x18(%rax,%rcx,1)
movb   $0x20,0x19(%rax,%rcx,1)
movb   $0x20,0x1a(%rax,%rcx,1)
movb   $0x20,0x1b(%rax,%rcx,1)
movb   $0x20,0x1c(%rax,%rcx,1)
movb   $0x20,0x1d(%rax,%rcx,1)
movb   $0x20,0x1e(%rax,%rcx,1)
movb   $0x20,0x1f(%rax,%rcx,1)
ret

LLVM IR (-O0):
define void @OSD_Scroll() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i8* inttoptr (i64 4294966272 to i8*), i8** %2
store i8* getelementptr inbounds (i8, i8* inttoptr (i64 4294966272 to i8*), i64 32), i8** %3
store i32 0, i32* %1
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 448
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load volatile i8, i8* %8
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
store volatile i8 %10, i8* %11
br label %13
13: ; preds = %7
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %4
16: ; preds = %4
store i32 0, i32* %1
br label %17
17: ; preds = %23, %16
%18 = load i32, i32* %1
%19 = icmp slt i32 %18, 32
br i1 %19, label %20, label %26
20: ; preds = %17
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %2
store volatile i8 32, i8* %21
br label %23
23: ; preds = %20
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %17
26: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @OSD_Scroll() {
br label %1
1: ; preds = %1, %0
%2 = phi i8* [ inttoptr (i64 4294966304 to i8*), %0 ], [ %25, %1 ]
%3 = phi i8* [ inttoptr (i64 4294966272 to i8*), %0 ], [ %27, %1 ]
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = load volatile i8, i8* %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
store volatile i8 %5, i8* %3
%7 = getelementptr inbounds i8, i8* %2, i64 2
%8 = load volatile i8, i8* %4
%9 = getelementptr inbounds i8, i8* %3, i64 2
store volatile i8 %8, i8* %6
%10 = getelementptr inbounds i8, i8* %2, i64 3
%11 = load volatile i8, i8* %7
%12 = getelementptr inbounds i8, i8* %3, i64 3
store volatile i8 %11, i8* %9
%13 = getelementptr inbounds i8, i8* %2, i64 4
%14 = load volatile i8, i8* %10
%15 = getelementptr inbounds i8, i8* %3, i64 4
store volatile i8 %14, i8* %12
%16 = getelementptr inbounds i8, i8* %2, i64 5
%17 = load volatile i8, i8* %13
%18 = getelementptr inbounds i8, i8* %3, i64 5
store volatile i8 %17, i8* %15
%19 = getelementptr inbounds i8, i8* %2, i64 6
%20 = load volatile i8, i8* %16
%21 = getelementptr inbounds i8, i8* %3, i64 6
store volatile i8 %20, i8* %18
%22 = getelementptr inbounds i8, i8* %2, i64 7
%23 = load volatile i8, i8* %19
%24 = getelementptr inbounds i8, i8* %3, i64 7
store volatile i8 %23, i8* %21
%25 = getelementptr inbounds i8, i8* %2, i64 8
%26 = load volatile i8, i8* %22
%27 = getelementptr inbounds i8, i8* %3, i64 8
store volatile i8 %26, i8* %24
%28 = icmp eq i8* %22, inttoptr (i64 4294966751 to i8*)
br i1 %28, label %29, label %1
29: ; preds = %1
%30 = getelementptr inbounds i8, i8* %3, i64 7
%31 = getelementptr inbounds i8, i8* %30, i64 2
store volatile i8 32, i8* %27
%32 = getelementptr inbounds i8, i8* %30, i64 3
store volatile i8 32, i8* %31
%33 = getelementptr inbounds i8, i8* %30, i64 4
store volatile i8 32, i8* %32
%34 = getelementptr inbounds i8, i8* %30, i64 5
store volatile i8 32, i8* %33
%35 = getelementptr inbounds i8, i8* %30, i64 6
store volatile i8 32, i8* %34
%36 = getelementptr inbounds i8, i8* %30, i64 7
store volatile i8 32, i8* %35
%37 = getelementptr inbounds i8, i8* %30, i64 8
store volatile i8 32, i8* %36
%38 = getelementptr inbounds i8, i8* %30, i64 9
store volatile i8 32, i8* %37
%39 = getelementptr inbounds i8, i8* %30, i64 10
store volatile i8 32, i8* %38
%40 = getelementptr inbounds i8, i8* %30, i64 11
store volatile i8 32, i8* %39
%41 = getelementptr inbounds i8, i8* %30, i64 12
store volatile i8 32, i8* %40
%42 = getelementptr inbounds i8, i8* %30, i64 13
store volatile i8 32, i8* %41
%43 = getelementptr inbounds i8, i8* %30, i64 14
store volatile i8 32, i8* %42
%44 = getelementptr inbounds i8, i8* %30, i64 15
store volatile i8 32, i8* %43
%45 = getelementptr inbounds i8, i8* %30, i64 16
store volatile i8 32, i8* %44
%46 = getelementptr inbounds i8, i8* %30, i64 17
store volatile i8 32, i8* %45
%47 = getelementptr inbounds i8, i8* %30, i64 18
store volatile i8 32, i8* %46
%48 = getelementptr inbounds i8, i8* %30, i64 19
store volatile i8 32, i8* %47
%49 = getelementptr inbounds i8, i8* %30, i64 20
store volatile i8 32, i8* %48
%50 = getelementptr inbounds i8, i8* %30, i64 21
store volatile i8 32, i8* %49
%51 = getelementptr inbounds i8, i8* %30, i64 22
store volatile i8 32, i8* %50
%52 = getelementptr inbounds i8, i8* %30, i64 23
store volatile i8 32, i8* %51
%53 = getelementptr inbounds i8, i8* %30, i64 24
store volatile i8 32, i8* %52
%54 = getelementptr inbounds i8, i8* %30, i64 25
store volatile i8 32, i8* %53
%55 = getelementptr inbounds i8, i8* %30, i64 26
store volatile i8 32, i8* %54
%56 = getelementptr inbounds i8, i8* %30, i64 27
store volatile i8 32, i8* %55
%57 = getelementptr inbounds i8, i8* %30, i64 28
store volatile i8 32, i8* %56
%58 = getelementptr inbounds i8, i8* %30, i64 29
store volatile i8 32, i8* %57
%59 = getelementptr inbounds i8, i8* %30, i64 30
store volatile i8 32, i8* %58
%60 = getelementptr inbounds i8, i8* %30, i64 31
store volatile i8 32, i8* %59
%61 = getelementptr inbounds i8, i8* %30, i64 32
store volatile i8 32, i8* %60
store volatile i8 32, i8* %61
ret void
}