#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 xres_virtual;
  int yres_virtual;
  int xoffset;
  int yoffset;
  int bits_per_pixel;
};
struct fb_fix_screeninfo {
  int line_length;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void dumpinfo(struct fb_fix_screeninfo *fi, struct fb_var_screeninfo *vi) {
  fprintf(stderr, "vi.xres = %d\n", vi->xres);
  fprintf(stderr, "vi.yres = %d\n", vi->yres);
  fprintf(stderr, "vi.xresv = %d\n", vi->xres_virtual);
  fprintf(stderr, "vi.yresv = %d\n", vi->yres_virtual);
  fprintf(stderr, "vi.xoff = %d\n", vi->xoffset);
  fprintf(stderr, "vi.yoff = %d\n", vi->yoffset);
  fprintf(stderr, "vi.bits_per_pixel = %d\n", vi->bits_per_pixel);
  fprintf(stderr, "fi.line_length = %d\n", fi->line_length);
}


x86 assembly (clang, -O0):
<dumpinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%edx
lea    0xeae(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%edx
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%edx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%edx
lea    0xe86(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%edx
lea    0xe78(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2df6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xe75(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpinfo>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x2ebe(%rip),%r15
mov    (%r15),%edi
mov    (%rsi),%edx
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    0x4(%rbx),%edx
lea    0xece(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    0x8(%rbx),%edx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    0xc(%rbx),%edx
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    0x10(%rbx),%edx
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    0x14(%rbx),%edx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    0x18(%rbx),%edx
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    (%r14),%edx
lea    0xec2(%rip),%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
%struct.fb_fix_screeninfo = type { i32 }
%struct.fb_var_screeninfo = type { i32, i32, i32, i32, i32, i32, i32 }
@stderr = global i32 0
@.str = [14 x i8] c"vi.xres = %d\0A\00"
@.str.1 = [14 x i8] c"vi.yres = %d\0A\00"
@.str.2 = [15 x i8] c"vi.xresv = %d\0A\00"
@.str.3 = [15 x i8] c"vi.yresv = %d\0A\00"
@.str.4 = [14 x i8] c"vi.xoff = %d\0A\00"
@.str.5 = [14 x i8] c"vi.yoff = %d\0A\00"
@.str.6 = [24 x i8] c"vi.bits_per_pixel = %d\0A\00"
@.str.7 = [21 x i8] c"fi.line_length = %d\0A\00"
define void @dumpinfo(%struct.fb_fix_screeninfo* %0, %struct.fb_var_screeninfo* %1) {
%3 = alloca %struct.fb_fix_screeninfo*
%4 = alloca %struct.fb_var_screeninfo*
store %struct.fb_fix_screeninfo* %0, %struct.fb_fix_screeninfo** %3
store %struct.fb_var_screeninfo* %1, %struct.fb_var_screeninfo** %4
%5 = load i32, i32* @stderr
%6 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %4
%7 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stderr
%11 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %4
%12 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %11, i32 0, i32 1
%13 = load i32, i32* %12
%14 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @stderr
%16 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %4
%17 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %16, i32 0, i32 2
%18 = load i32, i32* %17
%19 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = load i32, i32* @stderr
%21 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %4
%22 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %21, i32 0, i32 3
%23 = load i32, i32* %22
%24 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %23)
%25 = load i32, i32* @stderr
%26 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %4
%27 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %26, i32 0, i32 4
%28 = load i32, i32* %27
%29 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %28)
%30 = load i32, i32* @stderr
%31 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %4
%32 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %31, i32 0, i32 5
%33 = load i32, i32* %32
%34 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %33)
%35 = load i32, i32* @stderr
%36 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %4
%37 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %36, i32 0, i32 6
%38 = load i32, i32* %37
%39 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %38)
%40 = load i32, i32* @stderr
%41 = load %struct.fb_fix_screeninfo*, %struct.fb_fix_screeninfo** %3
%42 = getelementptr inbounds %struct.fb_fix_screeninfo, %struct.fb_fix_screeninfo* %41, i32 0, i32 0
%43 = load i32, i32* %42
%44 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %43)
ret void
}

LLVM IR (-O2):
%struct.fb_fix_screeninfo = type { i32 }
%struct.fb_var_screeninfo = type { i32, i32, i32, i32, i32, i32, i32 }
@stderr = global i32 0
@.str = [14 x i8] c"vi.xres = %d\0A\00"
@.str.1 = [14 x i8] c"vi.yres = %d\0A\00"
@.str.2 = [15 x i8] c"vi.xresv = %d\0A\00"
@.str.3 = [15 x i8] c"vi.yresv = %d\0A\00"
@.str.4 = [14 x i8] c"vi.xoff = %d\0A\00"
@.str.5 = [14 x i8] c"vi.yoff = %d\0A\00"
@.str.6 = [24 x i8] c"vi.bits_per_pixel = %d\0A\00"
@.str.7 = [21 x i8] c"fi.line_length = %d\0A\00"
define void @dumpinfo(%struct.fb_fix_screeninfo* nocapture %0, %struct.fb_var_screeninfo* nocapture %1) {
%3 = load i32, i32* @stderr
%4 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stderr
%8 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @stderr
%12 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 2
%13 = load i32, i32* %12
%14 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load i32, i32* @stderr
%16 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 3
%17 = load i32, i32* %16
%18 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @stderr
%20 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 4
%21 = load i32, i32* %20
%22 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @stderr
%24 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 5
%25 = load i32, i32* %24
%26 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %25)
%27 = load i32, i32* @stderr
%28 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %1, i64 0, i32 6
%29 = load i32, i32* %28
%30 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %29)
%31 = load i32, i32* @stderr
%32 = getelementptr inbounds %struct.fb_fix_screeninfo, %struct.fb_fix_screeninfo* %0, i64 0, i32 0
%33 = load i32, i32* %32
%34 = tail call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %33)
ret void
}