#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 */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int width;
  int height;
  int pixelformat;
  int sizeimage;
  int field;
  int bytesperline;
  int colorspace;
};
struct TYPE_4__ {
  TYPE_1__ pix;
};
struct v4l2_format {
  int type;
  TYPE_2__ fmt;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_format(struct v4l2_format *vid_format) {
  printf("	vid_format->type                =%d\n", vid_format->type);
  printf("	vid_format->fmt.pix.width       =%d\n",
         vid_format->fmt.pix.width);
  printf("	vid_format->fmt.pix.height      =%d\n",
         vid_format->fmt.pix.height);
  printf("	vid_format->fmt.pix.pixelformat =%d\n",
         vid_format->fmt.pix.pixelformat);
  printf("	vid_format->fmt.pix.sizeimage   =%d\n",
         vid_format->fmt.pix.sizeimage);
  printf("	vid_format->fmt.pix.field       =%d\n",
         vid_format->fmt.pix.field);
  printf("	vid_format->fmt.pix.bytesperline=%d\n",
         vid_format->fmt.pix.bytesperline);
  printf("	vid_format->fmt.pix.colorspace  =%d\n",
         vid_format->fmt.pix.colorspace);
}


x86 assembly (clang, -O0):
<print_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
lea    0xefd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%esi
lea    0xf10(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%esi
lea    0xf23(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%esi
lea    0xf36(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%esi
lea    0xf49(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%esi
lea    0xf5c(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_format>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rbx),%esi
lea    0xefa(%rip),%rdi
call   1030 <printf@plt>
mov    0x8(%rbx),%esi
lea    0xf11(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rbx),%esi
lea    0xf28(%rip),%rdi
call   1030 <printf@plt>
mov    0x10(%rbx),%esi
lea    0xf3f(%rip),%rdi
call   1030 <printf@plt>
mov    0x14(%rbx),%esi
lea    0xf56(%rip),%rdi
call   1030 <printf@plt>
mov    0x18(%rbx),%esi
lea    0xf6d(%rip),%rdi
call   1030 <printf@plt>
mov    0x1c(%rbx),%esi
lea    0xf84(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.v4l2_format = type { i32, %struct.TYPE_4__ }
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32, i32, i32 }
@.str = [38 x i8] c"\09vid_format->type =%d\0A\00"
@.str.1 = [38 x i8] c"\09vid_format->fmt.pix.width =%d\0A\00"
@.str.2 = [38 x i8] c"\09vid_format->fmt.pix.height =%d\0A\00"
@.str.3 = [38 x i8] c"\09vid_format->fmt.pix.pixelformat =%d\0A\00"
@.str.4 = [38 x i8] c"\09vid_format->fmt.pix.sizeimage =%d\0A\00"
@.str.5 = [38 x i8] c"\09vid_format->fmt.pix.field =%d\0A\00"
@.str.6 = [38 x i8] c"\09vid_format->fmt.pix.bytesperline=%d\0A\00"
@.str.7 = [38 x i8] c"\09vid_format->fmt.pix.colorspace =%d\0A\00"
define void @print_format(%struct.v4l2_format* %0) {
%2 = alloca %struct.v4l2_format*
store %struct.v4l2_format* %0, %struct.v4l2_format** %2
%3 = load %struct.v4l2_format*, %struct.v4l2_format** %2
%4 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load %struct.v4l2_format*, %struct.v4l2_format** %2
%8 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %7, i32 0, i32 1
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load %struct.v4l2_format*, %struct.v4l2_format** %2
%14 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %13, i32 0, i32 1
%15 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %14, i32 0, i32 0
%16 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %15, i32 0, i32 1
%17 = load i32, i32* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = load %struct.v4l2_format*, %struct.v4l2_format** %2
%20 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %19, i32 0, i32 1
%21 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %20, i32 0, i32 0
%22 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %21, i32 0, i32 2
%23 = load i32, i32* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 %23)
%25 = load %struct.v4l2_format*, %struct.v4l2_format** %2
%26 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %25, i32 0, i32 1
%27 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %26, i32 0, i32 0
%28 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %27, i32 0, i32 3
%29 = load i32, i32* %28
%30 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %29)
%31 = load %struct.v4l2_format*, %struct.v4l2_format** %2
%32 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %31, i32 0, i32 1
%33 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %32, i32 0, i32 0
%34 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %33, i32 0, i32 4
%35 = load i32, i32* %34
%36 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i32 %35)
%37 = load %struct.v4l2_format*, %struct.v4l2_format** %2
%38 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %37, i32 0, i32 1
%39 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %38, i32 0, i32 0
%40 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %39, i32 0, i32 5
%41 = load i32, i32* %40
%42 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 %41)
%43 = load %struct.v4l2_format*, %struct.v4l2_format** %2
%44 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %43, i32 0, i32 1
%45 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %44, i32 0, i32 0
%46 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %45, i32 0, i32 6
%47 = load i32, i32* %46
%48 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0), i32 %47)
ret void
}

LLVM IR (-O2):
%struct.v4l2_format = type { i32, %struct.TYPE_4__ }
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32, i32, i32 }
@.str = [38 x i8] c"\09vid_format->type =%d\0A\00"
@.str.1 = [38 x i8] c"\09vid_format->fmt.pix.width =%d\0A\00"
@.str.2 = [38 x i8] c"\09vid_format->fmt.pix.height =%d\0A\00"
@.str.3 = [38 x i8] c"\09vid_format->fmt.pix.pixelformat =%d\0A\00"
@.str.4 = [38 x i8] c"\09vid_format->fmt.pix.sizeimage =%d\0A\00"
@.str.5 = [38 x i8] c"\09vid_format->fmt.pix.field =%d\0A\00"
@.str.6 = [38 x i8] c"\09vid_format->fmt.pix.bytesperline=%d\0A\00"
@.str.7 = [38 x i8] c"\09vid_format->fmt.pix.colorspace =%d\0A\00"
define void @print_format(%struct.v4l2_format* nocapture %0) {
%2 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 1, i32 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 1, i32 0, i32 1
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 1, i32 0, i32 2
%12 = load i32, i32* %11
%13 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 1, i32 0, i32 3
%15 = load i32, i32* %14
%16 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%17 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 1, i32 0, i32 4
%18 = load i32, i32* %17
%19 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 1, i32 0, i32 5
%21 = load i32, i32* %20
%22 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 %21)
%23 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 1, i32 0, i32 6
%24 = load i32, i32* %23
%25 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0), i32 %24)
ret void
}