#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*/ FBLCD_SetPixel(unsigned int, unsigned int,
                                  int /*<<< orphan*/);
void FBLCD_DrawIcone(unsigned int x0, unsigned int y0, unsigned int xsz,
                     unsigned int ysz, const unsigned int *img) {
  unsigned int x, y;
  for (y = 0; y < ysz; y++) {
    for (x = 0; x < xsz; x++) {
      FBLCD_SetPixel(x0 + x, y0 + y, *img++);
    }
  }
}


x86 assembly (clang, -O0):
<FBLCD_DrawIcone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    1191 <FBLCD_DrawIcone+0x81>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    117e <FBLCD_DrawIcone+0x6e>
mov    -0x4(%rbp),%edi
add    -0x1c(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0x20(%rbp),%esi
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%edx
call   1030 <FBLCD_SetPixel@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1142 <FBLCD_DrawIcone+0x32>
jmp    1183 <FBLCD_DrawIcone+0x73>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112f <FBLCD_DrawIcone+0x1f>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FBLCD_DrawIcone>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,0x10(%rsp)
mov    %edi,0x8(%rsp)
mov    %ecx,0xc(%rsp)
test   %ecx,%ecx
je     118c <FBLCD_DrawIcone+0x7c>
mov    %r8,%rbx
mov    %edx,%r14d
xor    %r15d,%r15d
jmp    114b <FBLCD_DrawIcone+0x3b>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r15d
cmp    0xc(%rsp),%r15d
je     118c <FBLCD_DrawIcone+0x7c>
test   %r14d,%r14d
je     1140 <FBLCD_DrawIcone+0x30>
mov    0x10(%rsp),%rax
lea    (%r15,%rax,1),%ebp
mov    0x8(%rsp),%r12d
mov    %r14d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
add    $0x4,%rbx
mov    %r12d,%edi
mov    %ebp,%esi
call   1030 <FBLCD_SetPixel@plt>
add    $0x1,%r12d
add    $0xffffffff,%r13d
jne    1170 <FBLCD_DrawIcone+0x60>
jmp    1140 <FBLCD_DrawIcone+0x30>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @FBLCD_DrawIcone(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32* %4, i32** %10
store i32 0, i32* %12
br label %13
13: ; preds = %37, %5
%14 = load i32, i32* %12
%15 = load i32, i32* %9
%16 = icmp ult i32 %14, %15
br i1 %16, label %17, label %40
17: ; preds = %13
store i32 0, i32* %11
br label %18
18: ; preds = %33, %17
%19 = load i32, i32* %11
%20 = load i32, i32* %8
%21 = icmp ult i32 %19, %20
br i1 %21, label %22, label %36
22: ; preds = %18
%23 = load i32, i32* %6
%24 = load i32, i32* %11
%25 = add i32 %23, %24
%26 = load i32, i32* %7
%27 = load i32, i32* %12
%28 = add i32 %26, %27
%29 = load i32*, i32** %10
%30 = getelementptr inbounds i32, i32* %29, i32 1
store i32* %30, i32** %10
%31 = load i32, i32* %29
%32 = call i32 @FBLCD_SetPixel(i32 %25, i32 %28, i32 %31)
br label %33
33: ; preds = %22
%34 = load i32, i32* %11
%35 = add i32 %34, 1
store i32 %35, i32* %11
br label %18
36: ; preds = %18
br label %37
37: ; preds = %36
%38 = load i32, i32* %12
%39 = add i32 %38, 1
store i32 %39, i32* %12
br label %13
40: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @FBLCD_DrawIcone(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4) {
%6 = icmp eq i32 %3, 0
br i1 %6, label %27, label %7
7: ; preds = %5
%8 = icmp eq i32 %2, 0
br label %9
9: ; preds = %7, %23
%10 = phi i32 [ 0, %7 ], [ %25, %23 ]
%11 = phi i32* [ %4, %7 ], [ %24, %23 ]
br i1 %8, label %23, label %12
12: ; preds = %9
%13 = add i32 %10, %1
br label %14
14: ; preds = %12, %14
%15 = phi i32 [ 0, %12 ], [ %21, %14 ]
%16 = phi i32* [ %11, %12 ], [ %18, %14 ]
%17 = add i32 %15, %0
%18 = getelementptr inbounds i32, i32* %16, i64 1
%19 = load i32, i32* %16
%20 = tail call i32 @FBLCD_SetPixel(i32 %17, i32 %13, i32 %19)
%21 = add nuw i32 %15, 1
%22 = icmp eq i32 %21, %2
br i1 %22, label %23, label %14
23: ; preds = %14, %9
%24 = phi i32* [ %11, %9 ], [ %18, %14 ]
%25 = add nuw i32 %10, 1
%26 = icmp eq i32 %25, %3
br i1 %26, label %27, label %9
27: ; preds = %23, %5
ret void
}