#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ LCD_Write_DATA(char, char);
int /*<<< orphan*/ clrXY();
char fgetc(int /*<<< orphan*/ *);
void dispBitmap(FILE *fp) {
  char VH, VL;
  int i, j = 0;
  for (i = 0; i < 66; i++)
    fgetc(fp);
  for (i = 0; i < 320; i++)
    for (j = 0; j < 240; j++) {
      VL = fgetc(fp);
      VH = fgetc(fp);
      LCD_Write_DATA(VH, VL);
    }
  clrXY();
}


x86 assembly (clang, -O0):
<dispBitmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x42,-0x10(%rbp)
jge    116b <dispBitmap+0x3b>
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114a <dispBitmap+0x1a>
movl   $0x0,-0x10(%rbp)
cmpl   $0x140,-0x10(%rbp)
jge    11db <dispBitmap+0xab>
movl   $0x0,-0x14(%rbp)
cmpl   $0xf0,-0x14(%rbp)
jge    11c8 <dispBitmap+0x98>
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
movsbl %al,%edi
movsbl -0xa(%rbp),%esi
call   1040 <LCD_Write_DATA@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1186 <dispBitmap+0x56>
jmp    11cd <dispBitmap+0x9d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1172 <dispBitmap+0x42>
mov    $0x0,%al
call   1050 <clrXY@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dispBitmap>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x42,%ebx
nop
mov    %r14,%rdi
call   1030 <fgetc@plt>
add    $0xffffffff,%ebx
jne    1140 <dispBitmap+0x10>
xor    %r15d,%r15d
mov    $0xf0,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <fgetc@plt>
movsbl %bl,%esi
movsbl %al,%edi
call   1040 <LCD_Write_DATA@plt>
add    $0xffffffff,%ebp
jne    1160 <dispBitmap+0x30>
add    $0x1,%r15d
cmp    $0x140,%r15d
jne    1150 <dispBitmap+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <clrXY@plt>

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

LLVM IR (-O2):
define void @dispBitmap(i32* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %5, %2 ]
%4 = tail call signext i8 @fgetc(i32* %0)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 66
br i1 %6, label %7, label %2
7: ; preds = %2, %16
%8 = phi i32 [ %17, %16 ], [ 0, %2 ]
br label %9
9: ; preds = %7, %9
%10 = phi i32 [ 0, %7 ], [ %14, %9 ]
%11 = tail call signext i8 @fgetc(i32* %0)
%12 = tail call signext i8 @fgetc(i32* %0)
%13 = tail call i32 @LCD_Write_DATA(i8 signext %12, i8 signext %11)
%14 = add nuw nsw i32 %10, 1
%15 = icmp eq i32 %14, 240
br i1 %15, label %16, label %9
16: ; preds = %9
%17 = add nuw nsw i32 %8, 1
%18 = icmp eq i32 %17, 320
br i1 %18, label %19, label %7
19: ; preds = %16
%20 = tail call i32 (...) @clrXY()
ret void
}