	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ct_encode_string               ## -- Begin function ct_encode_string
	.p2align	4, 0x90
_ct_encode_string:                      ## @ct_encode_string
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rsi), %rax
	movq	_CT_BUFSIZ@GOTPCREL(%rip), %r13
	movq	%rax, %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %ecx
	subl	%eax, %ecx
	movq	8(%r15), %rsi
	movslq	%ecx, %rbx
	movq	%rsi, %rax
	subq	%rbx, %rax
	cmpq	$4, %rax
	ja	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	(%r13), %rsi
	movq	%r15, %rdi
	callq	_ct_conv_cbuff_resize
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	(%r15), %rbx
	movq	%rbx, %r14
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edx
	testl	%edx, %edx
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$5, %esi
	movq	%r14, %rdi
	callq	_ct_encode_char
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$4, %r12
	cltq
	addq	%rax, %r14
	movq	(%r15), %rax
	jmp	LBB0_2
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_8:
	movb	$0, (%r14)
	movq	(%r15), %rax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.comm	_CT_BUFSIZ,8,3                  ## @CT_BUFSIZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ct_encode_string               ; -- Begin function ct_encode_string
	.p2align	2
_ct_encode_string:                      ; @ct_encode_string
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x22, _CT_BUFSIZ@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CT_BUFSIZ@GOTPAGEOFF]
	mov	x21, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w9, w21, w8
	ldr	x8, [x19, #8]
	sxtw	x23, w9
	sub	x9, x8, x23
	cmp	x9, #4
	b.hi	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x19
	bl	_ct_conv_cbuff_resize
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	add	x21, x8, x23
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x20]
	cbz	w2, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	w1, #5
	bl	_ct_encode_char
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #4
	add	x21, x21, w0, sxtw
	ldr	x8, [x19]
	b	LBB0_2
LBB0_8:
	strb	wzr, [x21]
	ldr	x0, [x19]
	b	LBB0_10
LBB0_9:
	mov	x0, #0
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	_abort
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CT_BUFSIZ,8,3                  ; @CT_BUFSIZ
.subsections_via_symbols
