// File: olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::read_stream_format_auds()
int ReadAVI::read_stream_format_auds()
{
#ifdef VERBOSE
    long offset = inFile.tellg();
#endif
    stream_format_auds.format = read_word();
    stream_format_auds.channels = read_word();
    stream_format_auds.samples_per_second = read_int();
    stream_format_auds.bytes_per_second = read_int();
    int block_align = read_word();
    stream_format_auds.block_size_of_data = read_word();
    stream_format_auds.bits_per_sample = read_word();
    //stream_format_auds.extended_size=read_word();

    MSG_DBG(2, "            offset=0x%lx\n", offset);
    MSG_DBG(2, "                        format: %d\n", stream_format_auds.format);
    MSG_DBG(2, "                      channels: %d\n", stream_format_auds.channels);
    MSG_DBG(2, "            samples_per_second: %d\n", stream_format_auds.samples_per_second);
    MSG_DBG(2, "              bytes_per_second: %d\n", stream_format_auds.bytes_per_second);
    MSG_DBG(2, "                   block_align: %d\n", block_align);
    MSG_DBG(2, "            block_size_of_data: %d\n", stream_format_auds.block_size_of_data);
    MSG_DBG(2, "               bits_per_sample: %d\n", stream_format_auds.bits_per_sample);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x20, %rdi
callq 0x23f0
movq %rax, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5350
movq -0x30(%rbp), %rdi
movq %rax, -0x10(%rbp)
callq 0x49e0
movq -0x30(%rbp), %rdi
movl %eax, 0x308(%rdi)
callq 0x49e0
movq -0x30(%rbp), %rdi
movl %eax, 0x30c(%rdi)
callq 0x3f60
movq -0x30(%rbp), %rdi
movl %eax, 0x310(%rdi)
callq 0x3f60
movq -0x30(%rbp), %rdi
movl %eax, 0x314(%rdi)
callq 0x49e0
movq -0x30(%rbp), %rdi
movl %eax, -0x24(%rbp)
callq 0x49e0
movq -0x30(%rbp), %rdi
movl %eax, 0x318(%rdi)
callq 0x49e0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x31c(%rax)
movq 0x44db(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x1951(%rip), %rsi      # 0x6434
movb $0x0, %al
callq 0x2360
movq -0x30(%rbp), %rax
movq 0x44bb(%rip), %rcx      # 0x8fb0
movq (%rcx), %rdi
movl 0x308(%rax), %edx
leaq 0x1baa(%rip), %rsi      # 0x66af
movb $0x0, %al
callq 0x2360
movq -0x30(%rbp), %rax
movq 0x4499(%rip), %rcx      # 0x8fb0
movq (%rcx), %rdi
movl 0x30c(%rax), %edx
leaq 0x1bac(%rip), %rsi      # 0x66d3
movb $0x0, %al
callq 0x2360
movq -0x30(%rbp), %rax
movq 0x4477(%rip), %rcx      # 0x8fb0
movq (%rcx), %rdi
movl 0x310(%rax), %edx
leaq 0x1bae(%rip), %rsi      # 0x66f7
movb $0x0, %al
callq 0x2360
movq -0x30(%rbp), %rax
movq 0x4455(%rip), %rcx      # 0x8fb0
movq (%rcx), %rdi
movl 0x314(%rax), %edx
leaq 0x1bb0(%rip), %rsi      # 0x671b
movb $0x0, %al
callq 0x2360
movq 0x4437(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
movl -0x24(%rbp), %edx
leaq 0x1bb9(%rip), %rsi      # 0x673f
movb $0x0, %al
callq 0x2360
movq -0x30(%rbp), %rax
movq 0x4418(%rip), %rcx      # 0x8fb0
movq (%rcx), %rdi
movl 0x318(%rax), %edx
leaq 0x1bbb(%rip), %rsi      # 0x6763
movb $0x0, %al
callq 0x2360
movq -0x30(%rbp), %rax
movq 0x43f6(%rip), %rcx      # 0x8fb0
movq (%rcx), %rdi
movl 0x31c(%rax), %edx
leaq 0x1bbd(%rip), %rsi      # 0x6787
movb $0x0, %al
callq 0x2360
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)