// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/anchor.cpp
// Function: recalu_minimizer(unsigned long, anchor1_t*, asg16_v*, long*, long*, long*, long*, long*, unsigned long, unsigned long, tiny_queue_t*, All_reads*, UC_Read*, char*, unsigned long, unsigned long)
uint64_t recalu_minimizer(uint64_t rid, anchor1_t *z, asg16_v *sc, int64_t *iok, int64_t *ink, int64_t *ick, int64_t *str_s, int64_t *str_e, uint64_t mz_k, uint64_t mz_h, tiny_queue_t *tq, All_reads *rref, UC_Read *tu, char *qstr, uint64_t qs, uint64_t qe)
{
	int64_t id = z->srt>>33; char *str = NULL; uint64_t rpos, rspan;
	int64_t ok = *iok, nk = *ink, ck = *ick, cn = sc->n, s0, e0, s1, e1, os, oe, ots, ote, ol, wo[2], wn[2], weo[2], wen[2], ovlp, len = Get_READ_LENGTH((*rref), id); uint16_t op, bq, bt; uint32_t cl;
	e0 = ((uint32_t)z->srt) + 1; s0 = e0 - z->other_off; s1 = e1 = -1; weo[0] = weo[1] = wen[0] = wen[1] = -1;
	if(e0 <= s0) return 0;

	///debug
	// ok = nk = ck = 0;

	if((ck < 0) || (ck > cn)) {//(*ck) == cn is allowed
        ck = ok = nk = 0;
    }

	// if(id == 1/**s0 == 10260 && e0 == 10334**/) {
	// 	fprintf(stderr, "\n\n-0-qk::%ld,\ttk::%ld,\tck::%ld,\ts0::%ld,\te0::%ld\n", ok, nk, ck, s0, e0);
	// }

	while (ck > 0 && ok >= s0) {///x -> t; y -> p; first insertion and then match/mismatch
        --ck;
        op = sc->a[ck]>>14;
        // ol = (((op == 1) || (op == 2))?(sc->a[ck]&(0xfff)):(sc->a[ck]&(0x3fff)));
		if((op == 2) || (op == 3)) {
            ol = sc->a[ck]&(0xfff);
        } else if(op == 1) {
            ol = sc->a[ck]&(0x3ff);
        } else {
            ol = sc->a[ck]&(0x3fff);
        }
        if(op != 2) ok -= ol;
        if(op != 3) nk -= ol;
    }

	// char cm[4]; cm[0] = 'M'; cm[1] = 'S'; cm[2] = 'I'; cm[3] = 'D';  
	// if(id == 1/**s0 == 10260 && e0 == 10334**/) {
	// 	fprintf(stderr, "-1-qk::%ld,\ttk::%ld,\tck::%ld\n", ok, nk, ck);
	// }

	while (ck < cn && ok < e0) { ///[s0, e0)
        wo[0] = ok; wn[0] = nk; 
        // ck = pop_trace_bp(sc, ck, &op, &b, &cl);
		ck = pop_trace_bp_f(sc, ck, &op, &bq, &bt, &cl);
        if(op != 2) ok += cl;
        if(op != 3) nk += cl;
        wo[1] = ok; wn[1] = nk;  

		os = ((s0 >= wo[0])? s0 : wo[0]);
		oe = ((e0 <= wo[1])? e0 : wo[1]);
		// os = MAX(s0, wo[0]); oe = MIN(e0, wo[1]);
        ovlp = ((oe>os)? (oe-os):0);
		// if(id == 1/**s0 == 10260 && e0 == 10334**/) {
		// 	fprintf(stderr, "%u%c(q::[%ld,%ld))(t::[%ld,%ld))(ck::%ld)\n", cl, cm[op], wo[0], wo[1], wn[0], wn[1], ck);
		// }

		if(op != 2) {
			if(!ovlp) continue;
		} else {///wo[0] == wo[1]
			if(wo[0] < s0 || wo[0] >= e0) continue;
		}

		if(op < 2) {
            ots = os - wo[0] + wn[0]; ote = oe - wo[0] + wn[0];
        } else {///op == 2: more y; p == 3: more x
            ots = wn[0]; ote = wn[1];
        } 

		if(s1 == -1) s1 = ots;
		e1 = ote;

        if((op == 0) && (ovlp > 0) && (ovlp > weo[1] - weo[0])) {
			weo[0] = os; weo[1] = oe;
			wen[0] = ots; wen[1] = ote;
        }
    }

	while (ck < cn && ok <= e0) { ///[s0, e0)
        wo[0] = ok; wn[0] = nk; 
        // pop_trace_bp(sc, ck, &op, &b, &cl);
		pop_trace_bp_f(sc, ck, &op, &bq, &bt, &cl);
		if(op != 2) break;
		// ck = pop_trace_bp(sc, ck, &op, &b, &cl);
		ck = pop_trace_bp_f(sc, ck, &op, &bq, &bt, &cl);
        // if(op != 2) ok += cl;
        // if(op != 3) nk += cl;
		nk += cl;
        wo[1] = ok; wn[1] = nk;  

		// if(id == 1/**s0 == 10260 && e0 == 10334**/) {
		// 	fprintf(stderr, "%u%c(q::[%ld,%ld))(t::[%ld,%ld))(ck::%ld)\n", cl, cm[op], wo[0], wo[1], wn[0], wn[1], ck);
		// }

		if(wo[0] >= s0 && wo[0] <= e0) {
			ots = wn[0]; ote = wn[1];
			if(s1 == -1) s1 = ots;
			e1 = ote;
		}
    }

	assert(wen[1] <= len);
	assert(e1 <= len);

	*iok = ok; *ink = nk; *ick = ck; 

	if(weo[0] == s0 && weo[1] == e0) {
		z->srt >>= 32; z->srt <<= 32; z->srt |= ((uint64_t)(wen[1]-1));
		///debug
		// char sstr[256]; recover_UC_Read_sub_region(sstr, wen[0], wen[1] - wen[0], 0, rref, id);
		// if(recalu_minimizer0(sstr, wen[1] - wen[0], !(asm_opt.flag & HA_F_NO_HPC), mz_k, mz_h, tq, &rpos, &rspan) && (rpos + 1 == ((uint64_t)(wen[1] - wen[0]))) && (((uint64_t)(wen[1] - wen[0])) == rspan)) {
		// 	// fprintf(stderr, "-0-[M::%s]\n", __func__);
		// } else {
		// 	// if(((z->srt>>32)&1) == 0) {
		// 		fprintf(stderr, "-1-[M::%s]\trid::%lu\ttid::%ld\t%c\trg1::[%ld,%ld)\trg0::[%ld,%ld)\tspan::%ld\n", __func__, rid, id, "+-"[(z->srt>>32)&1], wen[0], wen[1], s0, e0, e0 - s0);
		// 		fprintf(stderr, "tstr::%.*s\n", ((uint32_t)(wen[1] - wen[0])), sstr);
		// 		fprintf(stderr, "qstr::%.*s\n", ((uint32_t)(qe - qs)), qstr + qs);
		// 		exit(1);
		// 	// }
		// }
		// if(rid == 3196 && id == 3199) fprintf(stderr, "-full-[M::%s]\n", __func__);
		return 1;
	}

	if(e1 <= s1) return 0;

	

	if(s1 >= (*str_s) && e1 <= (*str_e)) {
		str = tu->seq + s1 - (*str_s);
	} else {
		if(s1 >= (*str_s) && (s1 < (*str_e)) && (e1 > (*str_e))) {
			UC_Read_resize((*tu), (e1 - (*str_s))); 
			recover_UC_Read_sub_region(tu->seq + (*str_e) - (*str_s), (*str_e), e1 - (*str_e), 0, rref, id);
			str = tu->seq + s1 - (*str_s); (*str_e) = e1;
		} else {
			UC_Read_resize((*tu), (e1 - s1)); 
			recover_UC_Read_sub_region(tu->seq, s1, e1 - s1, 0, rref, id);
			str = tu->seq; (*str_s) = s1; (*str_e) = e1;
		}
	}

	if(recalu_minimizer0(str, e1 - s1, !(asm_opt.flag & HA_F_NO_HPC), mz_k, mz_h, tq, &rpos, &rspan)) {
		rpos += s1;
		z->srt >>= 32; z->srt <<= 32; z->srt |= rpos; z->other_off = rspan;
		// fprintf(stderr, "-1-[M::%s]\trid::%lu\ttid::%ld\t%c\trg1::[%ld,%ld)\trg0::[%ld,%ld)\tspan::%ld\n", __func__, rid, id, "+-"[(z->srt>>32)&1], s1, e1, s0, e0, e0 - s0);
		// if(rid == 3196 && id == 3199) fprintf(stderr, "-part-[M::%s]\n", __func__);
		return 1;
	}
	// fprintf(stderr, "-0-[M::%s]\trid::%lu\ttid::%ld\t%c\trg1::[%ld,%ld)\trg0::[%ld,%ld)\tspan::%ld\n", __func__, rid, id, "+-"[(z->srt>>32)&1], s1, e1, s0, e0, e0 - s0);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl 0xc(%rsi), %eax
testq %rax, %rax
je 0x12b383
movq 0xe8(%rsp), %r10
movq (%rsi), %r11
movq (%rdx), %rdi
leal 0x1(%r11), %r13d
movq (%r9), %rbp
testq %rbp, %rbp
sets %bl
movq %rdi, 0x10(%rsp)
cmpq %rdi, %rbp
setg %dil
orb %bl, %dil
movq %r8, 0x70(%rsp)
jne 0x12ac70
movq (%r8), %r8
movq (%rcx), %r12
jmp 0x12ac78
xorl %ebp, %ebp
xorl %r8d, %r8d
xorl %r12d, %r12d
shrq $0x21, %r11
movq %r11, 0x40(%rsp)
movq 0x18(%r10), %r15
movq %r13, %rdi
subq %rax, %rdi
testq %rbp, %rbp
movq %rsi, 0x50(%rsp)
movq %r9, 0x60(%rsp)
movq %rcx, 0x68(%rsp)
jle 0x12ad16
cmpq %rdi, %r12
movq %rdi, %rcx
jl 0x12ad11
movq 0x10(%rdx), %rax
movl $0xfff, %r10d           # imm = 0xFFF
xorl %ebx, %ebx
movzwl -0x2(%rax,%rbp,2), %edi
movl %edi, %esi
shrl $0xe, %esi
movl $0x3ff, %r14d           # imm = 0x3FF
cmpw $0x1, %si
je 0x12accf
movl $0x3fff, %r14d          # imm = 0x3FFF
testw %di, %di
cmovsl %r10d, %r14d
leaq -0x1(%rbp), %r11
andl %edi, %r14d
cmpw $0x2, %si
movq %r14, %rdi
cmoveq %rbx, %rdi
subq %rdi, %r12
movq %r12, %rdi
cmpw $0x3, %si
cmoveq %rbx, %r14
subq %r14, %r8
cmpq $0x2, %rbp
jl 0x12ad0c
movq %r11, %rbp
movq %rdi, %r12
cmpq %rcx, %rdi
jge 0x12acb3
jmp 0x12ad1c
movq %rdi, %r12
jmp 0x12ad1c
movq %rbp, %r11
jmp 0x12ad1c
movq %rbp, %r11
movq %rdi, %rcx
movq %rcx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq (%r15,%rax,8), %rax
movq $-0x1, %rsi
cmpq 0x10(%rsp), %r11
movq %r12, %rdi
movq %rax, 0x78(%rsp)
jge 0x12af83
cmpq %r13, %rdi
jge 0x12af83
movq 0x10(%rdx), %r14
movq $-0x1, 0x38(%rsp)
xorl %ebx, %ebx
movq $-0x1, 0x30(%rsp)
movq $-0x1, 0x28(%rsp)
movq $-0x1, %r12
movq %rdx, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rbp
movq %r8, %r9
movl %r11d, %eax
movzwl (%r14,%rax,2), %r15d
movl %r15d, %r12d
shrl $0xe, %r12d
leal -0x2(%r12), %eax
cmpl $0x2, %eax
jae 0x12adb6
movl %r15d, %ecx
shrl $0xc, %ecx
andl $0x3, %ecx
movl %r15d, %eax
andl $0xfff, %eax            # imm = 0xFFF
jmp 0x12adc7
testl %r12d, %r12d
jne 0x12adcf
movl %r15d, %eax
andl $0x3fff, %eax           # imm = 0x3FFF
movw $0xffff, %cx            # imm = 0xFFFF
movl $0xffff, %r8d           # imm = 0xFFFF
jmp 0x12adeb
movl %r15d, %ecx
shrl $0xc, %ecx
andl $0x3, %ecx
movl %r15d, %r8d
shrl $0xa, %r8d
andl $0x3, %r8d
movl %r15d, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movzwl %ax, %edx
incl %r11d
cmpq %r11, 0x10(%rsp)
jbe 0x12ae61
movzwl (%r14,%r11,2), %eax
movl %eax, %esi
shrl $0xe, %esi
cmpl %r12d, %esi
jne 0x12ae61
movzwl %r12w, %esi
leal -0x2(%rsi), %edi
cmpl $0x2, %edi
jae 0x12ae25
movl %eax, %r10d
shrl $0xc, %r10d
andl $0x3, %r10d
andl $0xfff, %eax            # imm = 0xFFF
jmp 0x12ae33
testl %esi, %esi
jne 0x12ae3a
andl $0x3fff, %eax           # imm = 0x3FFF
movw $0xffff, %r10w          # imm = 0xFFFF
movl $0xffff, %esi           # imm = 0xFFFF
jmp 0x12ae52
movl %eax, %r10d
shrl $0xc, %r10d
andl $0x3, %r10d
movl %eax, %esi
shrl $0xa, %esi
andl $0x3, %esi
andl $0x3ff, %eax            # imm = 0x3FF
cmpl %r8d, %esi
jne 0x12ae61
cmpw %r10w, %cx
jne 0x12ae61
addl %eax, %edx
jmp 0x12adee
cmpw $0x2, %r12w
movl %edx, %r8d
movq %r8, %rdi
cmoveq %rbx, %rdi
addq %rbp, %rdi
cmpw $0x3, %r12w
cmoveq %rbx, %r8
addq %r9, %r8
movq 0x48(%rsp), %rcx
cmpq %rbp, %rcx
movq %rbp, %rax
cmovgq %rcx, %rax
cmpq %rdi, %r13
movq %rdi, %rdx
cmovlq %r13, %rdx
movq %rdx, %r10
subq %rax, %r10
cmovleq %rbx, %r10
movl %r11d, %r11d
cmpw $0x2, %r12w
jne 0x12aeb3
cmpq %rcx, %rbp
jl 0x12aeb8
jmp 0x12aed7
testq %r10, %r10
jne 0x12aed7
cmpq %r11, 0x10(%rsp)
jle 0x12afa7
movq %rdi, %rbp
movq %r8, %r9
cmpq %r13, %rdi
jl 0x12ad8a
jmp 0x12afa7
movq %rdi, 0x18(%rsp)
movq %rax, %rcx
subq %rbp, %rcx
movq %rdx, %rsi
subq %rbp, %rsi
addq %r9, %rsi
testw %r15w, %r15w
cmovsq %rbx, %rcx
movq %r8, %r12
cmovnsq %rsi, %r12
addq %r9, %rcx
movq 0x8(%rsp), %rdi
cmpq $-0x1, %rdi
cmovneq %rdi, %rcx
movq %rcx, 0x8(%rsp)
cmpl $0x4000, %r15d          # imm = 0x4000
setb %dil
testq %r10, %r10
setg %r9b
movq 0x28(%rsp), %rcx
movq %rcx, %r15
movq 0x30(%rsp), %rbp
subq %rbp, %r15
cmpq %r15, %r10
setg %r10b
andb %r9b, %r10b
testb %dil, %r10b
cmovneq %rdx, %rcx
movq %rcx, 0x28(%rsp)
cmovneq %rax, %rbp
movq %rbp, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmovneq %rsi, %rax
movq %rax, 0x38(%rsp)
cmpq %r11, 0x10(%rsp)
jle 0x12b397
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rdx
jl 0x12ad7a
jmp 0x12afb6
movq $-0x1, %r12
movq $-0x1, 0x28(%rsp)
movq $-0x1, 0x30(%rsp)
movq $-0x1, 0x38(%rsp)
jmp 0x12afb6
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %r12
movq 0x20(%rsp), %rdx
cmpq 0x10(%rsp), %r11
jge 0x12b165
cmpq %r13, %rdi
jg 0x12b165
movq 0x10(%rdx), %rdx
movq %r13, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
movq %r12, %rcx
movl %r11d, %eax
movzwl (%rdx,%rax,2), %r10d
movl %r10d, %ebx
shrl $0xe, %ebx
movl $0xffff, %ebp           # imm = 0xFFFF
leal -0x2(%rbx), %eax
cmpl $0x2, %eax
jae 0x12b008
movl %r10d, %r9d
shrl $0xc, %r9d
andl $0x3, %r9d
jmp 0x12b025
movw $0xffff, %r9w           # imm = 0xFFFF
testl %ebx, %ebx
je 0x12b025
movl %r10d, %r9d
shrl $0xc, %r9d
andl $0x3, %r9d
movl %r10d, %ebp
shrl $0xa, %ebp
andl $0x3, %ebp
leal 0x1(%r11), %r14d
movzwl %bx, %r15d
cmpq %r14, 0x10(%rsp)
jbe 0x12b096
leal 0x2(%r11), %r13d
leal -0x2(%r15), %eax
movq %r14, %rsi
movzwl (%rdx,%rsi,2), %esi
movl %esi, %edi
shrl $0xe, %edi
cmpw %bx, %di
jne 0x12b096
movl $0xffff, %edi           # imm = 0xFFFF
cmpl $0x2, %eax
jae 0x12b062
shrl $0xc, %esi
andl $0x3, %esi
movl %esi, %r12d
jmp 0x12b07f
movw $0xffff, %r12w          # imm = 0xFFFF
testl %r15d, %r15d
je 0x12b07f
movl %esi, %r12d
shrl $0xc, %r12d
andl $0x3, %r12d
shrl $0xa, %esi
andl $0x3, %esi
movl %esi, %edi
cmpl %ebp, %edi
jne 0x12b096
cmpw %r12w, %r9w
jne 0x12b096
movl %r13d, %esi
incl %r13d
cmpq %rsi, 0x10(%rsp)
ja 0x12b03f
cmpw $0x2, %bx
jne 0x12b16a
movl %r10d, %r11d
andl $0xfff, %r11d           # imm = 0xFFF
cmpq %r14, 0x10(%rsp)
movq 0x20(%rsp), %r13
movq %rcx, %r12
movq 0x18(%rsp), %rdi
jbe 0x12b12d
shrl $0xc, %r10d
andl $0x3, %r10d
movzwl (%rdx,%r14,2), %eax
movl %eax, %esi
shrl $0xe, %esi
cmpl %ebx, %esi
jne 0x12b12d
leal -0x2(%r15), %esi
cmpl $0x2, %esi
jae 0x12b0ef
movl %eax, %r9d
shrl $0xc, %r9d
andl $0x3, %r9d
andl $0xfff, %eax            # imm = 0xFFF
jmp 0x12b0fe
testl %r15d, %r15d
jne 0x12b103
andl $0x3fff, %eax           # imm = 0x3FFF
movw $0xffff, %r9w           # imm = 0xFFFF
movb $0x1, %sil
jmp 0x12b115
movl %eax, %r9d
shrl $0xc, %r9d
andl $0x3, %r9d
andl $0x3ff, %eax            # imm = 0x3FF
xorl %esi, %esi
testb %sil, %sil
je 0x12b12d
cmpw %r9w, %r10w
jne 0x12b12d
addl %eax, %r11d
incl %r14d
cmpq %r14, 0x10(%rsp)
ja 0x12b0c6
movl %r11d, %eax
addq %r8, %rax
movq 0x8(%rsp), %rsi
cmpq $-0x1, %rsi
cmovneq %rsi, %r8
cmpq 0x48(%rsp), %rdi
cmovgeq %r8, %rsi
movl %r14d, %r11d
cmovgeq %rax, %r12
cmpq %r11, 0x10(%rsp)
jle 0x12b17f
movq %rax, %r8
cmpq %r13, %rdi
jle 0x12afd8
jmp 0x12b17f
movq %r8, %rax
jmp 0x12b17f
movq %r8, %rax
movq 0x20(%rsp), %r13
movq %rcx, %r12
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x38(%rsp), %r8
movq 0x78(%rsp), %rcx
cmpq %rcx, %r8
jg 0x12b3a6
cmpq %rcx, %r12
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
jg 0x12b3c5
movq %rdi, (%rcx)
movq %rax, (%rdx)
movq 0x60(%rsp), %rax
movq %r11, (%rax)
movq 0x30(%rsp), %rax
cmpq 0x48(%rsp), %rax
jne 0x12b1e0
cmpq %r13, 0x28(%rsp)
jne 0x12b1e0
movq 0x50(%rsp), %rcx
movl 0x4(%rcx), %eax
shlq $0x20, %rax
decq %r8
orq %rax, %r8
movq %r8, (%rcx)
jmp 0x12b37c
movq %r12, %r15
subq %rsi, %r15
jle 0x12b383
movq 0xf0(%rsp), %r14
movq 0xe0(%rsp), %rbx
movq 0xd8(%rsp), %rbp
movq 0xd0(%rsp), %rcx
movq 0xc8(%rsp), %rdx
movq 0xc0(%rsp), %r13
movq (%r13), %rax
cmpq %rax, %rsi
movq %rsi, 0x8(%rsp)
jge 0x12b28f
movq %rdx, %rbp
cmpq %r15, 0x10(%r14)
jge 0x12b24a
movq (%r14), %rdi
movq %r15, %rsi
callq 0x2370
movq 0x8(%rsp), %rsi
movq %rax, (%r14)
movq %r15, 0x10(%r14)
movq (%r14), %rdi
movq %r15, %rdx
xorl %ecx, %ecx
movq 0xe8(%rsp), %r8
movq 0x40(%rsp), %r9
movq %rsi, %rbx
callq 0x337f7
movq (%r14), %rdi
movq %rbx, (%r13)
movq %r12, (%rbp)
movq 0xe0(%rsp), %rbx
movq 0xd8(%rsp), %rbp
movq 0xd0(%rsp), %rcx
jmp 0x12b31c
cmpq (%rdx), %r12
jle 0x12b313
cmpq %rax, %rsi
jl 0x12b22a
movq (%rdx), %rcx
cmpq %rcx, %rsi
jge 0x12b22a
cmpq %rcx, %r12
jle 0x12b22a
movq %r12, %rsi
subq %rax, %rsi
cmpq %rsi, 0x10(%r14)
jge 0x12b2d0
movq (%r14), %rdi
callq 0x2370
movq 0xc8(%rsp), %rdx
movq %rax, (%r14)
movq %r12, %rax
subq (%r13), %rax
movq %rax, 0x10(%r14)
movq (%rdx), %rsi
movq (%r14), %rdi
addq %rsi, %rdi
subq (%r13), %rdi
movq %r12, %rdx
subq %rsi, %rdx
xorl %ecx, %ecx
movq 0xe8(%rsp), %r8
movq 0x40(%rsp), %r9
callq 0x337f7
movq (%r14), %rdi
addq 0x8(%rsp), %rdi
subq (%r13), %rdi
movq 0xc8(%rsp), %rax
movq %r12, (%rax)
jmp 0x12b282
movq (%r14), %rdi
addq %rsi, %rdi
subq %rax, %rdi
leaq 0x15f435(%rip), %rax    # 0x28a758
movl (%rax), %edx
notl %edx
andl $0x1, %edx
leaq 0x80(%rsp), %rax
leaq 0x58(%rsp), %r10
movq %r15, %rsi
movq %rbp, %r8
movq %rbx, %r9
pushq %rax
pushq %r10
callq 0x129fdc
addq $0x10, %rsp
testq %rax, %rax
je 0x12b383
movq 0x8(%rsp), %r13
addq 0x58(%rsp), %r13
movq %r13, 0x58(%rsp)
movq 0x50(%rsp), %rcx
movl 0x4(%rcx), %eax
shlq $0x20, %rax
orq %r13, %rax
movq %rax, (%rcx)
movl 0x80(%rsp), %eax
movl %eax, 0xc(%rcx)
movl $0x1, %eax
jmp 0x12b385
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
jmp 0x12afb1
leaq 0x10390e(%rip), %rdi    # 0x22ecbb
leaq 0x10363f(%rip), %rsi    # 0x22e9f3
leaq 0x10390e(%rip), %rcx    # 0x22ecc9
movl $0xa2c, %edx            # imm = 0xA2C
callq 0x2110
leaq 0x1039c8(%rip), %rdi    # 0x22ed94
leaq 0x103620(%rip), %rsi    # 0x22e9f3
leaq 0x1038ef(%rip), %rcx    # 0x22ecc9
movl $0xa2d, %edx            # imm = 0xA2D
callq 0x2110