#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);
int dmp_audiopos(int argc, char **argv) {
  unsigned int ab_adr, ab_len, a_read, ab_left, isr;
  isr = dcr_get(0x1A4);
  ab_adr = dcr_get(0x1AF);
  ab_len = dcr_get(0x1B1);
  a_read = dcr_get(0x1B5);
  ab_left = dcr_get(0x1BE);
  printf("S/A/L/P/R:       %08x    %08x  %08x  %08x  %08x\n", isr, ab_adr,
         ab_len, a_read, ab_left);
  return (0);
}


x86 assembly (clang, -O0):
<dmp_audiopos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1a4,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x24(%rbp)
mov    $0x1af,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x14(%rbp)
mov    $0x1b1,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x18(%rbp)
mov    $0x1b5,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x1be,%edi
call   1030 <dcr_get@plt>
mov    %eax,-0x20(%rbp)
mov    -0x24(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
lea    0xe78(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmp_audiopos>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1a4,%edi
call   1030 <dcr_get@plt>
mov    %eax,%r14d
mov    $0x1af,%edi
call   1030 <dcr_get@plt>
mov    %eax,%r15d
mov    $0x1b1,%edi
call   1030 <dcr_get@plt>
mov    %eax,%ebx
mov    $0x1b5,%edi
call   1030 <dcr_get@plt>
mov    %eax,%ebp
mov    $0x1be,%edi
call   1030 <dcr_get@plt>
lea    0xe96(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
mov    %ebp,%r8d
mov    %eax,%r9d
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [49 x i8] c"S/A/L/P/R: %08x %08x %08x %08x %08x\0A\00"
define i32 @dmp_audiopos(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
store i32 %0, i32* %3
store i8** %1, i8*** %4
%10 = call i32 @dcr_get(i32 420)
store i32 %10, i32* %9
%11 = call i32 @dcr_get(i32 431)
store i32 %11, i32* %5
%12 = call i32 @dcr_get(i32 433)
store i32 %12, i32* %6
%13 = call i32 @dcr_get(i32 437)
store i32 %13, i32* %7
%14 = call i32 @dcr_get(i32 446)
store i32 %14, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %17, i32 %18, i32 %19)
ret i32 0
}

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