	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _citrus_UTF1632_wcrtomb_priv
__citrus_UTF1632_wcrtomb_priv:          ## @_citrus_UTF1632_wcrtomb_priv
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movq	%rdi, %rbx
	movl	(%r8), %edx
	movq	__ENDIAN_UNKNOWN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_3
## %bb.1:
	movl	(%rbx), %eax
	movq	__MODE_FORCE_ENDIAN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.2:
	xorl	%edi, %edi
	movq	%rsi, %rax
	jmp	LBB0_6
LBB0_3:
	xorl	%edi, %edi
	movq	%rsi, %rax
	jmp	LBB0_7
LBB0_4:
	movq	__MODE_UTF32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	testl	%eax, %ecx
	setne	%dl
	leaq	(%rdx,%rdx), %r14
	addq	$2, %r14
	cmpq	%r12, %r14
	ja	LBB0_21
## %bb.5:
	testl	%eax, %ecx
	leaq	__citrus_UTF1632_wcrtomb_priv._bom+2(%rip), %rax
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	__citrus_UTF1632_wcrtomb_priv._bom(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	callq	_memcpy
	movq	%r14, %rdi
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%r14), %rax
	subq	%r14, %r12
LBB0_6:
	movl	4(%rbx), %edx
	movl	%edx, (%r15)
LBB0_7:
	movq	__MODE_UTF32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_13
## %bb.8:
	movq	%r13, %rcx
                                        ## kill: def $ecx killed $ecx killed $rcx
	andl	$-2048, %ecx                    ## imm = 0xF800
	cmpl	$55296, %ecx                    ## imm = 0xD800
	je	LBB0_15
## %bb.9:
	cmpq	$4, %r12
	jb	LBB0_21
## %bb.10:
	leaq	4(%rdi), %rcx
	cmpl	$128, %edx
	je	LBB0_23
## %bb.11:
	cmpl	$129, %edx
	jne	LBB0_32
## %bb.12:
	movl	%r13d, %edx
	rolw	$8, %dx
	movw	%dx, 2(%rax)
	movl	%r13d, %edx
	shrl	$16, %edx
	movb	%dl, 1(%rax)
	shrl	$24, %r13d
	movb	%r13b, (%rsi,%rdi)
	jmp	LBB0_32
LBB0_13:
	movq	%r13, %rcx
	cmpl	$65536, %ecx                    ## imm = 0x10000
	jl	LBB0_16
## %bb.14:
	cmpl	$1114111, %ecx                  ## imm = 0x10FFFF
	jbe	LBB0_20
LBB0_15:
	movq	$-1, (%r9)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_16:
	cmpq	$2, %r12
	jb	LBB0_21
## %bb.17:
	movq	%rsi, %r8
	leaq	2(%rdi), %rcx
	xorl	%esi, %esi
	movq	%r13, %rbx
	cmpl	$129, %edx
	je	LBB0_25
LBB0_18:
	cmpl	$128, %edx
	jne	LBB0_26
## %bb.19:
	movb	%bl, (%r8,%rdi)
	movb	%bh, 1(%rax)
	jmp	LBB0_26
LBB0_20:
	cmpq	$4, %r12
	jae	LBB0_24
LBB0_21:
	movq	$-1, (%r9)
	movq	_E2BIG@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
	jmp	LBB0_33
LBB0_23:
	movq	%r13, %rbx
	movb	%bl, (%rsi,%rdi)
	movb	%bh, 1(%rax)
	movl	%ebx, %edx
	shrl	$16, %edx
	movb	%dl, 2(%rax)
	shrl	$24, %ebx
	movb	%bl, 3(%rax)
	jmp	LBB0_32
LBB0_24:
	movq	%rsi, %r8
	leaq	4(%rdi), %rcx
	movq	%rdi, %r10
	leal	-65536(%r13), %edi
	andl	$1023, %r13d                    ## imm = 0x3FF
	movl	%r13d, %esi
	orl	$56320, %esi                    ## imm = 0xDC00
	shrl	$10, %edi
	orl	$55296, %edi                    ## imm = 0xD800
	movl	%edi, %ebx
	movq	%r10, %rdi
	cmpl	$129, %edx
	jne	LBB0_18
LBB0_25:
	movb	%bl, 1(%rax)
	movq	%r8, %rdx
	movb	%bh, (%rdx,%rdi)
LBB0_26:
	testl	%esi, %esi
	je	LBB0_32
## %bb.27:
	movl	(%r15), %edx
	cmpl	$129, %edx
	je	LBB0_30
## %bb.28:
	cmpl	$128, %edx
	je	LBB0_31
	jmp	LBB0_32
LBB0_30:
	rolw	$8, %si
LBB0_31:
	movw	%si, 2(%rax)
LBB0_32:
	movq	%rcx, (%r9)
	xorl	%eax, %eax
LBB0_33:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
__citrus_UTF1632_wcrtomb_priv._bom:     ## @_citrus_UTF1632_wcrtomb_priv._bom
	.ascii	"\000\000\376\377"

	.comm	__ENDIAN_UNKNOWN,4,2            ## @_ENDIAN_UNKNOWN
	.comm	__MODE_FORCE_ENDIAN,4,2         ## @_MODE_FORCE_ENDIAN
	.comm	__MODE_UTF32,4,2                ## @_MODE_UTF32
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_E2BIG,4,2                      ## @E2BIG
	.no_dead_strip	__citrus_UTF1632_wcrtomb_priv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _citrus_UTF1632_wcrtomb_priv
__citrus_UTF1632_wcrtomb_priv:          ; @_citrus_UTF1632_wcrtomb_priv
	.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
	mov	x19, x5
	mov	x22, x4
	mov	x20, x3
	mov	x24, x2
	mov	x21, x1
	mov	x25, x0
	ldr	w10, [x4]
Lloh0:
	adrp	x8, __ENDIAN_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, __ENDIAN_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x26, __MODE_UTF32@GOTPAGE
Lloh4:
	ldr	x26, [x26, __MODE_UTF32@GOTPAGEOFF]
	cmp	w10, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x25]
Lloh5:
	adrp	x9, __MODE_FORCE_ENDIAN@GOTPAGE
Lloh6:
	ldr	x9, [x9, __MODE_FORCE_ENDIAN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x23, #0
	mov	x8, x21
	b	LBB0_6
LBB0_3:
	mov	x23, #0
	mov	x8, x21
	b	LBB0_7
LBB0_4:
	ldr	w9, [x26]
	ands	w8, w9, w8
	mov	w9, #4
	mov	w10, #2
	csel	x23, x10, x9, eq
	cmp	x23, x24
	b.hi	LBB0_21
; %bb.5:
Lloh8:
	adrp	x9, __citrus_UTF1632_wcrtomb_priv._bom@PAGE
Lloh9:
	add	x9, x9, __citrus_UTF1632_wcrtomb_priv._bom@PAGEOFF
	add	x10, x9, #2
	cmp	w8, #0
	csel	x1, x10, x9, eq
	mov	x0, x21
	mov	x2, x23
	bl	_memcpy
	add	x8, x21, x23
	sub	x24, x24, x23
LBB0_6:
	ldr	w10, [x25, #4]
	str	w10, [x22]
LBB0_7:
	ldr	w9, [x25]
	ldr	w11, [x26]
	tst	w11, w9
	b.eq	LBB0_13
; %bb.8:
	lsr	w9, w20, #11
	cmp	w9, #27
	b.eq	LBB0_15
; %bb.9:
	cmp	x24, #4
	b.lo	LBB0_21
; %bb.10:
	add	x9, x23, #4
	cmp	w10, #128
	b.eq	LBB0_23
; %bb.11:
	cmp	w10, #129
	b.ne	LBB0_31
; %bb.12:
	rev	w10, w20
	lsr	w10, w10, #16
	strh	w10, [x8, #2]
	lsr	w10, w20, #16
	strb	w10, [x8, #1]
	lsr	w8, w20, #24
	strb	w8, [x21, x23]
	b	LBB0_31
LBB0_13:
	subs	w12, w20, #16, lsl #12          ; =65536
	b.lt	LBB0_16
; %bb.14:
	lsr	w9, w20, #16
	cmp	w9, #16
	b.ls	LBB0_20
LBB0_15:
	mov	x8, #-1
	str	x8, [x19]
Lloh10:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_22
LBB0_16:
	cmp	x24, #2
	b.lo	LBB0_21
; %bb.17:
	mov	w11, #0
	add	x9, x23, #2
	cmp	w10, #129
	b.eq	LBB0_25
LBB0_18:
	cmp	w10, #128
	b.ne	LBB0_26
; %bb.19:
	strb	w20, [x21, x23]
	lsr	w10, w20, #8
	strb	w10, [x8, #1]
	b	LBB0_26
LBB0_20:
	cmp	x24, #4
	b.hs	LBB0_24
LBB0_21:
	mov	x8, #-1
	str	x8, [x19]
Lloh12:
	adrp	x8, _E2BIG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x8]
	b	LBB0_32
LBB0_23:
	strb	w20, [x21, x23]
	lsr	w10, w20, #8
	strb	w10, [x8, #1]
	lsr	w10, w20, #16
	strb	w10, [x8, #2]
	lsr	w10, w20, #24
	strb	w10, [x8, #3]
	b	LBB0_31
LBB0_24:
	add	x9, x23, #4
	mov	w11, #56320
	bfxil	w11, w20, #0, #10
	mov	w13, #55296
	orr	w20, w13, w12, lsr #10
	cmp	w10, #129
	b.ne	LBB0_18
LBB0_25:
	strb	w20, [x8, #1]
	lsr	w10, w20, #8
	strb	w10, [x21, x23]
LBB0_26:
	cbz	w11, LBB0_31
; %bb.27:
	ldr	w10, [x22]
	cmp	w10, #129
	b.eq	LBB0_30
; %bb.28:
	cmp	w10, #128
	b.ne	LBB0_31
; %bb.29:
	strh	w11, [x8, #2]
	b	LBB0_31
LBB0_30:
	rev16	w10, w11
	strh	w10, [x8, #2]
LBB0_31:
	mov	w0, #0
	str	x9, [x19]
LBB0_32:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
__citrus_UTF1632_wcrtomb_priv._bom:     ; @_citrus_UTF1632_wcrtomb_priv._bom
	.ascii	"\000\000\376\377"

	.comm	__ENDIAN_UNKNOWN,4,2            ; @_ENDIAN_UNKNOWN
	.comm	__MODE_FORCE_ENDIAN,4,2         ; @_MODE_FORCE_ENDIAN
	.comm	__MODE_UTF32,4,2                ; @_MODE_UTF32
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_E2BIG,4,2                      ; @E2BIG
	.no_dead_strip	__citrus_UTF1632_wcrtomb_priv
.subsections_via_symbols
