// File: /workspace/github_c_makefile_star2_O3/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
leaq (%r9,%r8), %rax
movq %rdx, %rcx
subq %rax, %rcx
jle 0x1c03a
movq %r9, 0x10(%rsp)
testq %r8, %r8
jle 0x1c09c
movq %rcx, 0x8(%rsp)
leaq 0xdb45(%rip), %rdx      # 0x29b13
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
movq %r8, %r13
callq 0x1fdf5
leaq 0xc541(%rip), %rbp      # 0x28526
xorl %r12d, %r12d
movzbl (%r15,%r12), %eax
leaq 0x1630c(%rip), %rcx     # 0x32300
movzbl (%rcx,%rax), %eax
leaq 0xdb0c(%rip), %rcx      # 0x29b0b
movsbl (%rax,%rcx), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x1fdf5
incq %r12
cmpq %r12, %r13
jne 0x1bfe8
movq %r13, (%rsp)
leaq 0xde68(%rip), %rdx      # 0x29e8e
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1fdf5
movq 0x8(%rsp), %rcx
jmp 0x1c0a4
movq %rdx, %rbp
leaq 0xdacf(%rip), %rdx      # 0x29b13
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1fdf5
testq %rbp, %rbp
jle 0x1c157
leaq 0xc4c5(%rip), %r12      # 0x28526
xorl %r13d, %r13d
movzbl (%r15,%r13), %eax
leaq 0x16290(%rip), %rcx     # 0x32300
movzbl (%rcx,%rax), %eax
leaq 0xda90(%rip), %rcx      # 0x29b0b
movsbl (%rax,%rcx), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1fdf5
incq %r13
cmpq %r13, %rbp
jne 0x1c064
jmp 0x1c157
movq $0x0, (%rsp)
testq %rcx, %rcx
jle 0x1c0f2
movq (%rsp), %rax
leaq (%r15,%rax), %r13
xorl %r12d, %r12d
movzbl (%r13,%r12), %eax
leaq 0x1623f(%rip), %rdx     # 0x32300
movzbl (%rdx,%rax), %eax
movq %rcx, %rbp
leaq 0xda3c(%rip), %rcx      # 0x29b0b
movsbl (%rax,%rcx), %ecx
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xc446(%rip), %rdx      # 0x28526
xorl %eax, %eax
callq 0x1fdf5
movq %rbp, %rcx
incq %r12
cmpq %r12, %rbp
jne 0x1c0b4
movq 0x10(%rsp), %rbp
testq %rbp, %rbp
jle 0x1c179
leaq 0xda10(%rip), %rdx      # 0x29b13
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
movq %rcx, %r12
callq 0x1fdf5
addq (%rsp), %r15
addq %r12, %r15
leaq 0xc405(%rip), %r13      # 0x28526
xorl %r12d, %r12d
movzbl (%r15,%r12), %eax
leaq 0x161d0(%rip), %rcx     # 0x32300
movzbl (%rcx,%rax), %eax
leaq 0xd9d0(%rip), %rcx      # 0x29b0b
movsbl (%rax,%rcx), %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1fdf5
incq %r12
cmpq %r12, %rbp
jne 0x1c124
leaq 0xdd30(%rip), %rdx      # 0x29e8e
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 0x1fdf5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq