// File: VanAndelInstitute[P]intent/src/seq_tools.cpp
// Function: fix_barcodes(ParsedBarcode&)
void fix_barcodes(ParsedBarcode &bc) {
    if(! v2_bc1_whitelisted(bc.barcode1)){
        bc.barcode1 = v2_corrected_bc(bc.barcode1, V2_BC1, 2);
        if(bc.barcode1 == "") {
            bc.status = BC_ERROR_BAD_BARCODE;
        } else {
            bc.bc_fixed = true;
        }
    }
    if(! v2_bc2_whitelisted(bc.barcode2)){
        bc.barcode2 = v2_corrected_bc(bc.barcode2, V2_BC2, 2);
        if(bc.barcode2 == "") {
            bc.status = BC_ERROR_BAD_BARCODE;
        } else {
            bc.bc_fixed = true;
        }
    }
    if(bc.bc_fixed) {
        fix_quality_lengths(bc);
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x8280
movq -0x148(%rbp), %rdi
callq 0x6a9c0
movb %al, -0x139(%rbp)
jmp 0x6afbb
movb -0x139(%rbp), %al
xorb $-0x1, %al
movb %al, -0x149(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x8a98
movb -0x149(%rbp), %al
testb $0x1, %al
jne 0x6afe1
jmp 0x6b0d2
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
leaq -0x78(%rbp), %rdi
callq 0x8280
leaq 0x23a77(%rip), %rsi     # 0x8ea70
leaq -0xa8(%rbp), %rdi
callq 0x6c700
jmp 0x6b007
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
movl $0x2, %ecx
callq 0x6b260
jmp 0x6b022
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x58(%rbp), %rsi
callq 0x86c0
leaq -0x58(%rbp), %rdi
callq 0x8a98
leaq -0xa8(%rbp), %rdi
callq 0x36050
leaq -0x78(%rbp), %rdi
callq 0x8a98
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
leaq 0x4479(%rip), %rsi      # 0x6f4d9
callq 0x48670
testb $0x1, %al
jne 0x6b06b
jmp 0x6b0c5
movq -0x8(%rbp), %rax
movl $0x4, (%rax)
jmp 0x6b0d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x8a98
jmp 0x6b24c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x6b0b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x36050
leaq -0x78(%rbp), %rdi
callq 0x8a98
jmp 0x6b24c
movq -0x8(%rbp), %rax
movb $0x1, 0xc8(%rax)
jmp 0x6b0d2
movq -0x8(%rbp), %rsi
addq $0x48, %rsi
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x8280
movq -0x158(%rbp), %rdi
callq 0x6aa20
movb %al, -0x14a(%rbp)
jmp 0x6b101
movb -0x14a(%rbp), %al
xorb $-0x1, %al
movb %al, -0x159(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x8a98
movb -0x159(%rbp), %al
testb $0x1, %al
jne 0x6b12a
jmp 0x6b22d
movq -0x8(%rbp), %rsi
addq $0x48, %rsi
leaq -0x108(%rbp), %rdi
callq 0x8280
leaq 0x2395b(%rip), %rsi     # 0x8eaa0
leaq -0x138(%rbp), %rdi
callq 0x6c700
jmp 0x6b153
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x138(%rbp), %rdx
movl $0x2, %ecx
callq 0x6b260
jmp 0x6b174
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
leaq -0xe8(%rbp), %rsi
callq 0x86c0
leaq -0xe8(%rbp), %rdi
callq 0x8a98
leaq -0x138(%rbp), %rdi
callq 0x36050
leaq -0x108(%rbp), %rdi
callq 0x8a98
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
leaq 0x431e(%rip), %rsi      # 0x6f4d9
callq 0x48670
testb $0x1, %al
jne 0x6b1c6
jmp 0x6b220
movq -0x8(%rbp), %rax
movl $0x4, (%rax)
jmp 0x6b22b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x8a98
jmp 0x6b24c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x6b212
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x36050
leaq -0x108(%rbp), %rdi
callq 0x8a98
jmp 0x6b24c
movq -0x8(%rbp), %rax
movb $0x1, 0xc8(%rax)
jmp 0x6b22d
movq -0x8(%rbp), %rax
testb $0x1, 0xc8(%rax)
je 0x6b243
movq -0x8(%rbp), %rdi
callq 0x6a850
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x8970
nopw %cs:(%rax,%rax)