// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/galign.c
// Function: write_indel
static void write_indel(void *km, kstring_t *str, int64_t len, const char *seq, int64_t ll, int64_t lr) // write an indel to ds
{
	int64_t i;
	if (ll + lr >= len) {
		mg_sprintf_km(km, str, "[");
		for (i = 0; i < len; ++i)
			mg_sprintf_km(km, str, "%c", "acgtn"[mg_get_nucl(seq, i)]);
		mg_sprintf_km(km, str, "]");
	} else {
		int64_t k = 0;
		if (ll > 0) {
			mg_sprintf_km(km, str, "[");
			for (i = 0; i < ll; ++i)
				mg_sprintf_km(km, str, "%c", "acgtn"[mg_get_nucl(seq, k+i)]);
			mg_sprintf_km(km, str, "]");
			k += ll;
		}
		for (i = 0; i < len - lr - ll; ++i)
			mg_sprintf_km(km, str, "%c", "acgtn"[mg_get_nucl(seq, k+i)]);
		k += len - lr - ll;
		if (lr > 0) {
			mg_sprintf_km(km, str, "[");
			for (i = 0; i < lr; ++i)
				mg_sprintf_km(km, str, "%c", "acgtn"[mg_get_nucl(seq, k+i)]);
			mg_sprintf_km(km, str, "]");
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %r9, 0x10(%rsp)
leaq (%r9,%r8), %rax
movq %rdx, %rcx
subq %rax, %rcx
jle 0x188d8
movq %r8, %r13
testq %r8, %r8
movq %rcx, 0x8(%rsp)
jle 0x18957
leaq 0xc29f(%rip), %rdx      # 0x24b27
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1bf2b
leaq 0xac93(%rip), %rbp      # 0x2352f
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x1893c
movzbl (%r15,%r12), %eax
leaq 0x15a4c(%rip), %rcx     # 0x2e300
movzbl (%rcx,%rax), %eax
leaq 0xc260(%rip), %rcx      # 0x24b1f
movsbl (%rax,%rcx), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x1bf2b
incq %r12
jmp 0x1889f
movq %rdx, %rbp
leaq 0xc245(%rip), %rdx      # 0x24b27
xorl %r12d, %r12d
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1bf2b
testq %rbp, %rbp
cmovleq %r12, %rbp
leaq 0xac2f(%rip), %r12      # 0x2352f
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x18a0a
movzbl (%r15,%r13), %eax
leaq 0x159e8(%rip), %rcx     # 0x2e300
movzbl (%rcx,%rax), %eax
leaq 0xc1fc(%rip), %rcx      # 0x24b1f
movsbl (%rax,%rcx), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1bf2b
incq %r13
jmp 0x18903
leaq 0xc537(%rip), %rdx      # 0x24e7a
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1bf2b
movq 0x8(%rsp), %rcx
jmp 0x1895a
xorl %r13d, %r13d
addq %r13, %r15
testq %rcx, %rcx
movl $0x0, %ebp
cmovgq %rcx, %rbp
leaq 0xabbf(%rip), %r13      # 0x2352f
xorl %r12d, %r12d
cmpq %r12, %rbp
je 0x189a8
movzbl (%r15,%r12), %eax
leaq 0x1597c(%rip), %rcx     # 0x2e300
movzbl (%rcx,%rax), %eax
leaq 0xc190(%rip), %rcx      # 0x24b1f
movsbl (%rax,%rcx), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1bf2b
incq %r12
jmp 0x18973
movq 0x10(%rsp), %rbp
testq %rbp, %rbp
jle 0x18a2c
leaq 0xc16e(%rip), %rdx      # 0x24b27
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1bf2b
addq 0x8(%rsp), %r15
leaq 0xab5d(%rip), %r13      # 0x2352f
xorl %r12d, %r12d
cmpq %r12, %rbp
je 0x18a0a
movzbl (%r15,%r12), %eax
leaq 0x1591a(%rip), %rcx     # 0x2e300
movzbl (%rcx,%rax), %eax
leaq 0xc12e(%rip), %rcx      # 0x24b1f
movsbl (%rax,%rcx), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1bf2b
incq %r12
jmp 0x189d5
leaq 0xc469(%rip), %rdx      # 0x24e7a
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1bf2b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop