// File: karel-brinda[P]ococo/src/params.cpp
// Function: ococo::params_t::~params_t()
ococo::params_t::~params_t() {
    /*
     * Close files.
     */

    if (sam_file != nullptr) {
        int error_code = sam_close(sam_file);
        if (error_code != 0) {
            ococo::error("SAM file could not be closed.\n");
            return_code = -1;
        }
    }

    if (vcf_file != nullptr) {
        int error_code = fclose(vcf_file);
        if (error_code != 0) {
            ococo::error("VCF file could not be closed.\n");
            return_code = -1;
        }
    }

    if (pileup_file != nullptr) {
        int error_code = fclose(pileup_file);
        if (error_code != 0) {
            return_code = error_code;
            ococo::error("Pileup file could not be closed.\n");
            return_code = -1;
        }
    }

    if (fasta_out_file != nullptr) {
        int error_code = fclose(fasta_out_file);
        if (error_code != 0) {
            ococo::error("FASTA consensus file could not be closed.\n");
            return_code = -1;
        }
    }

    if (log_file != nullptr) {
        int error_code = fclose(log_file);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, 0x198(%rax)
je 0x1041c
movq -0x28(%rbp), %rax
movq 0x198(%rax), %rdi
callq 0x140c0
movl %eax, -0x2c(%rbp)
jmp 0x103f3
movl -0x2c(%rbp), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x1041a
leaq 0x69b11(%rip), %rdi     # 0x79f17
xorl %eax, %eax
callq 0xf460
jmp 0x1040f
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
jmp 0x1041c
movq -0x28(%rbp), %rax
cmpq $0x0, 0x180(%rax)
je 0x10468
movq -0x28(%rbp), %rax
movq 0x180(%rax), %rdi
callq 0x4590
movl %eax, -0x30(%rbp)
jmp 0x1043f
movl -0x30(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x10466
leaq 0x69ae4(%rip), %rdi     # 0x79f36
xorl %eax, %eax
callq 0xf460
jmp 0x1045b
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
jmp 0x10468
movq -0x28(%rbp), %rax
cmpq $0x0, 0x188(%rax)
je 0x104be
movq -0x28(%rbp), %rax
movq 0x188(%rax), %rdi
callq 0x4590
movl %eax, -0x34(%rbp)
jmp 0x1048b
movl -0x34(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x104bc
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x4(%rax)
leaq 0x69aad(%rip), %rdi     # 0x79f55
xorl %eax, %eax
callq 0xf460
jmp 0x104b1
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
jmp 0x104be
movq -0x28(%rbp), %rax
cmpq $0x0, 0x190(%rax)
je 0x1050a
movq -0x28(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x4590
movl %eax, -0x38(%rbp)
jmp 0x104e1
movl -0x38(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x10508
leaq 0x69a83(%rip), %rdi     # 0x79f77
xorl %eax, %eax
callq 0xf460
jmp 0x104fd
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
jmp 0x1050a
movq -0x28(%rbp), %rax
cmpq $0x0, 0x1a0(%rax)
je 0x10533
movq -0x28(%rbp), %rax
movq 0x1a0(%rax), %rdi
callq 0x4590
movl %eax, -0x3c(%rbp)
jmp 0x1052d
movl -0x3c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x1c8, %rdi            # imm = 0x1C8
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x160, %rdi            # imm = 0x160
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0xe0, %rdi
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0xb8, %rdi
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x98, %rdi
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x78, %rdi
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x50, %rdi
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x30, %rdi
callq 0x4340
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x4340
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x9fe0
nopw %cs:(%rax,%rax)