#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*/ drawbackground(int, int, int, int, int, int, int);
void displaybackground(int texturenum) {
  drawbackground(texturenum, 0, 0, 256, 256, 800, 600);
  drawbackground(texturenum + 1, 256, 0, 256, 256, 800, 600);
  drawbackground(texturenum + 2, 512, 0, 256, 256, 800, 600);
  drawbackground(texturenum + 3, 768, 0, 256, 256, 800, 600);
  drawbackground(texturenum + 4, 0, 256, 256, 256, 800, 600);
  drawbackground(texturenum + 5, 256, 256, 256, 256, 800, 600);
  drawbackground(texturenum + 6, 512, 256, 256, 256, 800, 600);
  drawbackground(texturenum + 7, 768, 256, 256, 256, 800, 600);
  drawbackground(texturenum + 8, 0, 512, 256, 256, 800, 600);
  drawbackground(texturenum + 9, 256, 512, 256, 256, 800, 600);
  drawbackground(texturenum + 10, 512, 512, 256, 256, 800, 600);
  drawbackground(texturenum + 11, 768, 512, 256, 256, 800, 600);
}


x86 assembly (clang, -O0):
<displaybackground>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %edx,%edx
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %edx,%esi
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    $0x100,%r8d
xor    %edx,%edx
mov    $0x320,%r9d
mov    %r8d,%esi
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0x2,%edi
mov    $0x200,%esi
xor    %edx,%edx
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0x3,%edi
mov    $0x300,%esi
xor    %edx,%edx
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0x4,%edi
xor    %esi,%esi
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %r8d,%edx
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0x5,%edi
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0x6,%edi
mov    $0x200,%esi
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %r8d,%edx
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0x7,%edi
mov    $0x300,%esi
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %r8d,%edx
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0x8,%edi
xor    %esi,%esi
mov    $0x200,%edx
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0x9,%edi
mov    $0x100,%r8d
mov    $0x200,%edx
mov    $0x320,%r9d
mov    %r8d,%esi
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0xa,%edi
mov    $0x200,%edx
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %edx,%esi
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
mov    -0x4(%rbp),%edi
add    $0xb,%edi
mov    $0x300,%esi
mov    $0x200,%edx
mov    $0x100,%r8d
mov    $0x320,%r9d
mov    %r8d,%ecx
movl   $0x258,(%rsp)
call   1030 <drawbackground@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displaybackground>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movl   $0x258,(%rsp)
xor    %esi,%esi
xor    %edx,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0x1(%rbx),%edi
movl   $0x258,(%rsp)
mov    $0x100,%esi
xor    %edx,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0x2(%rbx),%edi
movl   $0x258,(%rsp)
mov    $0x200,%esi
xor    %edx,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0x3(%rbx),%edi
movl   $0x258,(%rsp)
mov    $0x300,%esi
xor    %edx,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0x4(%rbx),%edi
movl   $0x258,(%rsp)
xor    %esi,%esi
mov    $0x100,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0x5(%rbx),%edi
movl   $0x258,(%rsp)
mov    $0x100,%esi
mov    $0x100,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0x6(%rbx),%edi
movl   $0x258,(%rsp)
mov    $0x200,%esi
mov    $0x100,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0x7(%rbx),%edi
movl   $0x258,(%rsp)
mov    $0x300,%esi
mov    $0x100,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0x8(%rbx),%edi
movl   $0x258,(%rsp)
xor    %esi,%esi
mov    $0x200,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0x9(%rbx),%edi
movl   $0x258,(%rsp)
mov    $0x100,%esi
mov    $0x200,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
lea    0xa(%rbx),%edi
movl   $0x258,(%rsp)
mov    $0x200,%esi
mov    $0x200,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
add    $0xb,%ebx
movl   $0x258,(%rsp)
mov    %ebx,%edi
mov    $0x300,%esi
mov    $0x200,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    $0x320,%r9d
call   1030 <drawbackground@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @displaybackground(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @drawbackground(i32 %3, i32 0, i32 0, i32 256, i32 256, i32 800, i32 600)
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
%7 = call i32 @drawbackground(i32 %6, i32 256, i32 0, i32 256, i32 256, i32 800, i32 600)
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 2
%10 = call i32 @drawbackground(i32 %9, i32 512, i32 0, i32 256, i32 256, i32 800, i32 600)
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 3
%13 = call i32 @drawbackground(i32 %12, i32 768, i32 0, i32 256, i32 256, i32 800, i32 600)
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 4
%16 = call i32 @drawbackground(i32 %15, i32 0, i32 256, i32 256, i32 256, i32 800, i32 600)
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 5
%19 = call i32 @drawbackground(i32 %18, i32 256, i32 256, i32 256, i32 256, i32 800, i32 600)
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 6
%22 = call i32 @drawbackground(i32 %21, i32 512, i32 256, i32 256, i32 256, i32 800, i32 600)
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 7
%25 = call i32 @drawbackground(i32 %24, i32 768, i32 256, i32 256, i32 256, i32 800, i32 600)
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 8
%28 = call i32 @drawbackground(i32 %27, i32 0, i32 512, i32 256, i32 256, i32 800, i32 600)
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 9
%31 = call i32 @drawbackground(i32 %30, i32 256, i32 512, i32 256, i32 256, i32 800, i32 600)
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 10
%34 = call i32 @drawbackground(i32 %33, i32 512, i32 512, i32 256, i32 256, i32 800, i32 600)
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 11
%37 = call i32 @drawbackground(i32 %36, i32 768, i32 512, i32 256, i32 256, i32 800, i32 600)
ret void
}

LLVM IR (-O2):
define void @displaybackground(i32 %0) {
%2 = tail call i32 @drawbackground(i32 %0, i32 0, i32 0, i32 256, i32 256, i32 800, i32 600)
%3 = add nsw i32 %0, 1
%4 = tail call i32 @drawbackground(i32 %3, i32 256, i32 0, i32 256, i32 256, i32 800, i32 600)
%5 = add nsw i32 %0, 2
%6 = tail call i32 @drawbackground(i32 %5, i32 512, i32 0, i32 256, i32 256, i32 800, i32 600)
%7 = add nsw i32 %0, 3
%8 = tail call i32 @drawbackground(i32 %7, i32 768, i32 0, i32 256, i32 256, i32 800, i32 600)
%9 = add nsw i32 %0, 4
%10 = tail call i32 @drawbackground(i32 %9, i32 0, i32 256, i32 256, i32 256, i32 800, i32 600)
%11 = add nsw i32 %0, 5
%12 = tail call i32 @drawbackground(i32 %11, i32 256, i32 256, i32 256, i32 256, i32 800, i32 600)
%13 = add nsw i32 %0, 6
%14 = tail call i32 @drawbackground(i32 %13, i32 512, i32 256, i32 256, i32 256, i32 800, i32 600)
%15 = add nsw i32 %0, 7
%16 = tail call i32 @drawbackground(i32 %15, i32 768, i32 256, i32 256, i32 256, i32 800, i32 600)
%17 = add nsw i32 %0, 8
%18 = tail call i32 @drawbackground(i32 %17, i32 0, i32 512, i32 256, i32 256, i32 800, i32 600)
%19 = add nsw i32 %0, 9
%20 = tail call i32 @drawbackground(i32 %19, i32 256, i32 512, i32 256, i32 256, i32 800, i32 600)
%21 = add nsw i32 %0, 10
%22 = tail call i32 @drawbackground(i32 %21, i32 512, i32 512, i32 256, i32 256, i32 800, i32 600)
%23 = add nsw i32 %0, 11
%24 = tail call i32 @drawbackground(i32 %23, i32 768, i32 512, i32 256, i32 256, i32 800, i32 600)
ret void
}