#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 */
struct fb_var_screeninfo {
  int smem_len;
  int line_length;
  int xres;
  int yres;
  int bits_per_pixel;
};
struct fb_fix_screeninfo {
  int smem_len;
  int line_length;
  int xres;
  int yres;
  int bits_per_pixel;
};

/* Variables and functions */
int /*<<< orphan*/ FBIOGET_FSCREENINFO;
int /*<<< orphan*/ FBIOGET_VSCREENINFO;
int /*<<< orphan*/ MAP_SHARED;
int /*<<< orphan*/ O_RDWR;
int PROT_READ;
int PROT_WRITE;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
scalar_t__ ioctl(int, int /*<<< orphan*/, struct fb_var_screeninfo *);
scalar_t__ mmap(int /*<<< orphan*/, long, int, int /*<<< orphan*/, int,
                int /*<<< orphan*/);
int /*<<< orphan*/ munmap(char *, long);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int ret, fd, i, j, x, y;
  struct fb_var_screeninfo vinfo;
  struct fb_fix_screeninfo finfo;
  char read_data[32];
  char write_data[32];
  char offset;
  char *fbp = 0;
  long screensize = 0;
  long location = 0;
  printf("Hello world\n");
  fd = open("/dev/fb0", O_RDWR);
  if (fd < 0) {
    printf("Error : Can not open framebuffer device\n");
    exit(1);
  }
  if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo)) {
    printf("Error reading fixed information\n");
    exit(2);
  }
  if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo)) {
    printf("Error reading variable information\n");
    exit(3);
  }
  printf("The mem is :%d\n", finfo.smem_len);
  printf("The line_length is :%d\n", finfo.line_length);
  printf("The xres is :%d\n", vinfo.xres);
  printf("The yres is :%d\n", vinfo.yres);
  printf("bits_per_pixel is :%d\n", vinfo.bits_per_pixel);
  screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8;
  fbp = (char *)mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
  if ((int)fbp == -1) {
    printf("Error: failed to map framebuffer device to memory\n");
    exit(4);
  }
  x = 240;
  y = 130;
  location = x * (vinfo.bits_per_pixel / 8) + y * finfo.line_length;
  *(fbp + location) = 100;
  *(fbp + location + 1) = 15;
  *(fbp + location + 2) = 200;
  *(fbp + location + 3) = 0;
  munmap(fbp, screensize);
  close(fd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movq   $0x0,-0xa0(%rbp)
movq   $0x0,-0xa8(%rbp)
movq   $0x0,-0xb0(%rbp)
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%esi
lea    0xe53(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    11e4 <main+0x74>
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x8(%rbp),%edi
mov    0x2dda(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
call   1050 <ioctl@plt>
cmp    $0x0,%rax
je     121b <main+0xab>
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x2,%edi
call   1090 <exit@plt>
mov    -0x8(%rbp),%edi
mov    0x2d93(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1050 <ioctl@plt>
cmp    $0x0,%rax
je     1252 <main+0xe2>
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3,%edi
call   1090 <exit@plt>
mov    -0x48(%rbp),%esi
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x44(%rbp),%esi
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%eax
imul   -0x24(%rbp),%eax
imul   -0x20(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cltq
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rsi
mov    0x2d27(%rip),%rax
mov    (%rax),%edx
mov    0x2ce6(%rip),%rax
or     (%rax),%edx
mov    0x2d05(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%r8d
xor    %r9d,%r9d
mov    %r9d,%edi
call   1030 <mmap@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
cmp    $0xffffffff,%eax
jne    1323 <main+0x1b3>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x4,%edi
call   1090 <exit@plt>
movl   $0xf0,-0x14(%rbp)
movl   $0x82,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x20(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xb4(%rbp),%eax
imul   %ecx,%eax
mov    -0x18(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    %ecx,%eax
cltq
mov    %rax,-0xb0(%rbp)
mov    -0xa0(%rbp),%rax
mov    -0xb0(%rbp),%rcx
movb   $0x64,(%rax,%rcx,1)
mov    -0xa0(%rbp),%rax
mov    -0xb0(%rbp),%rcx
movb   $0xf,0x1(%rax,%rcx,1)
mov    -0xa0(%rbp),%rax
mov    -0xb0(%rbp),%rcx
movb   $0xc8,0x2(%rax,%rcx,1)
mov    -0xa0(%rbp),%rax
mov    -0xb0(%rbp),%rcx
movb   $0x0,0x3(%rax,%rcx,1)
mov    -0xa0(%rbp),%rdi
mov    -0xa8(%rbp),%rsi
call   1070 <munmap@plt>
mov    -0x8(%rbp),%edi
call   1060 <close@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x38,%rsp
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%esi
lea    0xe5e(%rip),%rdi
call   1090 <open@plt>
test   %eax,%eax
js     12e5 <main+0x165>
mov    %eax,%ebp
mov    0x2e10(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
mov    %ebp,%edi
call   1060 <ioctl@plt>
test   %rax,%rax
jne    12fb <main+0x17b>
mov    0x2de2(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    %ebp,%edi
call   1060 <ioctl@plt>
test   %rax,%rax
jne    1311 <main+0x191>
mov    0x20(%rsp),%esi
lea    0xe11(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x24(%rsp),%esi
lea    0xe0f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%esi
lea    0xe15(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%esi
lea    0xe14(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rsp),%esi
lea    0xe13(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%eax
imul   0x10(%rsp),%eax
imul   0x18(%rsp),%eax
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
sar    $0x3,%ecx
movslq %ecx,%rbx
mov    0x2d8e(%rip),%rax
mov    0x2d4f(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x2d6c(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
mov    %rbx,%rsi
mov    %ebp,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
cmp    $0xffffffff,%eax
je     1327 <main+0x1a7>
mov    0x18(%rsp),%ecx
lea    0x7(%rcx),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
sar    $0x3,%edx
movslq %edx,%rcx
imul   $0xf0,%rcx,%rcx
movslq 0x24(%rsp),%rdx
mov    %rdx,%rsi
shl    $0x7,%rsi
lea    (%rsi,%rdx,2),%rdx
add    %rcx,%rdx
movl   $0xc80f64,(%rax,%rdx,1)
mov    %rax,%rdi
mov    %rbx,%rsi
call   1080 <munmap@plt>
mov    %ebp,%edi
call   1070 <close@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xdff(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    0xdc9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   10a0 <exit@plt>
lea    0xd90(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   10a0 <exit@plt>
lea    0xd48(%rip),%rdi
call   1030 <puts@plt>
mov    $0x4,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
%struct.fb_var_screeninfo = type { i32, i32, i32, i32, i32 }
%struct.fb_fix_screeninfo = type { i32, i32, i32, i32, i32 }
@.str = [13 x i8] c"Hello world\0A\00"
@.str.1 = [9 x i8] c"/dev/fb0\00"
@O_RDWR = global i32 0
@.str.2 = [41 x i8] c"Error : Can not open framebuffer device\0A\00"
@FBIOGET_FSCREENINFO = global i32 0
@.str.3 = [33 x i8] c"Error reading fixed information\0A\00"
@FBIOGET_VSCREENINFO = global i32 0
@.str.4 = [36 x i8] c"Error reading variable information\0A\00"
@.str.5 = [16 x i8] c"The mem is :%d\0A\00"
@.str.6 = [24 x i8] c"The line_length is :%d\0A\00"
@.str.7 = [17 x i8] c"The xres is :%d\0A\00"
@.str.8 = [17 x i8] c"The yres is :%d\0A\00"
@.str.9 = [23 x i8] c"bits_per_pixel is :%d\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@.str.10 = [51 x i8] c"Error: failed to map framebuffer device to memory\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.fb_var_screeninfo
%8 = alloca %struct.fb_fix_screeninfo
%9 = alloca [32 x i8]
%10 = alloca [32 x i8]
%11 = alloca i8
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i64
store i8* null, i8** %12
store i64 0, i64* %13
store i64 0, i64* %14
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @O_RDWR
%17 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %16)
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %0
%24 = load i32, i32* %2
%25 = load i32, i32* @FBIOGET_FSCREENINFO
%26 = bitcast %struct.fb_fix_screeninfo* %8 to %struct.fb_var_screeninfo*
%27 = call i64 @ioctl(i32 %24, i32 %25, %struct.fb_var_screeninfo* %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %23
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%31 = call i32 @exit(i32 2)
unreachable
32: ; preds = %23
%33 = load i32, i32* %2
%34 = load i32, i32* @FBIOGET_VSCREENINFO
%35 = call i64 @ioctl(i32 %33, i32 %34, %struct.fb_var_screeninfo* %7)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %32
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%39 = call i32 @exit(i32 3)
unreachable
40: ; preds = %32
%41 = getelementptr inbounds %struct.fb_fix_screeninfo, %struct.fb_fix_screeninfo* %8, i32 0, i32 0
%42 = load i32, i32* %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %42)
%44 = getelementptr inbounds %struct.fb_fix_screeninfo, %struct.fb_fix_screeninfo* %8, i32 0, i32 1
%45 = load i32, i32* %44
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 2
%48 = load i32, i32* %47
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %48)
%50 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 3
%51 = load i32, i32* %50
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %51)
%53 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 4
%54 = load i32, i32* %53
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %54)
%56 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 2
%57 = load i32, i32* %56
%58 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 3
%59 = load i32, i32* %58
%60 = mul nsw i32 %57, %59
%61 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 4
%62 = load i32, i32* %61
%63 = mul nsw i32 %60, %62
%64 = sdiv i32 %63, 8
%65 = sext i32 %64 to i64
store i64 %65, i64* %13
%66 = load i64, i64* %13
%67 = load i32, i32* @PROT_READ
%68 = load i32, i32* @PROT_WRITE
%69 = or i32 %67, %68
%70 = load i32, i32* @MAP_SHARED
%71 = load i32, i32* %2
%72 = call i64 @mmap(i32 0, i64 %66, i32 %69, i32 %70, i32 %71, i32 0)
%73 = inttoptr i64 %72 to i8*
store i8* %73, i8** %12
%74 = load i8*, i8** %12
%75 = ptrtoint i8* %74 to i32
%76 = icmp eq i32 %75, -1
br i1 %76, label %77, label %80
77: ; preds = %40
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0))
%79 = call i32 @exit(i32 4)
unreachable
80: ; preds = %40
store i32 240, i32* %5
store i32 130, i32* %6
%81 = load i32, i32* %5
%82 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 4
%83 = load i32, i32* %82
%84 = sdiv i32 %83, 8
%85 = mul nsw i32 %81, %84
%86 = load i32, i32* %6
%87 = getelementptr inbounds %struct.fb_fix_screeninfo, %struct.fb_fix_screeninfo* %8, i32 0, i32 1
%88 = load i32, i32* %87
%89 = mul nsw i32 %86, %88
%90 = add nsw i32 %85, %89
%91 = sext i32 %90 to i64
store i64 %91, i64* %14
%92 = load i8*, i8** %12
%93 = load i64, i64* %14
%94 = getelementptr inbounds i8, i8* %92, i64 %93
store i8 100, i8* %94
%95 = load i8*, i8** %12
%96 = load i64, i64* %14
%97 = getelementptr inbounds i8, i8* %95, i64 %96
%98 = getelementptr inbounds i8, i8* %97, i64 1
store i8 15, i8* %98
%99 = load i8*, i8** %12
%100 = load i64, i64* %14
%101 = getelementptr inbounds i8, i8* %99, i64 %100
%102 = getelementptr inbounds i8, i8* %101, i64 2
store i8 -56, i8* %102
%103 = load i8*, i8** %12
%104 = load i64, i64* %14
%105 = getelementptr inbounds i8, i8* %103, i64 %104
%106 = getelementptr inbounds i8, i8* %105, i64 3
store i8 0, i8* %106
%107 = load i8*, i8** %12
%108 = load i64, i64* %13
%109 = call i32 @munmap(i8* %107, i64 %108)
%110 = load i32, i32* %2
%111 = call i32 @close(i32 %110)
ret i32 0
}

LLVM IR (-O2):
%struct.fb_var_screeninfo = type { i32, i32, i32, i32, i32 }
%struct.fb_fix_screeninfo = type { i32, i32, i32, i32, i32 }
@.str.1 = [9 x i8] c"/dev/fb0\00"
@O_RDWR = global i32 0
@FBIOGET_FSCREENINFO = global i32 0
@FBIOGET_VSCREENINFO = global i32 0
@.str.5 = [16 x i8] c"The mem is :%d\0A\00"
@.str.6 = [24 x i8] c"The line_length is :%d\0A\00"
@.str.7 = [17 x i8] c"The xres is :%d\0A\00"
@.str.8 = [17 x i8] c"The yres is :%d\0A\00"
@.str.9 = [23 x i8] c"bits_per_pixel is :%d\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@str = [12 x i8] c"Hello world\00"
@str.11 = [50 x i8] c"Error: failed to map framebuffer device to memory\00"
@str.12 = [35 x i8] c"Error reading variable information\00"
@str.13 = [32 x i8] c"Error reading fixed information\00"
@str.14 = [40 x i8] c"Error : Can not open framebuffer device\00"
define i32 @main() {
%1 = alloca %struct.fb_var_screeninfo
%2 = alloca %struct.fb_fix_screeninfo
%3 = bitcast %struct.fb_var_screeninfo* %1 to i8*
%4 = bitcast %struct.fb_fix_screeninfo* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* @O_RDWR
%7 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.14, i64 0, i64 0))
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %0
%13 = load i32, i32* @FBIOGET_FSCREENINFO
%14 = bitcast %struct.fb_fix_screeninfo* %2 to %struct.fb_var_screeninfo*
%15 = call i64 @ioctl(i32 %7, i32 %13, %struct.fb_var_screeninfo* %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %12
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.13, i64 0, i64 0))
%19 = call i32 @exit(i32 2)
unreachable
20: ; preds = %12
%21 = load i32, i32* @FBIOGET_VSCREENINFO
%22 = call i64 @ioctl(i32 %7, i32 %21, %struct.fb_var_screeninfo* %1)
%23 = icmp eq i64 %22, 0
br i1 %23, label %27, label %24
24: ; preds = %20
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.12, i64 0, i64 0))
%26 = call i32 @exit(i32 3)
unreachable
27: ; preds = %20
%28 = getelementptr inbounds %struct.fb_fix_screeninfo, %struct.fb_fix_screeninfo* %2, i64 0, i32 0
%29 = load i32, i32* %28
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds %struct.fb_fix_screeninfo, %struct.fb_fix_screeninfo* %2, i64 0, i32 1
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 2
%35 = load i32, i32* %34
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %35)
%37 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 3
%38 = load i32, i32* %37
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 4
%41 = load i32, i32* %40
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %41)
%43 = load i32, i32* %34
%44 = load i32, i32* %37
%45 = mul nsw i32 %44, %43
%46 = load i32, i32* %40
%47 = mul nsw i32 %45, %46
%48 = sdiv i32 %47, 8
%49 = sext i32 %48 to i64
%50 = load i32, i32* @PROT_READ
%51 = load i32, i32* @PROT_WRITE
%52 = or i32 %51, %50
%53 = load i32, i32* @MAP_SHARED
%54 = call i64 @mmap(i32 0, i64 %49, i32 %52, i32 %53, i32 %7, i32 0)
%55 = inttoptr i64 %54 to i8*
%56 = trunc i64 %54 to i32
%57 = icmp eq i32 %56, -1
br i1 %57, label %58, label %61
58: ; preds = %27
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.11, i64 0, i64 0))
%60 = call i32 @exit(i32 4)
unreachable
61: ; preds = %27
%62 = load i32, i32* %40
%63 = sdiv i32 %62, 8
%64 = mul nsw i32 %63, 240
%65 = load i32, i32* %31
%66 = mul nsw i32 %65, 130
%67 = add nsw i32 %64, %66
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i8, i8* %55, i64 %68
store i8 100, i8* %69
%70 = getelementptr inbounds i8, i8* %69, i64 1
store i8 15, i8* %70
%71 = getelementptr inbounds i8, i8* %69, i64 2
store i8 -56, i8* %71
%72 = getelementptr inbounds i8, i8* %69, i64 3
store i8 0, i8* %72
%73 = call i32 @munmap(i8* %55, i64 %49)
%74 = call i32 @close(i32 %7)
ret i32 0
}