// File: /workspace/github_cpp_makefile_star2_O3/VanAndelInstitute[P]intent/src/edlib.cpp
// Function: edlibAlign
EdlibAlignResult edlibAlign(const char* const queryOriginal, const int queryLength,
                                       const char* const targetOriginal, const int targetLength,
                                       const EdlibAlignConfig config) {
    EdlibAlignResult result;
    result.status = EDLIB_STATUS_OK;
    result.editDistance = -1;
    result.endLocations = result.startLocations = NULL;
    result.numLocations = 0;
    result.alignment = NULL;
    result.alignmentLength = 0;
    result.alphabetLength = 0;

    /*------------ TRANSFORM SEQUENCES AND RECOGNIZE ALPHABET -----------*/
    unsigned char* query, * target;
    string alphabet = transformSequences(queryOriginal, queryLength, targetOriginal, targetLength,
                                         &query, &target);
    result.alphabetLength = static_cast<int>(alphabet.size());
    /*-------------------------------------------------------*/

    // Handle special situation when at least one of the sequences has length 0.
    if (queryLength == 0 || targetLength == 0) {
        if (config.mode == EDLIB_MODE_NW) {
            result.editDistance = std::max(queryLength, targetLength);
            result.endLocations = static_cast<int *>(malloc(sizeof(int) * 1));
            result.endLocations[0] = targetLength - 1;
            result.numLocations = 1;
        } else if (config.mode == EDLIB_MODE_SHW || config.mode == EDLIB_MODE_HW) {
            result.editDistance = queryLength;
            result.endLocations = static_cast<int *>(malloc(sizeof(int) * 1));
            result.endLocations[0] = -1;
            result.numLocations = 1;
        } else {
            result.status = EDLIB_STATUS_ERROR;
        }

        free(query);
        free(target);
        return result;
    }

    /*--------------------- INITIALIZATION ------------------*/
    int maxNumBlocks = ceilDiv(queryLength, WORD_SIZE); // bmax in Myers
    int W = maxNumBlocks * WORD_SIZE - queryLength; // number of redundant cells in last level blocks
    EqualityDefinition equalityDefinition(alphabet, config.additionalEqualities, config.additionalEqualitiesLength);
    Word* Peq = buildPeq(static_cast<int>(alphabet.size()), query, queryLength, equalityDefinition);
    /*-------------------------------------------------------*/

    /*------------------ MAIN CALCULATION -------------------*/
    // TODO: Store alignment data only after k is determined? That could make things faster.
    int positionNW; // Used only when mode is NW.
    AlignmentData* alignData = NULL;
    bool dynamicK = false;
    int k = config.k;
    if (k < 0) { // If valid k is not given, auto-adjust k until solution is found.
        dynamicK = true;
        k = WORD_SIZE; // Gives better results than smaller k.
    }

    do {
        if (config.mode == EDLIB_MODE_HW || config.mode == EDLIB_MODE_SHW) {
            myersCalcEditDistanceSemiGlobal(Peq, W, maxNumBlocks,
                                            queryLength, target, targetLength,
                                            k, config.mode, &(result.editDistance),
                                            &(result.endLocations), &(result.numLocations));
        } else {  // mode == EDLIB_MODE_NW
            myersCalcEditDistanceNW(Peq, W, maxNumBlocks,
                                    queryLength, target, targetLength,
                                    k, &(result.editDistance), &positionNW,
                                    false, &alignData, -1);
        }
        k *= 2;
    } while(dynamicK && result.editDistance == -1);

    if (result.editDistance >= 0) {  // If there is solution.
        // If NW mode, set end location explicitly.
        if (config.mode == EDLIB_MODE_NW) {
            result.endLocations = static_cast<int *>(malloc(sizeof(int) * 1));
            result.endLocations[0] = targetLength - 1;
            result.numLocations = 1;
        }

        // Find starting locations.
        if (config.task == EDLIB_TASK_LOC || config.task == EDLIB_TASK_PATH) {
            result.startLocations = static_cast<int *>(malloc(result.numLocations * sizeof(int)));
            if (config.mode == EDLIB_MODE_HW) {  // If HW, I need to calculate start locations.
                const unsigned char* rTarget = createReverseCopy(target, targetLength);
                const unsigned char* rQuery  = createReverseCopy(query, queryLength);
                // Peq for reversed query.
                Word* rPeq = buildPeq(static_cast<int>(alphabet.size()), rQuery, queryLength, equalityDefinition);
                for (int i = 0; i < result.numLocations; i++) {
                    int endLocation = result.endLocations[i];
                    if (endLocation == -1) {
                        // NOTE: Sometimes one of optimal solutions is that query starts before target, like this:
                        //                       AAGG <- target
                        //                   CCTT     <- query
                        //   It will never be only optimal solution and it does not happen often, however it is
                        //   possible and in that case end location will be -1. What should we do with that?
                        //   Should we just skip reporting such end location, although it is a solution?
                        //   If we do report it, what is the start location? -4? -1? Nothing?
                        // TODO: Figure this out. This has to do in general with how we think about start
                        //   and end locations.
                        //   Also, we have alignment later relying on this locations to limit the space of it's
                        //   search -> how can it do it right if these locations are negative or incorrect?
                        result.startLocations[i] = 0;  // I put 0 for now, but it does not make much sense.
                    } else {
                        int bestScoreSHW, numPositionsSHW;
                        int* positionsSHW;
                        myersCalcEditDistanceSemiGlobal(
                                rPeq, W, maxNumBlocks,
                                queryLength, rTarget + targetLength - endLocation - 1, endLocation + 1,
                                result.editDistance, EDLIB_MODE_SHW,
                                &bestScoreSHW, &positionsSHW, &numPositionsSHW);
                        // Taking last location as start ensures that alignment will not start with insertions
                        // if it can start with mismatches instead.
                        result.startLocations[i] = endLocation - positionsSHW[numPositionsSHW - 1];
                        free(positionsSHW);
                    }
                }
                delete[] rTarget;
                delete[] rQuery;
                delete[] rPeq;
            } else {  // If mode is SHW or NW
                for (int i = 0; i < result.numLocations; i++) {
                    result.startLocations[i] = 0;
                }
            }
        }

        // Find alignment -> all comes down to finding alignment for NW.
        // Currently we return alignment only for first pair of locations.
        if (config.task == EDLIB_TASK_PATH) {
            int alnStartLocation = result.startLocations[0];
            int alnEndLocation = result.endLocations[0];
            const unsigned char* alnTarget = target + alnStartLocation;
            const int alnTargetLength = alnEndLocation - alnStartLocation + 1;
            const unsigned char* rAlnTarget = createReverseCopy(alnTarget, alnTargetLength);
            const unsigned char* rQuery  = createReverseCopy(query, queryLength);
            obtainAlignment(query, rQuery, queryLength,
                            alnTarget, rAlnTarget, alnTargetLength,
                            equalityDefinition, static_cast<int>(alphabet.size()), result.editDistance,
                            &(result.alignment), &(result.alignmentLength));
            delete[] rAlnTarget;
            delete[] rQuery;
        }
    }
    /*-------------------------------------------------------*/

    //--- Free memory ---//
    delete[] Peq;
    free(query);
    free(target);
    if (alignData) delete alignData;
    //-------------------//

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x101c8, %rsp          # imm = 0x101C8
movl %r8d, %ebx
movq %rcx, 0x48(%rsp)
movq %rsi, %rbp
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movl $0x0, 0x18(%rdi)
movq %rdi, 0x50(%rsp)
movups %xmm0, 0x20(%rdi)
movq %rdx, 0x10(%rsp)
movslq %edx, %r13
movq %r13, %rdi
callq 0x6530
movq %rax, %r15
movq %rbx, 0x8(%rsp)
movslq %ebx, %rdi
movq %rdi, 0x80(%rsp)
callq 0x6530
movq %rax, 0x30(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xc0(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x6240
testl %r13d, %r13d
jle 0x2a5b3
movl 0x10(%rsp), %r12d
xorl %r14d, %r14d
movzbl (%rbp,%r14), %eax
cmpb $0x1, 0xc0(%rsp,%rax)
jne 0x2a587
movb 0x1c0(%rsp,%rax), %bl
jmp 0x2a5a7
movb $0x1, 0xc0(%rsp,%rax)
movb 0x68(%rsp), %bl
movb %bl, 0x1c0(%rsp,%rax)
movsbl %al, %esi
leaq 0x60(%rsp), %rdi
callq 0x6340
movb %bl, (%r15,%r14)
incq %r14
cmpq %r14, %r12
jne 0x2a56e
cmpl $0x0, 0x8(%rsp)
jle 0x2a610
movl 0x8(%rsp), %r12d
xorl %ebp, %ebp
leaq 0x60(%rsp), %r14
movq 0x48(%rsp), %rax
movzbl (%rax,%rbp), %eax
cmpb $0x1, 0xc0(%rsp,%rax)
jne 0x2a5e2
movb 0x1c0(%rsp,%rax), %bl
jmp 0x2a600
movb $0x1, 0xc0(%rsp,%rax)
movb 0x68(%rsp), %bl
movb %bl, 0x1c0(%rsp,%rax)
movsbl %al, %esi
movq %r14, %rdi
callq 0x6340
movq 0x30(%rsp), %rax
movb %bl, (%rax,%rbp)
incq %rbp
cmpq %rbp, %r12
jne 0x2a5c6
leaq 0x10200(%rsp), %rsi
movq 0x50(%rsp), %rcx
leaq 0x4(%rcx), %rdx
leaq 0x8(%rcx), %rax
movq %rax, 0x40(%rsp)
leaq 0x18(%rcx), %rax
movq %rax, 0x28(%rsp)
movl 0x68(%rsp), %eax
movl %eax, 0x2c(%rcx)
movq 0x10(%rsp), %r12
testl %r12d, %r12d
setne %al
movq 0x8(%rsp), %rbx
testl %ebx, %ebx
setne %cl
testb %cl, %al
jne 0x2a681
movl 0x4(%rsi), %ecx
testl %ecx, %ecx
je 0x2a69f
movq 0x50(%rsp), %rax
cmpl $0x2, %ecx
ja 0x2a6c4
movl %r12d, (%rdx)
movl $0x4, %edi
callq 0x6530
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x2a6bf
testb $0x3f, %r12b
movq %rdx, 0x20(%rsp)
je 0x2a6e1
leal 0x3f(%r12), %eax
testl %r12d, %r12d
cmovnsl %r12d, %eax
sarl $0x6, %eax
incl %eax
jmp 0x2a6e7
cmpl %ebx, %r12d
cmovlel %ebx, %r12d
movl %r12d, (%rdx)
movl $0x4, %edi
callq 0x6530
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
decl %ebx
movl %ebx, (%rax)
movq 0x28(%rsp), %rax
movl $0x1, (%rax)
movq %r15, %rdi
callq 0x64b0
movq 0x30(%rsp), %rdi
callq 0x64b0
jmp 0x2ad17
movl %r12d, %eax
sarl $0x6, %eax
movl %eax, 0x18(%rsp)
movq 0x10(%rsi), %rdx
movl 0x18(%rsi), %ecx
leaq 0x1c0(%rsp), %rdi
leaq 0x60(%rsp), %rbx
movq %rbx, %rsi
callq 0x2d46c
movl 0x8(%rbx), %r14d
testb $0x3f, %r12b
je 0x2a724
leal 0x3f(%r12), %ebx
testl %r12d, %r12d
cmovnsl %r12d, %ebx
sarl $0x6, %ebx
incl %ebx
jmp 0x2a72a
movl %r12d, %ebx
sarl $0x6, %ebx
leal 0x1(%r14), %eax
imull %ebx, %eax
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x6030
movq %rax, 0x48(%rsp)
movl 0x18(%rsp), %eax
shll $0x6, %eax
movl %eax, 0x1c(%rsp)
testl %r14d, %r14d
js 0x2a7f0
movl %ebx, %eax
xorl %edx, %edx
xorl %ecx, %ecx
testl %ebx, %ebx
jle 0x2a7e2
movl %edx, %edi
imull %ebx, %edi
movzbl %cl, %esi
movq 0x48(%rsp), %r8
leaq (%r8,%rdi,8), %rdi
movl $0x3f, %r8d
xorl %r9d, %r9d
movq $-0x1, %r10
cmpl %r14d, %edx
jae 0x2a7d2
movq %r9, %r11
shlq $0x6, %r11
movq %r8, %r12
xorl %r10d, %r10d
addq %r10, %r10
cmpq %r13, %r12
jge 0x2a7c1
movzbl (%r15,%r12), %ebp
shll $0x8, %ebp
addq %rsp, %rbp
addq $0x1c0, %rbp            # imm = 0x1C0
cmpb $0x1, (%rsi,%rbp)
jne 0x2a7c5
orq $0x1, %r10
leaq -0x1(%r12), %rbp
cmpq %r11, %r12
movq %rbp, %r12
ja 0x2a7a1
movq %r10, (%rdi,%r9,8)
incq %r9
addq $0x40, %r8
cmpq %rax, %r9
jne 0x2a788
incb %cl
movzbl %cl, %edx
cmpl %r14d, %edx
jle 0x2a76a
movq 0x50(%rsp), %rax
leaq 0x20(%rax), %rcx
movq %rcx, 0xa8(%rsp)
addq $0x28, %rax
movq %rax, 0xa0(%rsp)
movl 0x1c(%rsp), %eax
subl 0x10(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq $0x0, 0xc0(%rsp)
leaq 0x10200(%rsp), %rax
movl (%rax), %r12d
movl 0x4(%rax), %eax
testl %r12d, %r12d
movl $0x40, %ebx
cmovnsl %r12d, %ebx
movq %rax, 0x38(%rsp)
leal -0x1(%rax), %ebp
cmpl $0x1, %ebp
ja 0x2a88b
subq $0x8, %rsp
movq 0x50(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x10(%rsp), %r9
pushq 0x30(%rsp)
pushq 0x50(%rsp)
movq 0x38(%rsp), %r14
pushq %r14
pushq 0x58(%rsp)
pushq %rbx
callq 0x2ad83
addq $0x30, %rsp
jmp 0x2a8ce
movq 0x48(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0x18(%rsp), %edx
movq 0x10(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x8(%rsp), %r9
pushq $-0x1
leaq 0xc8(%rsp), %rax
pushq %rax
pushq $0x0
leaq 0xd4(%rsp), %rax
pushq %rax
movq 0x40(%rsp), %r14
pushq %r14
pushq %rbx
callq 0x2b598
addq $0x30, %rsp
movl (%r14), %r14d
testl %r12d, %r12d
jns 0x2a8e2
addl %ebx, %ebx
cmpl $-0x1, %r14d
je 0x2a847
testl %r14d, %r14d
js 0x2acd9
cmpl $0x0, 0x38(%rsp)
jne 0x2a918
movl $0x4, %edi
callq 0x6530
movq 0x40(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%rsp), %rcx
decl %ecx
movl %ecx, (%rax)
movq 0x28(%rsp), %rax
movl $0x1, (%rax)
leaq 0x10200(%rsp), %rax
movl 0x8(%rax), %ebp
leal -0x1(%rbp), %eax
cmpl $0x1, %eax
ja 0x2acd9
movq 0x50(%rsp), %rbx
movslq 0x18(%rbx), %r12
leaq (,%r12,4), %rdi
movq %rdi, 0x20(%rsp)
callq 0x6530
movq %rax, 0x58(%rsp)
movq %rax, 0x10(%rbx)
cmpl $0x2, 0x38(%rsp)
jne 0x2a9fa
movq %r12, 0x38(%rsp)
movq 0x80(%rsp), %rdi
callq 0x6030
movq %rax, %rbx
movq 0x8(%rsp), %rax
testl %eax, %eax
jle 0x2a9a5
movl %eax, %eax
movq 0x30(%rsp), %rcx
movq 0x80(%rsp), %rdx
addq %rdx, %rcx
decq %rcx
xorl %edx, %edx
movb (%rcx), %sil
movb %sil, (%rbx,%rdx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x2a993
movq %r13, %rdi
callq 0x6030
movq %rax, %r12
movq %rbp, 0x98(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x2a9de
movl 0x10(%rsp), %eax
leaq (%r15,%r13), %rcx
decq %rcx
xorl %edx, %edx
movb (%rcx), %sil
movb %sil, (%r12,%rdx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x2a9cc
movl 0x68(%rsp), %ebp
movq 0x10(%rsp), %rax
testb $0x3f, %al
je 0x2aa19
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x6, %ecx
incl %ecx
jmp 0x2aa1e
testl %r12d, %r12d
jle 0x2abf3
movq 0x58(%rsp), %rdi
xorl %esi, %esi
movq 0x20(%rsp), %rdx
callq 0x6240
jmp 0x2abf3
movl %eax, %ecx
sarl $0x6, %ecx
movq %rbx, 0x90(%rsp)
leal 0x1(%rbp), %eax
movl %ecx, 0x20(%rsp)
imull %ecx, %eax
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x6030
movq %rax, 0x28(%rsp)
testl %ebp, %ebp
movl 0x20(%rsp), %ecx
js 0x2aafc
movl %ecx, %eax
xorl %edx, %edx
movq $0x0, 0x8(%rsp)
testl %ecx, %ecx
jle 0x2aae1
movl %edx, %edi
imull 0x20(%rsp), %edi
movzbl 0x8(%rsp), %esi
movq 0x28(%rsp), %rcx
leaq (%rcx,%rdi,8), %rdi
movl $0x3f, %ebx
xorl %r9d, %r9d
movq $-0x1, %r10
cmpl %ebp, %edx
jae 0x2aad1
movq %r9, %r11
shlq $0x6, %r11
movq %rbx, %r8
xorl %r10d, %r10d
addq %r10, %r10
cmpq %r13, %r8
jge 0x2aac1
movzbl (%r12,%r8), %ecx
shll $0x8, %ecx
addq %rsp, %rcx
addq $0x1c0, %rcx            # imm = 0x1C0
cmpb $0x1, (%rsi,%rcx)
jne 0x2aac5
orq $0x1, %r10
leaq -0x1(%r8), %rcx
cmpq %r11, %r8
movq %rcx, %r8
ja 0x2aaa1
movq %r10, (%rdi,%r9,8)
incq %r9
addq $0x40, %rbx
cmpq %rax, %r9
jne 0x2aa89
movq 0x8(%rsp), %rcx
incb %cl
movq %rcx, 0x8(%rsp)
movzbl %cl, %edx
cmpl %ebp, %edx
movl 0x20(%rsp), %ecx
jle 0x2aa68
movq 0x38(%rsp), %rcx
testl %ecx, %ecx
jle 0x2abcc
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x80(%rsp), %rax
movq 0x90(%rsp), %rdx
addq %rdx, %rax
decq %rax
movq %rax, 0x20(%rsp)
xorl %ebp, %ebp
movq 0x8(%rsp), %rax
movslq (%rax,%rbp,4), %rbx
cmpq $-0x1, %rbx
je 0x2abb4
movq 0x20(%rsp), %r8
subq %rbx, %r8
leal 0x1(%rbx), %r9d
subq $0x8, %rsp
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
leaq 0x94(%rsp), %rax
pushq %rax
leaq 0xc0(%rsp), %rax
pushq %rax
leaq 0xd0(%rsp), %rax
pushq %rax
pushq $0x1
pushq %r14
callq 0x2ad83
addq $0x30, %rsp
movq 0xb0(%rsp), %rdi
movslq 0x8c(%rsp), %rax
subl -0x4(%rdi,%rax,4), %ebx
movq 0x58(%rsp), %rax
movl %ebx, (%rax,%rbp,4)
callq 0x64b0
movq 0x38(%rsp), %rcx
jmp 0x2abc0
movq 0x58(%rsp), %rax
movl $0x0, (%rax,%rbp,4)
incq %rbp
cmpq %rbp, %rcx
jne 0x2ab33
movq 0x90(%rsp), %rdi
callq 0x64f0
movq %r12, %rdi
callq 0x64f0
movq 0x28(%rsp), %rdi
callq 0x64f0
movq 0x98(%rsp), %rbp
cmpl $0x2, %ebp
jne 0x2acd9
movq 0x58(%rsp), %rax
movslq (%rax), %rbp
movq 0x40(%rsp), %rax
movq (%rax), %rax
movslq (%rax), %r12
subq %rbp, %r12
leaq 0x1(%r12), %rdi
movq %rdi, 0x8(%rsp)
callq 0x6030
movq %rax, %rbx
testl %r12d, %r12d
js 0x2ac52
movq 0x8(%rsp), %rcx
movl %ecx, %eax
addq %rbp, %rcx
movq 0x30(%rsp), %rdx
addq %rdx, %rcx
decq %rcx
xorl %edx, %edx
movb (%rcx), %sil
movb %sil, (%rbx,%rdx)
incq %rdx
decq %rcx
cmpq %rdx, %rax
jne 0x2ac40
movq %r13, %rdi
callq 0x6030
movq %rax, %r12
movq 0x30(%rsp), %rcx
addq %rbp, %rcx
cmpl $0x0, 0x10(%rsp)
jle 0x2ac8b
movl 0x10(%rsp), %eax
leaq (%r15,%r13), %rdx
decq %rdx
xorl %esi, %esi
movb (%rdx), %dil
movb %dil, (%r12,%rsi)
incq %rsi
decq %rdx
cmpq %rsi, %rax
jne 0x2ac79
movl 0x68(%rsp), %eax
subq $0x8, %rsp
movq %r15, %rdi
movq %r12, %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %r8
movq 0x10(%rsp), %r9
pushq 0xa8(%rsp)
pushq 0xb8(%rsp)
pushq %r14
pushq %rax
leaq 0x1e8(%rsp), %rax
pushq %rax
callq 0x2bfda
addq $0x30, %rsp
movq %rbx, %rdi
callq 0x64f0
movq %r12, %rdi
callq 0x64f0
movq 0x48(%rsp), %rdi
callq 0x64f0
movq %r15, %rdi
callq 0x64b0
movq 0x30(%rsp), %rdi
callq 0x64b0
movq 0xc0(%rsp), %rbx
testq %rbx, %rbx
je 0x2ad17
movq %rbx, %rdi
callq 0x2db20
movl $0x28, %esi
movq %rbx, %rdi
callq 0x63c0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2ad33
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x63c0
movq 0x50(%rsp), %rax
addq $0x101c8, %rsp          # imm = 0x101C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2ad5c
jmp 0x2ad5c
jmp 0x2ad5c
jmp 0x2ad5c
jmp 0x2ad5c
jmp 0x2ad5c
jmp 0x2ad5c
jmp 0x2ad5c
jmp 0x2ad5c
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2ad7b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x63c0
movq %rbx, %rdi
callq 0x6660