	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_string
_convert_string:                        ## @convert_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
	testl	%esi, %esi
	jle	LBB0_11
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r13
	movl	%esi, %r12d
	shll	$5, %r12d
	orl	$1, %r12d
	movl	%r12d, %edi
	callq	_malloc
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movl	%r15d, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$1, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	-1(%r13,%r12), %eax
	movl	%ebx, %ecx
	movb	%al, (%r14,%rcx)
	movl	$1, %eax
	cmpq	-48(%rbp), %r12                 ## 8-byte Folded Reload
	jae	LBB0_12
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	addl	%eax, %ebx
	incq	%r12
	cmpl	%r15d, %ebx
	jge	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	-1(%r13,%r12), %edi
	callq	_dso_json_char_needs_hexing
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	2(%rbx), %eax
	cmpl	%r15d, %eax
	jl	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	addq	%r14, %rdi
	movsbl	-1(%r13,%r12), %edx
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	movl	$4, %eax
	cmpq	-48(%rbp), %r12                 ## 8-byte Folded Reload
	jb	LBB0_7
	jmp	LBB0_12
LBB0_10:
	movq	%r14, %rdi
	callq	_free
LBB0_11:
	xorl	%r14d, %r14d
LBB0_12:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\\x%02x"

	.no_dead_strip	_convert_string
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_string
_convert_string:                        ; @convert_string
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cmp	w1, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	mov	w22, #1
	bfi	w22, w1, #5, #27
	mov	x0, x22
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_11
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	mov	x23, #0
	mov	w24, #0
	mov	w25, w20
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x21, x23]
	bl	_dso_json_char_needs_hexing
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w24, #2
	cmp	w8, w20
	b.lt	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsb	w2, [x21, x23]
	add	x0, x19, w24, uxtw
	mov	x1, x22
	bl	_sprintf
	mov	w8, #4
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w8, [x21, x23]
	strb	w8, [x19, w24, uxtw]
	mov	w8, #1
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	cmp	x23, x25
	b.hs	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w24, w8
	cmp	w24, w20
	b.lt	LBB0_3
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_free
LBB0_10:
	mov	x19, #0
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\\x%02x"

	.no_dead_strip	_convert_string
.subsections_via_symbols
