#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 */

/* Variables and functions */
unsigned int dcr_get(int);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int,
                          unsigned int, unsigned int, unsigned int,
                          unsigned int, unsigned int, unsigned int,
                          unsigned int);
int dmp_avpos(int argc, char **argv) {
  unsigned int vb_adr, vb_len, v_read, vb_left, visr;
  unsigned int ab_adr, ab_len, a_read, ab_left, aisr;
  vb_adr = dcr_get(0x140 + 0x27);
  vb_len = dcr_get(0x140 + 0x28);
  v_read = dcr_get(0x140 + 0x33);
  vb_left = dcr_get(0x140 + 0x34);
  visr = dcr_get(0x140 + 0x12);
  ab_adr = dcr_get(0x1AF);
  ab_len = dcr_get(0x1B1);
  a_read = dcr_get(0x1B5);
  ab_left = dcr_get(0x1BE);
  aisr = dcr_get(0x1A4);
  printf("S/A/L/P/R:       %08x  %08x  %08x  %08x  %08x    %08x  %08x  %08x  "
         "%08x  %08x\n",
         visr, vb_adr, vb_len, v_read, vb_left, aisr, ab_adr, ab_len, a_read,
         ab_left);
  return (0);
}


x86 assembly (clang, -O0):
<dmp_avpos>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    %edi,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
mov    $0x167,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x24(%rbp)
mov    $0x168,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x28(%rbp)
mov    $0x173,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x2c(%rbp)
mov    $0x174,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x30(%rbp)
mov    $0x152,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x34(%rbp)
mov    $0x1af,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x38(%rbp)
mov    $0x1b1,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x3c(%rbp)
mov    $0x1b5,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x40(%rbp)
mov    $0x1be,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x44(%rbp)
mov    $0x1a4,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x48(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x48(%rbp),%r14d
mov    -0x38(%rbp),%ebx
mov    -0x3c(%rbp),%r11d
mov    -0x40(%rbp),%r10d
mov    -0x44(%rbp),%eax
lea    0xe22(%rip),%rdi
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmp_avpos>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x167,%edi
call   1030 <dcr_get@plt>
mov    %eax,0x14(%rsp)
mov    $0x168,%edi
call   1030 <dcr_get@plt>
mov    %eax,0x10(%rsp)
mov    $0x173,%edi
call   1030 <dcr_get@plt>
mov    %eax,0xc(%rsp)
mov    $0x174,%edi
call   1030 <dcr_get@plt>
mov    %eax,%r13d
mov    $0x152,%edi
call   1030 <dcr_get@plt>
mov    %eax,%ebp
mov    $0x1af,%edi
call   1030 <dcr_get@plt>
mov    %eax,%ebx
mov    $0x1b1,%edi
call   1030 <dcr_get@plt>
mov    %eax,%r14d
mov    $0x1b5,%edi
call   1030 <dcr_get@plt>
mov    %eax,%r15d
mov    $0x1be,%edi
call   1030 <dcr_get@plt>
mov    %eax,%r12d
mov    $0x1a4,%edi
call   1030 <dcr_get@plt>
sub    $0x8,%rsp
lea    0xe47(%rip),%rdi
mov    %ebp,%esi
mov    0x1c(%rsp),%edx
mov    0x18(%rsp),%ecx
mov    0x14(%rsp),%r8d
mov    %r13d,%r9d
push   %r12
push   %r15
push   %r14
push   %rbx
push   %rax
call   1040 <printf@plt>
add    $0x30,%rsp
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [79 x i8] c"S/A/L/P/R: %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\0A\00"
define i32 @dmp_avpos(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%15 = call i32 @dcr_get(i32 359)
store i32 %15, i32* %5
%16 = call i32 @dcr_get(i32 360)
store i32 %16, i32* %6
%17 = call i32 @dcr_get(i32 371)
store i32 %17, i32* %7
%18 = call i32 @dcr_get(i32 372)
store i32 %18, i32* %8
%19 = call i32 @dcr_get(i32 338)
store i32 %19, i32* %9
%20 = call i32 @dcr_get(i32 431)
store i32 %20, i32* %10
%21 = call i32 @dcr_get(i32 433)
store i32 %21, i32* %11
%22 = call i32 @dcr_get(i32 437)
store i32 %22, i32* %12
%23 = call i32 @dcr_get(i32 446)
store i32 %23, i32* %13
%24 = call i32 @dcr_get(i32 420)
store i32 %24, i32* %14
%25 = load i32, i32* %9
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = load i32, i32* %7
%29 = load i32, i32* %8
%30 = load i32, i32* %14
%31 = load i32, i32* %10
%32 = load i32, i32* %11
%33 = load i32, i32* %12
%34 = load i32, i32* %13
%35 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32 %30, i32 %31, i32 %32, i32 %33, i32 %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [79 x i8] c"S/A/L/P/R: %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\0A\00"
define i32 @dmp_avpos(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @dcr_get(i32 359)
%4 = tail call i32 @dcr_get(i32 360)
%5 = tail call i32 @dcr_get(i32 371)
%6 = tail call i32 @dcr_get(i32 372)
%7 = tail call i32 @dcr_get(i32 338)
%8 = tail call i32 @dcr_get(i32 431)
%9 = tail call i32 @dcr_get(i32 433)
%10 = tail call i32 @dcr_get(i32 437)
%11 = tail call i32 @dcr_get(i32 446)
%12 = tail call i32 @dcr_get(i32 420)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %3, i32 %4, i32 %5, i32 %6, i32 %12, i32 %8, i32 %9, i32 %10, i32 %11)
ret i32 0
}