#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 xres;
  int yres;
  int bits_per_pixel;
  int width;
  int height;
  int xres_virtual;
  int yres_virtual;
  scalar_t__ yoffset;
  scalar_t__ xoffset;
};

/* Variables and functions */
int /*<<< orphan*/ FBIOGET_VSCREENINFO;
int /*<<< orphan*/ FBIOPUT_VSCREENINFO;
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, ...);
scalar_t__ ioctl(int, int /*<<< orphan*/, struct fb_var_screeninfo *);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int print_usage(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  int fd;
  struct fb_var_screeninfo fbdata;
  int new_width, new_height, new_vheight, new_bpp;
  if (argc < 2)
    return print_usage(argv[0]);
  if (!strcmp(argv[1], "-l")) {
    new_width = 320;
    new_height = 240;
    new_vheight = new_height * 2;
    new_bpp = 16;
  } else if (!strcmp(argv[1], "-n")) {
    new_width = 720;
    new_height = 480;
    new_vheight = new_height;
    new_bpp = 16;
  } else if (!strcmp(argv[1], "-p")) {
    new_width = 720;
    new_height = 576;
    new_vheight = new_height;
    new_bpp = 16;
  } else {
    return print_usage(argv[0]);
  }
  fd = open("/dev/fb0", O_RDWR);
  if (fd <= 0) {
    perror("Unable to open framebuffer");
    return 1;
  }
  if (ioctl(fd, FBIOGET_VSCREENINFO, &fbdata)) {
    perror("Unable to call FBIOGET_VSCREENINFO");
    return 1;
  }
  fprintf(stderr, "current x and y res is: %d %d\n", fbdata.xres, fbdata.yres);
  fprintf(stderr, "current bits per pixel: %d\n", fbdata.bits_per_pixel);
  fprintf(stderr, "current width and height defined as : %d %d\n", fbdata.width,
          fbdata.height);
  fbdata.xres = new_width;
  fbdata.yres = new_height;
  fbdata.width = new_width;
  fbdata.height = new_height;
  fbdata.xres_virtual = new_width;
  fbdata.yres_virtual = new_vheight;
  fbdata.xoffset = 0;
  fbdata.yoffset = 0;
  fbdata.bits_per_pixel = new_bpp;
  if (ioctl(fd, FBIOPUT_VSCREENINFO, &fbdata) != 0) {
    perror("Unable to FBIOPUT_VSCREENINFO");
    return 1;
  }
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11a4 <main+0x34>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1090 <print_usage@plt>
mov    %eax,-0x4(%rbp)
jmp    13c1 <main+0x251>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe4d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11e4 <main+0x74>
movl   $0x140,-0x4c(%rbp)
movl   $0xf0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x54(%rbp)
movl   $0x10,-0x58(%rbp)
jmp    127c <main+0x10c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe10(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1221 <main+0xb1>
movl   $0x2d0,-0x4c(%rbp)
movl   $0x1e0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x54(%rbp)
movl   $0x10,-0x58(%rbp)
jmp    1277 <main+0x107>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdd6(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    125e <main+0xee>
movl   $0x2d0,-0x4c(%rbp)
movl   $0x240,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x54(%rbp)
movl   $0x10,-0x58(%rbp)
jmp    1272 <main+0x102>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1090 <print_usage@plt>
mov    %eax,-0x4(%rbp)
jmp    13c1 <main+0x251>
jmp    1277 <main+0x107>
jmp    127c <main+0x10c>
mov    0x2d65(%rip),%rax
mov    (%rax),%esi
lea    0xd7d(%rip),%rdi
call   1070 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     12b6 <main+0x146>
lea    0xd6d(%rip),%rdi
call   1080 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    13c1 <main+0x251>
mov    -0x14(%rbp),%edi
mov    0x2d08(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
je     12ed <main+0x17d>
lea    0xd51(%rip),%rdi
call   1080 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    13c1 <main+0x251>
mov    0x2cdc(%rip),%rax
mov    (%rax),%edi
mov    -0x48(%rbp),%edx
mov    -0x44(%rbp),%ecx
lea    0xd4d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2cbf(%rip),%rax
mov    (%rax),%edi
mov    -0x40(%rbp),%edx
lea    0xd52(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2ca5(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%edx
mov    -0x38(%rbp),%ecx
lea    0xd51(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x30(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2c5b(%rip),%rax
mov    (%rax),%esi
lea    -0x48(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
je     13b2 <main+0x242>
lea    0xd17(%rip),%rdi
call   1080 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    13c1 <main+0x251>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbx
cmp    $0x1,%edi
jg     119c <main+0x2c>
mov    (%rbx),%rdi
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <print_usage@plt>
mov    0x8(%rbx),%rbp
lea    0xe59(%rip),%rsi
mov    %rbp,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     11ed <main+0x7d>
lea    0xe49(%rip),%rsi
mov    %rbp,%rdi
call   1050 <strcmp@plt>
mov    $0x2d0,%r14d
test   %eax,%eax
je     1201 <main+0x91>
lea    0xe33(%rip),%rsi
mov    %rbp,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    1186 <main+0x16>
mov    $0x240,%r13d
mov    $0x240,%r12d
jmp    120d <main+0x9d>
mov    $0x1e0,%r12d
mov    $0xf0,%r13d
mov    $0x140,%r14d
jmp    120d <main+0x9d>
mov    $0x1e0,%r13d
mov    $0x1e0,%r12d
mov    0x2dd4(%rip),%rax
mov    (%rax),%esi
lea    0xdec(%rip),%rdi
call   1070 <open@plt>
test   %eax,%eax
jle    12fc <main+0x18c>
mov    %eax,%ebx
mov    0x2d95(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    %ebx,%edi
call   1030 <ioctl@plt>
test   %rax,%rax
jne    1305 <main+0x195>
mov    0x2d7f(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x8(%rsp),%edx
mov    0xc(%rsp),%ecx
lea    0xded(%rip),%rsi
xor    %r15d,%r15d
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    0x10(%rsp),%edx
lea    0xdf4(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x0(%rbp),%edi
mov    0x14(%rsp),%edx
mov    0x18(%rsp),%ecx
lea    0xdf7(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %r14d,0x8(%rsp)
mov    %r13d,0xc(%rsp)
mov    %r14d,0x14(%rsp)
mov    %r13d,0x18(%rsp)
mov    %r14d,0x1c(%rsp)
mov    %r12d,0x20(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x28(%rsp)
movl   $0x10,0x10(%rsp)
mov    0x2d10(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    %ebx,%edi
call   1030 <ioctl@plt>
test   %rax,%rax
jne    130e <main+0x19e>
mov    %ebx,%edi
call   1040 <close@plt>
mov    %r15d,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd0f(%rip),%rdi
jmp    1315 <main+0x1a5>
lea    0xd21(%rip),%rdi
jmp    1315 <main+0x1a5>
lea    0xda3(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%r15d
jmp    12ea <main+0x17a>

LLVM IR (-O0):
%struct.fb_var_screeninfo = type { i32, i32, i32, i32, i32, i32, i32, i64, i64 }
@.str = [3 x i8] c"-l\00"
@.str.1 = [3 x i8] c"-n\00"
@.str.2 = [3 x i8] c"-p\00"
@.str.3 = [9 x i8] c"/dev/fb0\00"
@O_RDWR = global i32 0
@.str.4 = [27 x i8] c"Unable to open framebuffer\00"
@FBIOGET_VSCREENINFO = global i32 0
@.str.5 = [35 x i8] c"Unable to call FBIOGET_VSCREENINFO\00"
@stderr = global i32 0
@.str.6 = [31 x i8] c"current x and y res is: %d %d\0A\00"
@.str.7 = [28 x i8] c"current bits per pixel: %d\0A\00"
@.str.8 = [45 x i8] c"current width and height defined as : %d %d\0A\00"
@FBIOPUT_VSCREENINFO = global i32 0
@.str.9 = [30 x i8] c"Unable to FBIOPUT_VSCREENINFO\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.fb_var_screeninfo
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 2
br i1 %13, label %14, label %19
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 @print_usage(i8* %17)
store i32 %18, i32* %3
br label %107
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @strcmp(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %19
store i32 320, i32* %8
store i32 240, i32* %9
%26 = load i32, i32* %9
%27 = mul nsw i32 %26, 2
store i32 %27, i32* %10
store i32 16, i32* %11
br label %51
28: ; preds = %19
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32 @strcmp(i8* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%33 = icmp ne i32 %32, 0
br i1 %33, label %36, label %34
34: ; preds = %28
store i32 720, i32* %8
store i32 480, i32* %9
%35 = load i32, i32* %9
store i32 %35, i32* %10
store i32 16, i32* %11
br label %50
36: ; preds = %28
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 1
%39 = load i8*, i8** %38
%40 = call i32 @strcmp(i8* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%41 = icmp ne i32 %40, 0
br i1 %41, label %44, label %42
42: ; preds = %36
store i32 720, i32* %8
store i32 576, i32* %9
%43 = load i32, i32* %9
store i32 %43, i32* %10
store i32 16, i32* %11
br label %49
44: ; preds = %36
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 0
%47 = load i8*, i8** %46
%48 = call i32 @print_usage(i8* %47)
store i32 %48, i32* %3
br label %107
49: ; preds = %42
br label %50
50: ; preds = %49, %34
br label %51
51: ; preds = %50, %25
%52 = load i32, i32* @O_RDWR
%53 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %52)
store i32 %53, i32* %6
%54 = load i32, i32* %6
%55 = icmp sle i32 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %51
%57 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %3
br label %107
58: ; preds = %51
%59 = load i32, i32* %6
%60 = load i32, i32* @FBIOGET_VSCREENINFO
%61 = call i64 @ioctl(i32 %59, i32 %60, %struct.fb_var_screeninfo* %7)
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %58
%64 = call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %3
br label %107
65: ; preds = %58
%66 = load i32, i32* @stderr
%67 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 0
%68 = load i32, i32* %67
%69 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 1
%70 = load i32, i32* %69
%71 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %68, i32 %70)
%72 = load i32, i32* @stderr
%73 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 2
%74 = load i32, i32* %73
%75 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %74)
%76 = load i32, i32* @stderr
%77 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 3
%78 = load i32, i32* %77
%79 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 4
%80 = load i32, i32* %79
%81 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i32 %78, i32 %80)
%82 = load i32, i32* %8
%83 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 0
store i32 %82, i32* %83
%84 = load i32, i32* %9
%85 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 1
store i32 %84, i32* %85
%86 = load i32, i32* %8
%87 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 3
store i32 %86, i32* %87
%88 = load i32, i32* %9
%89 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 4
store i32 %88, i32* %89
%90 = load i32, i32* %8
%91 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 5
store i32 %90, i32* %91
%92 = load i32, i32* %10
%93 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 6
store i32 %92, i32* %93
%94 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 8
store i64 0, i64* %94
%95 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 7
store i64 0, i64* %95
%96 = load i32, i32* %11
%97 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %7, i32 0, i32 2
store i32 %96, i32* %97
%98 = load i32, i32* %6
%99 = load i32, i32* @FBIOPUT_VSCREENINFO
%100 = call i64 @ioctl(i32 %98, i32 %99, %struct.fb_var_screeninfo* %7)
%101 = icmp ne i64 %100, 0
br i1 %101, label %102, label %104
102: ; preds = %65
%103 = call i32 @perror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
store i32 1, i32* %3
br label %107
104: ; preds = %65
%105 = load i32, i32* %6
%106 = call i32 @close(i32 %105)
store i32 0, i32* %3
br label %107
107: ; preds = %104, %102, %63, %56, %44, %14
%108 = load i32, i32* %3
ret i32 %108
}

LLVM IR (-O2):
%struct.fb_var_screeninfo = type { i32, i32, i32, i32, i32, i32, i32, i64, i64 }
@.str = [3 x i8] c"-l\00"
@.str.1 = [3 x i8] c"-n\00"
@.str.2 = [3 x i8] c"-p\00"
@.str.3 = [9 x i8] c"/dev/fb0\00"
@O_RDWR = global i32 0
@.str.4 = [27 x i8] c"Unable to open framebuffer\00"
@FBIOGET_VSCREENINFO = global i32 0
@.str.5 = [35 x i8] c"Unable to call FBIOGET_VSCREENINFO\00"
@stderr = global i32 0
@.str.6 = [31 x i8] c"current x and y res is: %d %d\0A\00"
@.str.7 = [28 x i8] c"current bits per pixel: %d\0A\00"
@.str.8 = [45 x i8] c"current width and height defined as : %d %d\0A\00"
@FBIOPUT_VSCREENINFO = global i32 0
@.str.9 = [30 x i8] c"Unable to FBIOPUT_VSCREENINFO\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.fb_var_screeninfo
%4 = bitcast %struct.fb_var_screeninfo* %3 to i8*
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 @print_usage(i8* %7)
br label %66
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %11, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %23, label %14
14: ; preds = %9
%15 = tail call i32 @strcmp(i8* dereferenceable(1) %11, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %23, label %17
17: ; preds = %14
%18 = tail call i32 @strcmp(i8* dereferenceable(1) %11, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = load i8*, i8** %1
%22 = tail call i32 @print_usage(i8* %21)
br label %66
23: ; preds = %17, %14, %9
%24 = phi i32 [ 320, %9 ], [ 720, %14 ], [ 720, %17 ]
%25 = phi i32 [ 240, %9 ], [ 480, %14 ], [ 576, %17 ]
%26 = phi i32 [ 480, %9 ], [ 480, %14 ], [ 576, %17 ]
%27 = load i32, i32* @O_RDWR
%28 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %27)
%29 = icmp slt i32 %28, 1
br i1 %29, label %30, label %32
30: ; preds = %23
%31 = tail call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
br label %66
32: ; preds = %23
%33 = load i32, i32* @FBIOGET_VSCREENINFO
%34 = call i64 @ioctl(i32 %28, i32 %33, %struct.fb_var_screeninfo* %3)
%35 = icmp eq i64 %34, 0
br i1 %35, label %38, label %36
36: ; preds = %32
%37 = call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
br label %66
38: ; preds = %32
%39 = load i32, i32* @stderr
%40 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %3, i64 0, i32 0
%41 = load i32, i32* %40
%42 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %3, i64 0, i32 1
%43 = load i32, i32* %42
%44 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0), i32 %41, i32 %43)
%45 = load i32, i32* @stderr
%46 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %3, i64 0, i32 2
%47 = load i32, i32* %46
%48 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %47)
%49 = load i32, i32* @stderr
%50 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %3, i64 0, i32 3
%51 = load i32, i32* %50
%52 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %3, i64 0, i32 4
%53 = load i32, i32* %52
%54 = call i32 (i32, i8*, i32, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i32 %51, i32 %53)
store i32 %24, i32* %40
store i32 %25, i32* %42
store i32 %24, i32* %50
store i32 %25, i32* %52
%55 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %3, i64 0, i32 5
store i32 %24, i32* %55
%56 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %3, i64 0, i32 6
store i32 %26, i32* %56
%57 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %3, i64 0, i32 7
%58 = bitcast i64* %57 to i8*
store i32 16, i32* %46
%59 = load i32, i32* @FBIOPUT_VSCREENINFO
%60 = call i64 @ioctl(i32 %28, i32 %59, %struct.fb_var_screeninfo* %3)
%61 = icmp eq i64 %60, 0
br i1 %61, label %64, label %62
62: ; preds = %38
%63 = call i32 @perror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
br label %66
64: ; preds = %38
%65 = call i32 @close(i32 %28)
br label %66
66: ; preds = %64, %62, %36, %30, %20, %6
%67 = phi i32 [ %8, %6 ], [ %22, %20 ], [ 1, %30 ], [ 1, %36 ], [ 1, %62 ], [ 0, %64 ]
ret i32 %67
}