	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_svn_utf__utf16_to_utf8         ## -- Begin function svn_utf__utf16_to_utf8
	.p2align	4, 0x90
_svn_utf__utf16_to_utf8:                ## @svn_utf__utf16_to_utf8
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	_SVN_UTF__UNKNOWN_LENGTH@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r12,%rbx)
	leaq	4(%rbx), %rbx
	jne	LBB0_2
## %bb.3:
	shrq	$2, %rbx
LBB0_4:
	leal	(,%rbx,4), %esi
	leaq	-48(%rbp), %rdi
	movq	%r9, %rdx
	callq	_svn_membuf__create
	movl	$0, -52(%rbp)
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.6:
	movl	%ebx, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	shll	$10, %r15d
	andl	$1047552, %r15d                 ## imm = 0xFFC00
	andl	$1023, %r12d                    ## imm = 0x3FF
	leal	(%r15,%r12), %edx
	addl	$65536, %edx                    ## imm = 0x10000
	leaq	-48(%rbp), %rdi
	movl	%r14d, %esi
	callq	_membuf_insert_ucs4
	incq	%rbx
	xorl	%r12d, %r12d
LBB0_18:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r13d, %r14d
	movl	%r12d, %r15d
	cmpq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_19
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,4), %r12d
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %edi
	callq	_SWAP_SHORT
	movl	%eax, %r12d
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %edi
	callq	_IS_UTF16_TRAIL_SURROGATE
	leal	1(%r14), %r13d
	movl	%r13d, -52(%rbp)
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	leaq	-48(%rbp), %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_membuf_insert_ucs4
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r14d, %r13d
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	%rbx, %r14
	cmpq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	jge	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %edi
	callq	_IS_UTF16_LEAD_SURROGATE
	testq	%rax, %rax
	jne	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	leal	1(%r13), %ebx
	movl	%ebx, -52(%rbp)
	leaq	-48(%rbp), %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_membuf_insert_ucs4
	xorl	%r12d, %r12d
	movl	%ebx, %r13d
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rbx
	jmp	LBB0_18
LBB0_5:
	xorl	%r13d, %r13d
LBB0_19:
	leal	(%r13,%r13), %esi
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_svn_membuf__create
	movl	-48(%rbp), %esi
	leaq	-52(%rbp), %rcx
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_svn_utf__encode_ucs4_string
	movl	%eax, %edi
	callq	_SVN_ERR
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_apr_palloc
	movl	-56(%rbp), %ecx
	movl	%ecx, 4(%rax)
	movl	-52(%rbp), %ecx
	movl	%ecx, (%rax)
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	_SVN_NO_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SVN_UTF__UNKNOWN_LENGTH,4,2    ## @SVN_UTF__UNKNOWN_LENGTH
	.comm	_SVN_NO_ERROR,8,3               ## @SVN_NO_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_svn_utf__utf16_to_utf8         ; -- Begin function svn_utf__utf16_to_utf8
	.p2align	2
_svn_utf__utf16_to_utf8:                ; @svn_utf__utf16_to_utf8
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _SVN_UTF__UNKNOWN_LENGTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SVN_UTF__UNKNOWN_LENGTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_4
; %bb.1:
	mov	x8, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x22, x8]
	add	x8, x8, #4
	cbnz	w9, LBB0_2
; %bb.3:
	lsr	x23, x8, #2
LBB0_4:
	lsl	w1, w23, #2
	add	x0, sp, #8
	mov	x2, x5
	bl	_svn_membuf__create
	str	wzr, [sp, #12]
	cmp	w23, #1
	b.lt	LBB0_17
; %bb.5:
	mov	w25, #0
	mov	x27, #0
	mov	w26, #0
	mov	w28, w23
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w25, w23, #1
	str	w25, [sp, #12]
	add	x0, sp, #8
	mov	x1, x23
	mov	x2, x24
	bl	_membuf_insert_ucs4
	mov	w24, #0
	mov	x23, x25
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x25, x23
	mov	x26, x24
	cmp	x27, x28
	b.eq	LBB0_18
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w24, [x22, x27, lsl #2]
	cbz	w21, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x24
	bl	_SWAP_SHORT
	mov	x24, x0
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	cbz	w26, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x24
	bl	_IS_UTF16_TRAIL_SURROGATE
	add	w23, w25, #1
	str	w23, [sp, #12]
	cbz	x0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	and	w8, w24, #0x3ff
	bfi	w8, w26, #10, #10
	add	w2, w8, #16, lsl #12            ; =65536
	add	x0, sp, #8
	mov	x1, x25
	bl	_membuf_insert_ucs4
	mov	w24, #0
	add	x27, x27, #1
	b	LBB0_7
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x23, x25
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x0, sp, #8
	mov	x1, x25
	mov	x2, x26
	bl	_membuf_insert_ucs4
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x27, x27, #1
	cmp	x27, x28
	b.ge	LBB0_6
; %bb.16:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x24
	bl	_IS_UTF16_LEAD_SURROGATE
	cbnz	x0, LBB0_7
	b	LBB0_6
LBB0_17:
	mov	w23, #0
LBB0_18:
	lsl	w1, w23, #1
	mov	x0, sp
	mov	x2, x20
	bl	_svn_membuf__create
	ldr	w1, [sp, #8]
	mov	x0, sp
	add	x3, sp, #12
	mov	x2, x23
	bl	_svn_utf__encode_ucs4_string
	bl	_SVN_ERR
	mov	x0, x20
	mov	w1, #8
	bl	_apr_palloc
	ldr	w8, [sp]
	ldr	w9, [sp, #12]
	stp	w9, w8, [x0]
	str	x0, [x19]
Lloh3:
	adrp	x8, _SVN_NO_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SVN_NO_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SVN_UTF__UNKNOWN_LENGTH,4,2    ; @SVN_UTF__UNKNOWN_LENGTH
	.comm	_SVN_NO_ERROR,8,3               ; @SVN_NO_ERROR
.subsections_via_symbols
