#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*/ set_pixel_xy_rgb8(int /*<<< orphan*/, int /*<<< orphan*/,
                                     int /*<<< orphan*/, int /*<<< orphan*/,
                                     int, int);
void set_screen_blk(void) {
  int ix, iy;
  for (iy = 0; iy < 4; iy++) {
    for (ix = 0; ix < 24; ix++) {
      set_pixel_xy_rgb8(0, 0, 0, 0, ix, iy);
    }
  }
}


x86 assembly (clang, -O0):
<set_screen_blk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    1170 <set_screen_blk+0x60>
movl   $0x0,-0x4(%rbp)
cmpl   $0x18,-0x4(%rbp)
jge    115d <set_screen_blk+0x4d>
mov    -0x4(%rbp),%r8d
mov    -0x8(%rbp),%r9d
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <set_pixel_xy_rgb8@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1130 <set_screen_blk+0x20>
jmp    1162 <set_screen_blk+0x52>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <set_screen_blk+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_screen_blk>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %ebx,%r8d
xor    %r9d,%r9d
call   1030 <set_pixel_xy_rgb8@plt>
add    $0x1,%ebx
cmp    $0x18,%ebx
jne    1120 <set_screen_blk+0x10>
xor    %ebx,%ebx
nopl   (%rax)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %ebx,%r8d
mov    $0x1,%r9d
call   1030 <set_pixel_xy_rgb8@plt>
add    $0x1,%ebx
cmp    $0x18,%ebx
jne    1140 <set_screen_blk+0x30>
xor    %ebx,%ebx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %ebx,%r8d
mov    $0x2,%r9d
call   1030 <set_pixel_xy_rgb8@plt>
add    $0x1,%ebx
cmp    $0x18,%ebx
jne    1160 <set_screen_blk+0x50>
xor    %ebx,%ebx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %ebx,%r8d
mov    $0x3,%r9d
call   1030 <set_pixel_xy_rgb8@plt>
add    $0x1,%ebx
cmp    $0x18,%ebx
jne    1180 <set_screen_blk+0x70>
pop    %rbx
ret

LLVM IR (-O0):
define void @set_screen_blk() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %18, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 4
br i1 %5, label %6, label %21
6: ; preds = %3
store i32 0, i32* %1
br label %7
7: ; preds = %14, %6
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 24
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = call i32 @set_pixel_xy_rgb8(i32 0, i32 0, i32 0, i32 0, i32 %11, i32 %12)
br label %14
14: ; preds = %10
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
br label %7
17: ; preds = %7
br label %18
18: ; preds = %17
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %3
21: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @set_screen_blk() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @set_pixel_xy_rgb8(i32 0, i32 0, i32 0, i32 0, i32 %2, i32 0)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 24
br i1 %5, label %6, label %1
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ 0, %1 ]
%8 = tail call i32 @set_pixel_xy_rgb8(i32 0, i32 0, i32 0, i32 0, i32 %7, i32 1)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, 24
br i1 %10, label %11, label %6
11: ; preds = %6, %11
%12 = phi i32 [ %14, %11 ], [ 0, %6 ]
%13 = tail call i32 @set_pixel_xy_rgb8(i32 0, i32 0, i32 0, i32 0, i32 %12, i32 2)
%14 = add nuw nsw i32 %12, 1
%15 = icmp eq i32 %14, 24
br i1 %15, label %16, label %11
16: ; preds = %11, %16
%17 = phi i32 [ %19, %16 ], [ 0, %11 ]
%18 = tail call i32 @set_pixel_xy_rgb8(i32 0, i32 0, i32 0, i32 0, i32 %17, i32 3)
%19 = add nuw nsw i32 %17, 1
%20 = icmp eq i32 %19, 24
br i1 %20, label %21, label %16
21: ; preds = %16
ret void
}