	.file	"extr_chartype.c_ct_encode_string.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ct_encode_string
	.type	ct_encode_string, @function
ct_encode_string:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L16
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r12, QWORD PTR [rsi]
	mov	rax, r12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edx, DWORD PTR 0[rbp]
	test	edx, edx
	je	.L6
.L18:
	mov	esi, 5
	mov	rdi, r12
	call	ct_encode_char@PLT
	movsx	rbx, eax
	cmp	ebx, -1
	je	.L17
.L7:
	mov	rax, QWORD PTR 0[r13]
	add	rbp, 4
	add	r12, rbx
.L8:
	mov	rsi, QWORD PTR 8[r13]
	mov	rbx, r12
	sub	rbx, rax
	movsx	rbx, ebx
	mov	rax, rsi
	sub	rax, rbx
	cmp	rax, 4
	ja	.L4
	add	rsi, QWORD PTR CT_BUFSIZ[rip]
	mov	rdi, r13
	call	ct_conv_cbuff_resize@PLT
	cmp	eax, -1
	je	.L5
	mov	edx, DWORD PTR 0[rbp]
	add	rbx, QWORD PTR 0[r13]
	mov	r12, rbx
	test	edx, edx
	jne	.L18
.L6:
	mov	BYTE PTR [r12], 0
	mov	rax, QWORD PTR 0[r13]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	xor	eax, eax
	call	abort@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	ct_encode_string, .-ct_encode_string
	.comm	CT_BUFSIZ,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_chartype.c_ct_encode_string.c"
	.text
	.align	2
	.global	ct_encode_string
	.syntax unified
	.arm
	.fpu softvfp
	.type	ct_encode_string, %function
ct_encode_string:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r0, #0
	beq	.L16
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r1]
	mov	r8, r1
	mov	r5, r4
	ldr	r7, .L19
	sub	r6, r0, #4
	b	.L8
.L4:
	ldr	r2, [r6, #4]!
	cmp	r2, #0
	beq	.L6
.L18:
	mov	r1, #5
	mov	r0, r4
	bl	ct_encode_char
	cmn	r0, #1
	mov	r5, r0
	beq	.L17
.L7:
	add	r4, r4, r5
	ldr	r5, [r8]
.L8:
	ldr	r3, [r8, #4]
	sub	r5, r4, r5
	sub	r2, r3, r5
	cmp	r2, #4
	bhi	.L4
	ldr	r1, [r7]
	mov	r0, r8
	add	r1, r3, r1
	bl	ct_conv_cbuff_resize
	cmn	r0, #1
	beq	.L5
	ldr	r2, [r6, #4]!
	ldr	r4, [r8]
	cmp	r2, #0
	add	r4, r4, r5
	bne	.L18
.L6:
	strb	r2, [r4]
	ldr	r0, [r8]
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	bl	abort
	b	.L7
.L5:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	mov	r0, #0
	bx	lr
.L20:
	.align	2
.L19:
	.word	CT_BUFSIZ
	.size	ct_encode_string, .-ct_encode_string
	.comm	CT_BUFSIZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
