#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 left_margin;
  int right_margin;
  int hsync_len;
  int upper_margin;
  int lower_margin;
  int vsync_len;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_var(struct fb_var_screeninfo *var) {
  printf("====================\n");
  printf("left_margin(HBP): \t%d\n", var->left_margin);
  printf("right_margin(HFP): \t%d\n", var->right_margin);
  printf("hsync_len(HSW): \t%d\n", var->hsync_len);
  printf("upper_margin(VBP): \t%d\n", var->upper_margin);
  printf("lower_margin(VFP): \t%d\n", var->lower_margin);
  printf("vsync_len(VSW): \t%d\n", var->vsync_len);
  printf("====================\n");
}


x86 assembly (clang, -O0):
<print_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%esi
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%esi
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%esi
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_var>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xf5b(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
mov    (%rbx),%esi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rbx),%esi
lea    0xec7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%esi
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rbx),%esi
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%esi
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rbx),%esi
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
%struct.fb_var_screeninfo = type { i32, i32, i32, i32, i32, i32 }
@.str = [22 x i8] c"====================\0A\00"
@.str.1 = [23 x i8] c"left_margin(HBP): \09%d\0A\00"
@.str.2 = [24 x i8] c"right_margin(HFP): \09%d\0A\00"
@.str.3 = [21 x i8] c"hsync_len(HSW): \09%d\0A\00"
@.str.4 = [24 x i8] c"upper_margin(VBP): \09%d\0A\00"
@.str.5 = [24 x i8] c"lower_margin(VFP): \09%d\0A\00"
@.str.6 = [21 x i8] c"vsync_len(VSW): \09%d\0A\00"
define void @print_var(%struct.fb_var_screeninfo* %0) {
%2 = alloca %struct.fb_var_screeninfo*
store %struct.fb_var_screeninfo* %0, %struct.fb_var_screeninfo** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %2
%5 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %2
%9 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %8, i32 0, i32 1
%10 = load i32, i32* %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %2
%13 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %12, i32 0, i32 2
%14 = load i32, i32* %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%16 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %2
%17 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %16, i32 0, i32 3
%18 = load i32, i32* %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %18)
%20 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %2
%21 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %20, i32 0, i32 4
%22 = load i32, i32* %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %22)
%24 = load %struct.fb_var_screeninfo*, %struct.fb_var_screeninfo** %2
%25 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %24, i32 0, i32 5
%26 = load i32, i32* %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.fb_var_screeninfo = type { i32, i32, i32, i32, i32, i32 }
@.str.1 = [23 x i8] c"left_margin(HBP): \09%d\0A\00"
@.str.2 = [24 x i8] c"right_margin(HFP): \09%d\0A\00"
@.str.3 = [21 x i8] c"hsync_len(HSW): \09%d\0A\00"
@.str.4 = [24 x i8] c"upper_margin(VBP): \09%d\0A\00"
@.str.5 = [24 x i8] c"lower_margin(VFP): \09%d\0A\00"
@.str.6 = [21 x i8] c"vsync_len(VSW): \09%d\0A\00"
@str.7 = [21 x i8] c"====================\00"
define void @print_var(%struct.fb_var_screeninfo* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.7, i64 0, i64 0))
%3 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %0, i64 0, i32 1
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %0, i64 0, i32 2
%10 = load i32, i32* %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %0, i64 0, i32 3
%13 = load i32, i32* %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %0, i64 0, i32 4
%16 = load i32, i32* %15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds %struct.fb_var_screeninfo, %struct.fb_var_screeninfo* %0, i64 0, i32 5
%19 = load i32, i32* %18
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i32 %19)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.7, i64 0, i64 0))
ret void
}