// File: UCBASiCS[P]SPRIGHT/src/customizedoutput.cpp
// Function: CustomizedOutput::process()
void CustomizedOutput::process()
{
    chrono->start("Output");

    std::unordered_map<int,ffast_complex> decodedFrequencies;

    decodedFrequencies = backEnd->getDecodedFrequencies();

    std::ofstream myfile (config->getOutputFile());
    if (myfile.is_open())
    {
        myfile.precision(15);
        for (auto i = decodedFrequencies.cbegin(); i != decodedFrequencies.cend(); ++i)
            myfile << i->first << ":" << i->second << std::endl;
        myfile.close();
    }

    chrono->stop("Output");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x2c0(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x4550
movq -0x2b8(%rbp), %rdx
leaq 0xd498(%rip), %rsi      # 0x20c9b
leaq -0x28(%rbp), %rdi
callq 0x5a20
jmp 0x1380e
movq -0x2c0(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc270
jmp 0x13820
leaq -0x28(%rbp), %rdi
callq 0x4180
leaq -0x29(%rbp), %rdi
callq 0x4310
leaq -0x78(%rbp), %rdi
callq 0x5920
movq -0x2c8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5750
movq %rax, -0x2d0(%rbp)
jmp 0x13854
movq -0x2d0(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x13b30
jmp 0x13866
movq -0x2c8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf8d0
movq %rax, -0x2d8(%rbp)
jmp 0x1387f
movq -0x2d8(%rbp), %rsi
leaq -0x278(%rbp), %rdi
movl $0x10, %edx
callq 0x4320
jmp 0x13899
leaq -0x278(%rbp), %rdi
callq 0x4200
movb %al, -0x2d9(%rbp)
jmp 0x138ad
movb -0x2d9(%rbp), %al
testb $0x1, %al
jne 0x138bc
jmp 0x13a09
movq -0x278(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x278(%rbp,%rax), %rdi
movl $0xf, %esi
callq 0x13b60
jmp 0x138db
leaq -0x78(%rbp), %rdi
callq 0x5bb0
movq %rax, -0x280(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5c10
movq %rax, -0x288(%rbp)
leaq -0x280(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x5be0
testb $0x1, %al
jne 0x13917
jmp 0x139f9
leaq -0x280(%rbp), %rdi
callq 0x5c70
movl (%rax), %esi
leaq -0x278(%rbp), %rdi
callq 0x4520
movq %rax, -0x2e8(%rbp)
jmp 0x1393a
movq -0x2e8(%rbp), %rdi
leaq 0xd2d9(%rip), %rsi      # 0x20c21
callq 0x42b0
movq %rax, -0x2f0(%rbp)
jmp 0x13956
leaq -0x280(%rbp), %rdi
callq 0x5c70
movq -0x2f0(%rbp), %rdi
movq %rax, %rsi
addq $0x8, %rsi
callq 0x4370
movq %rax, -0x2f8(%rbp)
jmp 0x1397e
movq -0x2f8(%rbp), %rdi
movq 0x1c624(%rip), %rsi     # 0x2ffb0
callq 0x42f0
jmp 0x13993
jmp 0x13995
leaq -0x280(%rbp), %rdi
callq 0x5ca0
jmp 0x138eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x139c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4180
leaq -0x29(%rbp), %rdi
callq 0x4310
jmp 0x13adc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x13ad3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x13ac7
leaq -0x278(%rbp), %rdi
callq 0x4420
jmp 0x13a07
jmp 0x13a09
movq -0x2c8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x308(%rbp)
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x4550
movq -0x300(%rbp), %rdx
leaq 0xd25f(%rip), %rsi      # 0x20c9b
leaq -0x2a8(%rbp), %rdi
callq 0x5a20
jmp 0x13a4a
movq -0x308(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0xc340
jmp 0x13a5f
leaq -0x2a8(%rbp), %rdi
callq 0x4180
leaq -0x2a9(%rbp), %rdi
callq 0x4310
leaq -0x278(%rbp), %rdi
callq 0x4460
leaq -0x78(%rbp), %rdi
callq 0x5a00
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x13abb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x4180
leaq -0x2a9(%rbp), %rdi
callq 0x4310
leaq -0x278(%rbp), %rdi
callq 0x4460
leaq -0x78(%rbp), %rdi
callq 0x5a00
movq -0x38(%rbp), %rdi
callq 0x4540
nopw %cs:(%rax,%rax)