#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_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int cmd_class;
  int cmd_select;
  int *input;
  int *output;
};
struct dell_wmi_smbios_buffer {
  TYPE_1__ std;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int, int, int, int,
                          int);
void show_buffer(struct dell_wmi_smbios_buffer *buffer) {
  printf("Call: %x/%x [%x,%x,%x,%x]\nResults: [%8x,%8x,%8x,%8x]\n",
         buffer->std.cmd_class, buffer->std.cmd_select, buffer->std.input[0],
         buffer->std.input[1], buffer->std.input[2], buffer->std.input[3],
         buffer->std.output[0], buffer->std.output[1], buffer->std.output[2],
         buffer->std.output[3]);
}


x86 assembly (clang, -O0):
<show_buffer>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x4(%rax),%r8d
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x8(%rax),%r9d
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    0xc(%rax),%r14d
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    (%rax),%ebx
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    0x4(%rax),%r11d
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    0x8(%rax),%r10d
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    0xc(%rax),%eax
lea    0xe72(%rip),%rdi
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_buffer>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
mov    0x8(%rdi),%rax
mov    (%rax),%ecx
mov    0x4(%rax),%r8d
mov    0x8(%rax),%r9d
mov    0xc(%rax),%r10d
mov    0x10(%rdi),%rdi
mov    (%rdi),%r11d
mov    0x4(%rdi),%r14d
mov    0x8(%rdi),%ebx
mov    0xc(%rdi),%eax
sub    $0x8,%rsp
lea    0xeb9(%rip),%rdi
push   %rax
push   %rbx
push   %r14
push   %r11
push   %r10
call   1030 <printf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.dell_wmi_smbios_buffer = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i32, i32*, i32* }
@.str = [54 x i8] c"Call: %x/%x [%x,%x,%x,%x]\0AResults: [%8x,%8x,%8x,%8x]\0A\00"
define void @show_buffer(%struct.dell_wmi_smbios_buffer* %0) {
%2 = alloca %struct.dell_wmi_smbios_buffer*
store %struct.dell_wmi_smbios_buffer* %0, %struct.dell_wmi_smbios_buffer** %2
%3 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%4 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %3, i32 0, i32 0
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i32, i32* %5
%7 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%8 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 1
%10 = load i32, i32* %9
%11 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%12 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %11, i32 0, i32 0
%13 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %12, i32 0, i32 2
%14 = load i32*, i32** %13
%15 = getelementptr inbounds i32, i32* %14, i64 0
%16 = load i32, i32* %15
%17 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%18 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %17, i32 0, i32 0
%19 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %18, i32 0, i32 2
%20 = load i32*, i32** %19
%21 = getelementptr inbounds i32, i32* %20, i64 1
%22 = load i32, i32* %21
%23 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%24 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %23, i32 0, i32 0
%25 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %24, i32 0, i32 2
%26 = load i32*, i32** %25
%27 = getelementptr inbounds i32, i32* %26, i64 2
%28 = load i32, i32* %27
%29 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%30 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %29, i32 0, i32 0
%31 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %30, i32 0, i32 2
%32 = load i32*, i32** %31
%33 = getelementptr inbounds i32, i32* %32, i64 3
%34 = load i32, i32* %33
%35 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%36 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %35, i32 0, i32 0
%37 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %36, i32 0, i32 3
%38 = load i32*, i32** %37
%39 = getelementptr inbounds i32, i32* %38, i64 0
%40 = load i32, i32* %39
%41 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%42 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %41, i32 0, i32 0
%43 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %42, i32 0, i32 3
%44 = load i32*, i32** %43
%45 = getelementptr inbounds i32, i32* %44, i64 1
%46 = load i32, i32* %45
%47 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%48 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %47, i32 0, i32 0
%49 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %48, i32 0, i32 3
%50 = load i32*, i32** %49
%51 = getelementptr inbounds i32, i32* %50, i64 2
%52 = load i32, i32* %51
%53 = load %struct.dell_wmi_smbios_buffer*, %struct.dell_wmi_smbios_buffer** %2
%54 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %53, i32 0, i32 0
%55 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %54, i32 0, i32 3
%56 = load i32*, i32** %55
%57 = getelementptr inbounds i32, i32* %56, i64 3
%58 = load i32, i32* %57
%59 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %10, i32 %16, i32 %22, i32 %28, i32 %34, i32 %40, i32 %46, i32 %52, i32 %58)
ret void
}

LLVM IR (-O2):
%struct.dell_wmi_smbios_buffer = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i32, i32*, i32* }
@.str = [54 x i8] c"Call: %x/%x [%x,%x,%x,%x]\0AResults: [%8x,%8x,%8x,%8x]\0A\00"
define void @show_buffer(%struct.dell_wmi_smbios_buffer* nocapture %0) {
%2 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %0, i64 0, i32 0, i32 0
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %0, i64 0, i32 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %0, i64 0, i32 0, i32 2
%7 = load i32*, i32** %6
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %7, i64 1
%10 = load i32, i32* %9
%11 = getelementptr inbounds i32, i32* %7, i64 2
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %7, i64 3
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.dell_wmi_smbios_buffer, %struct.dell_wmi_smbios_buffer* %0, i64 0, i32 0, i32 3
%16 = load i32*, i32** %15
%17 = load i32, i32* %16
%18 = getelementptr inbounds i32, i32* %16, i64 1
%19 = load i32, i32* %18
%20 = getelementptr inbounds i32, i32* %16, i64 2
%21 = load i32, i32* %20
%22 = getelementptr inbounds i32, i32* %16, i64 3
%23 = load i32, i32* %22
%24 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %8, i32 %10, i32 %12, i32 %14, i32 %17, i32 %19, i32 %21, i32 %23)
ret void
}