// File: bobverity[P]MavericK/writeOut.cpp
// Function: printEvidenceDetails(globals&, int)
void printEvidenceDetails(globals &globals, int Kindex) {
    int K = globals.Kmin+Kindex;
    
    globals.outputEvidenceDetails_fileStream << K;
    
    // Structure estimator details
    for (int mainRep=0; mainRep<globals.mainRepeats; mainRep++) {
        globals.outputEvidenceDetails_fileStream << "," << process_nan(globals.structure_loglike_mean[Kindex][mainRep]);
    }
    for (int mainRep=0; mainRep<globals.mainRepeats; mainRep++) {
        globals.outputEvidenceDetails_fileStream << "," << process_nan(globals.structure_loglike_var[Kindex][mainRep]);
    }
    
    // thermodynamic integral estimator details
    if (globals.thermodynamic_on) {
        for (int TIrep=0; TIrep<globals.thermodynamicRungs; TIrep++) {
            globals.outputEvidenceDetails_fileStream << "," << process_nan(globals.TIpoint_mean[Kindex][TIrep]);
        }
        for (int TIrep=0; TIrep<globals.thermodynamicRungs; TIrep++) {
            globals.outputEvidenceDetails_fileStream << "," << process_nan(globals.TIpoint_SE[Kindex][TIrep]);
        }
    }
    
    globals.outputEvidenceDetails_fileStream << "\n";
    globals.outputEvidenceDetails_fileStream.flush();
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movl %esi, 0xec(%rsp)
movq 0xf0(%rsp), %rax
movl 0x2bc8(%rax), %eax
addl 0xec(%rsp), %eax
movl %eax, 0xe8(%rsp)
movq 0xf0(%rsp), %rdi
addq $0x1d70, %rdi           # imm = 0x1D70
movl 0xe8(%rsp), %esi
callq 0x4700
movl $0x0, 0xe4(%rsp)
movl 0xe4(%rsp), %eax
movq 0xf0(%rsp), %rcx
cmpl 0x2c0c(%rcx), %eax
jge 0x565bf
movq 0xf0(%rsp), %rdi
addq $0x1d70, %rdi           # imm = 0x1D70
leaq 0x5d0f(%rip), %rsi      # 0x5c228
callq 0x4430
movq %rax, 0x30(%rsp)
movq 0xf0(%rsp), %rdi
addq $0x2e60, %rdi           # imm = 0x2E60
movslq 0xec(%rsp), %rsi
callq 0x8bc0
movq %rax, %rdi
movslq 0xe4(%rsp), %rsi
callq 0x8c20
movsd (%rax), %xmm0
leaq 0xc0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x35ed0
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x43e0
jmp 0x56576
leaq 0xc0(%rsp), %rdi
callq 0x4270
movl 0xe4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe4(%rsp)
jmp 0x564e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x4270
jmp 0x5688d
movl $0x0, 0xb0(%rsp)
movl 0xb0(%rsp), %eax
movq 0xf0(%rsp), %rcx
cmpl 0x2c0c(%rcx), %eax
jge 0x566a1
movq 0xf0(%rsp), %rdi
addq $0x1d70, %rdi           # imm = 0x1D70
leaq 0x5c2d(%rip), %rsi      # 0x5c228
callq 0x4430
movq %rax, 0x20(%rsp)
movq 0xf0(%rsp), %rdi
addq $0x2e78, %rdi           # imm = 0x2E78
movslq 0xec(%rsp), %rsi
callq 0x8bc0
movq %rax, %rdi
movslq 0xb0(%rsp), %rsi
callq 0x8c20
movsd (%rax), %xmm0
leaq 0x90(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x35ed0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x43e0
jmp 0x56658
leaq 0x90(%rsp), %rdi
callq 0x4270
movl 0xb0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb0(%rsp)
jmp 0x565ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x4270
jmp 0x5688d
movq 0xf0(%rsp), %rax
testb $0x1, 0x2c1c(%rax)
je 0x56856
movl $0x0, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
movq 0xf0(%rsp), %rcx
cmpl 0x2c20(%rcx), %eax
jge 0x5678f
movq 0xf0(%rsp), %rdi
addq $0x1d70, %rdi           # imm = 0x1D70
leaq 0x5b36(%rip), %rsi      # 0x5c228
callq 0x4430
movq %rax, 0x10(%rsp)
movq 0xf0(%rsp), %rdi
addq $0x2ed8, %rdi           # imm = 0x2ED8
movslq 0xec(%rsp), %rsi
callq 0x8bc0
movq %rax, %rdi
movslq 0x8c(%rsp), %rsi
callq 0x8c20
movsd (%rax), %xmm0
leaq 0x68(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x35ed0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x43e0
jmp 0x5674c
leaq 0x68(%rsp), %rdi
callq 0x4270
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x566c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x4270
jmp 0x5688d
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
movq 0xf0(%rsp), %rcx
cmpl 0x2c20(%rcx), %eax
jge 0x56854
movq 0xf0(%rsp), %rdi
addq $0x1d70, %rdi           # imm = 0x1D70
leaq 0x5a63(%rip), %rsi      # 0x5c228
callq 0x4430
movq %rax, (%rsp)
movq 0xf0(%rsp), %rdi
addq $0x2f08, %rdi           # imm = 0x2F08
movslq 0xec(%rsp), %rsi
callq 0x8bc0
movq %rax, %rdi
movslq 0x64(%rsp), %rsi
callq 0x8c20
movsd (%rax), %xmm0
leaq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x35ed0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x43e0
jmp 0x5681a
leaq 0x40(%rsp), %rdi
callq 0x4270
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x56797
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4270
jmp 0x5688d
jmp 0x56856
movq 0xf0(%rsp), %rdi
addq $0x1d70, %rdi           # imm = 0x1D70
leaq 0x6026(%rip), %rsi      # 0x5c892
callq 0x4430
movq 0xf0(%rsp), %rdi
addq $0x1d70, %rdi           # imm = 0x1D70
callq 0x42b0
addq $0xf8, %rsp
retq
movq 0xb8(%rsp), %rdi
callq 0x4730
nopw (%rax,%rax)