	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function phpdbg_encode_ctrl_chars
_phpdbg_encode_ctrl_chars:              ## @phpdbg_encode_ctrl_chars
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	(%rsi), %eax
	leal	(%rax,%rax,4), %edi
	callq	_emalloc
	movq	%rax, %r15
	cmpl	$0, (%r14)
	movq	%rax, %rbx
	jle	LBB0_9
## %bb.1:
	xorl	%eax, %eax
	movq	%r15, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movb	%cl, (%rbx)
	incq	%rbx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	movslq	(%r14), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movzbl	(%rcx,%rax), %ecx
	cmpb	$31, %cl
	jg	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movw	$8998, (%rbx)                   ## imm = 0x2326
	movq	(%r12), %rcx
	movzbl	(%rcx,%rax), %ecx
	cmpb	$10, %cl
	jb	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movsbl	%cl, %ecx
	imull	$103, %ecx, %ecx
	movzwl	%cx, %edx
	shrl	$10, %ecx
	shrl	$15, %edx
	addb	%cl, %dl
	addb	$48, %dl
	movb	%dl, 2(%rbx)
	addq	$3, %rbx
	movq	(%r12), %rcx
	movzbl	(%rcx,%rax), %ecx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$2, %rbx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movsbl	%cl, %ecx
	imull	$103, %ecx, %edx
	movzwl	%dx, %esi
	shrl	$10, %edx
	shrl	$15, %esi
	addb	%dl, %sil
	movzbl	%sil, %edx
	addl	%edx, %edx
	leal	(%rdx,%rdx,4), %edx
	subb	%dl, %cl
	addb	$48, %cl
	movb	%cl, (%rbx)
	movb	$59, 1(%rbx)
	addq	$2, %rbx
	jmp	LBB0_8
LBB0_9:
	subl	%r15d, %ebx
	movq	(%r12), %rdi
	callq	_efree
	leal	1(%rbx), %esi
	movq	%r15, %rdi
	callq	_erealloc
	movq	%rax, (%r12)
	movl	%ebx, (%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_phpdbg_encode_ctrl_chars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function phpdbg_encode_ctrl_chars
_phpdbg_encode_ctrl_chars:              ; @phpdbg_encode_ctrl_chars
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x1]
	add	w0, w8, w8, lsl #2
	bl	_emalloc
	mov	x21, x0
	ldr	w8, [x19]
	mov	x13, x0
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x8, #0
	mov	w9, #8998
	mov	w10, #103
	mov	w11, #10
	mov	w12, #59
	mov	x13, x21
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	strb	w14, [x13], #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #1
	ldrsw	x14, [x19]
	cmp	x8, x14
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x20]
	ldrsb	w14, [x14, x8]
	cmp	w14, #31
	b.gt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x14, x13
	strh	w9, [x14], #2
	ldr	x15, [x20]
	ldrb	w15, [x15, x8]
	cmp	w15, #10
	b.lo	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtb	w14, w15
	mul	w14, w14, w10
	ubfx	w15, w14, #15, #1
	add	w14, w15, w14, lsr #10
	add	w15, w14, #48
	add	x14, x13, #3
	strb	w15, [x13, #2]
	ldr	x13, [x20]
	ldrb	w15, [x13, x8]
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	sxtb	w13, w15
	mul	w13, w13, w10
	ubfx	w16, w13, #15, #1
	add	w13, w16, w13, lsr #10
	msub	w13, w13, w11, w15
	add	w13, w13, #48
	strb	w13, [x14]
	add	x13, x14, #2
	strb	w12, [x14, #1]
	b	LBB0_3
LBB0_8:
	sub	w22, w13, w21
	ldr	x0, [x20]
	bl	_efree
	add	w1, w22, #1
	mov	x0, x21
	bl	_erealloc
	str	x0, [x20]
	str	w22, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_phpdbg_encode_ctrl_chars
.subsections_via_symbols
