// File: /workspace/github_cpp_makefile_star2_O2/olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::read_stream_header(ReadAVI::stream_header_t*)
int ReadAVI::read_stream_header(stream_header_t *sheader)
{
#ifdef VERBOSE
    long offset = inFile.tellg();
#endif
    read_chars(sheader->DataType, 4);
    read_chars(sheader->DataHandler, 4);
    sheader->Flags = read_int();
    sheader->Priority = read_int();
    sheader->InitialFrames = read_int();
    sheader->TimeScale = read_int();
    sheader->DataRate = read_int();
    sheader->StartTime = read_int();
    sheader->DataLength = read_int();
    sheader->SuggestedBufferSize = read_int();
    sheader->Quality = read_int();
    sheader->SampleSize = read_int();

    MSG_DBG(2, "            offset=0x%lx\n", offset);
    MSG_DBG(2, "                      DataType: %s\n", sheader->DataType);
    MSG_DBG(2, "                   DataHandler: ");
    print_data_handler((unsigned char *) sheader->DataHandler);
    MSG_DBG(2, "\n");
    MSG_DBG(2, "                         Flags: %d\n", sheader->Flags);
    MSG_DBG(2, "                      Priority: %d\n", sheader->Priority);
    MSG_DBG(2, "                 InitialFrames: %d\n", sheader->InitialFrames);
    MSG_DBG(2, "                     TimeScale: %d\n", sheader->TimeScale);
    MSG_DBG(2, "                      DataRate: %d\n", sheader->DataRate);
    MSG_DBG(2, "                     StartTime: %d\n", sheader->StartTime);
    MSG_DBG(2, "                    DataLength: %d\n", sheader->DataLength);
    MSG_DBG(2, "           SuggestedBufferSize: %d\n", sheader->SuggestedBufferSize);
    MSG_DBG(2, "                       Quality: %d\n", sheader->Quality);
    MSG_DBG(2, "                    SampleSize: %d\n", sheader->SampleSize);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r12
addq $0x20, %rdi
callq 0x2410
movq %rax, %r15
pushq $0x4
popq %rbp
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x3542
leaq 0x5(%rbx), %r14
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3542
movq %r12, %rdi
callq 0x3566
movl %eax, 0xc(%rbx)
movq %r12, %rdi
callq 0x3566
movl %eax, 0x10(%rbx)
movq %r12, %rdi
callq 0x3566
movl %eax, 0x14(%rbx)
movq %r12, %rdi
callq 0x3566
movl %eax, 0x18(%rbx)
movq %r12, %rdi
callq 0x3566
movl %eax, 0x1c(%rbx)
movq %r12, %rdi
callq 0x3566
movl %eax, 0x20(%rbx)
movq %r12, %rdi
callq 0x3566
movl %eax, 0x24(%rbx)
movq %r12, %rdi
callq 0x3566
movl %eax, 0x28(%rbx)
movq %r12, %rdi
callq 0x3566
movl %eax, 0x2c(%rbx)
movq %r12, %rdi
callq 0x3566
movl %eax, 0x30(%rbx)
movq 0x4737(%rip), %r12      # 0x7fb0
movq (%r12), %rdi
leaq 0x1bbf(%rip), %rsi      # 0x5443
movq %r15, %rdx
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
leaq 0x1bc4(%rip), %rsi      # 0x545d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2380
movq (%r12), %rcx
leaq 0x1bd3(%rip), %rdi      # 0x5481
pushq $0x20
popq %rsi
pushq $0x1
popq %rdx
callq 0x2440
leaq 0x20cf(%rip), %r15      # 0x598f
xorl %r13d, %r13d
cmpq $0x4, %r13
je 0x38fe
movzbl (%r14,%r13), %edx
leal -0x30(%rdx), %eax
movq (%r12), %rsi
cmpb $0xa, %al
jb 0x38f2
movl %edx, %eax
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x19, %al
jbe 0x38f2
movq %rsi, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2380
jmp 0x38f9
movl %edx, %edi
callq 0x22e0
incq %r13
jmp 0x38c3
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x22e0
movq (%r12), %rdi
movl 0xc(%rbx), %edx
leaq 0x199f(%rip), %rsi      # 0x52b7
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
movl 0x10(%rbx), %edx
leaq 0x1b75(%rip), %rsi      # 0x54a2
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
movl 0x14(%rbx), %edx
leaq 0x1b84(%rip), %rsi      # 0x54c6
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
movl 0x18(%rbx), %edx
leaq 0x1a5c(%rip), %rsi      # 0x53b3
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
movl 0x1c(%rbx), %edx
leaq 0x1a6b(%rip), %rsi      # 0x53d7
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
movl 0x20(%rbx), %edx
leaq 0x1a7a(%rip), %rsi      # 0x53fb
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
movl 0x24(%rbx), %edx
leaq 0x1a89(%rip), %rsi      # 0x541f
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
movl 0x28(%rbx), %edx
leaq 0x199c(%rip), %rsi      # 0x5347
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
movl 0x2c(%rbx), %edx
leaq 0x1b2a(%rip), %rsi      # 0x54ea
xorl %eax, %eax
callq 0x2380
movq (%r12), %rdi
movl 0x30(%rbx), %edx
leaq 0x1b39(%rip), %rsi      # 0x550e
xorl %eax, %eax
callq 0x2380
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop