// File: /workspace/github_cpp_makefile_star2_O2/olegk0[P]readAVI/ReadAVI.cpp
// Function: ReadAVI::read_avi_header()
int ReadAVI::read_avi_header()
{
#ifdef VERBOSE
    long offset = inFile.tellg();
#endif
    avi_header.TimeBetweenFrames = read_int();
    avi_header.MaximumDataRate = read_int();
    avi_header.PaddingGranularity = read_int();
    avi_header.Flags = read_int();
    avi_header.TotalNumberOfFrames = read_int();
    avi_header.NumberOfInitialFrames = read_int();
    avi_header.NumberOfStreams = read_int();
    avi_header.SuggestedBufferSize = read_int();
    avi_header.Width = read_int();
    avi_header.Height = read_int();
    avi_header.TimeScale = read_int();
    avi_header.DataRate = read_int();
    avi_header.StartTime = read_int();
    avi_header.DataLength = read_int();

    MSG_DBG(2, "         offset=0x%lx\n", offset);
    MSG_DBG(2, "             TimeBetweenFrames: %d\n", avi_header.TimeBetweenFrames);
    MSG_DBG(2, "               MaximumDataRate: %d\n", avi_header.MaximumDataRate);
    MSG_DBG(2, "            PaddingGranularity: %d\n", avi_header.PaddingGranularity);
    MSG_DBG(2, "                         Flags: %d\n", avi_header.Flags);
    MSG_DBG(2, "           TotalNumberOfFrames: %d\n", avi_header.TotalNumberOfFrames);
    MSG_DBG(2, "         NumberOfInitialFrames: %d\n", avi_header.NumberOfInitialFrames);
    MSG_DBG(2, "               NumberOfStreams: %d\n", avi_header.NumberOfStreams);
    MSG_DBG(2, "           SuggestedBufferSize: %d\n", avi_header.SuggestedBufferSize);
    MSG_DBG(2, "                         Width: %d\n", avi_header.Width);
    MSG_DBG(2, "                        Height: %d\n", avi_header.Height);
    MSG_DBG(2, "                     TimeScale: %d\n", avi_header.TimeScale);
    MSG_DBG(2, "                      DataRate: %d\n", avi_header.DataRate);
    MSG_DBG(2, "                     StartTime: %d\n", avi_header.StartTime);
    MSG_DBG(2, "                    DataLength: %d\n", avi_header.DataLength);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x20, %rdi
callq 0x2410
movq %rax, %r14
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x228(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x22c(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x230(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x234(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x238(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x23c(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x240(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x244(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x248(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x24c(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x250(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x254(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x258(%rbx)
movq %rbx, %rdi
callq 0x3566
movl %eax, 0x25c(%rbx)
movq 0x4949(%rip), %r15      # 0x7fb0
movq (%r15), %rdi
leaq 0x1dd5(%rip), %rsi      # 0x5446
movq %r14, %rdx
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x228(%rbx), %edx
leaq 0x1bc0(%rip), %rsi      # 0x524b
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x22c(%rbx), %edx
leaq 0x1bcd(%rip), %rsi      # 0x526f
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x230(%rbx), %edx
leaq 0x1bda(%rip), %rsi      # 0x5293
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x234(%rbx), %edx
leaq 0x1be7(%rip), %rsi      # 0x52b7
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x238(%rbx), %edx
leaq 0x1bf4(%rip), %rsi      # 0x52db
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x23c(%rbx), %edx
leaq 0x1c01(%rip), %rsi      # 0x52ff
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x240(%rbx), %edx
leaq 0x1c0e(%rip), %rsi      # 0x5323
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x244(%rbx), %edx
leaq 0x1c1b(%rip), %rsi      # 0x5347
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x248(%rbx), %edx
leaq 0x1c28(%rip), %rsi      # 0x536b
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x24c(%rbx), %edx
leaq 0x1c35(%rip), %rsi      # 0x538f
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x250(%rbx), %edx
leaq 0x1c42(%rip), %rsi      # 0x53b3
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x254(%rbx), %edx
leaq 0x1c4f(%rip), %rsi      # 0x53d7
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x258(%rbx), %edx
leaq 0x1c5c(%rip), %rsi      # 0x53fb
xorl %eax, %eax
callq 0x2380
movq (%r15), %rdi
movl 0x25c(%rbx), %edx
leaq 0x1c69(%rip), %rsi      # 0x541f
xorl %eax, %eax
callq 0x2380
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop