	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__collate_wxfrm                 ## -- Begin function _collate_wxfrm
	.p2align	4, 0x90
__collate_wxfrm:                        ## @_collate_wxfrm
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movl	(%rax), %r15d
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_assert
	testl	%r15d, %r15d
	js	LBB0_37
## %bb.1:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	leal	1(%r15), %eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -120(%rbp)                ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	cmpq	-112(%rbp), %r14                ## 8-byte Folded Reload
	movq	-120(%rbp), %r15                ## 8-byte Reload
	je	LBB0_42
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
                                        ##     Child Loop BB0_29 Depth 2
	movq	$0, -56(%rbp)
	testq	%r14, %r14
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	$1, (%rax)
	addq	$8, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	decq	%rbx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r15, %r14
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_DIRECTIVE_UNDEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DIRECTIVE_FORWARD@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	(%rax,%r14,4), %edx
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_DIRECTIVE_BACKWARD@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%edx, -84(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_wcsdup
	testq	%rax, %rax
	je	LBB0_40
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_wcslen
	cltq
	leaq	(%r15,%rax,8), %rax
	addq	$-8, %rax
	cmpq	%rax, %r15
	jae	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rcx
	addq	$8, %rcx
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-8(%rcx), %rdx
	movq	(%rax), %rsi
	movq	%rsi, -8(%rcx)
	movq	%rdx, (%rax)
	addq	$-8, %rax
	leaq	8(%rcx), %rdx
	cmpq	%rax, %rcx
	movq	%rdx, %rcx
	jb	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rax
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-104(%rbp), %r15                ## 8-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rax
	orq	-56(%rbp), %rax
	setne	%al
	movq	_DIRECTIVE_POSITION@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_28
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	testb	%al, %al
	je	LBB0_2
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	leaq	-60(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movl	%r14d, %r8d
	leaq	-56(%rbp), %r9
	callq	__collate_lookup
	movslq	-60(%rbp), %rax
	movl	-44(%rbp), %ecx
	testl	%ecx, %ecx
	jle	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	testq	%rbx, %rbx
	je	LBB0_25
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=2
	movslq	%ecx, %rcx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, (%rdx)
	addq	$8, %rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	decq	%rbx
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_20 Depth=2
	js	LBB0_39
## %bb.24:                              ##   in Loop: Header=BB0_20 Depth=2
	movq	$0, -56(%rbp)
	movq	_COLLATE_MAX_PRIORITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)
	testq	%rbx, %rbx
	jne	LBB0_22
LBB0_25:                                ##   in Loop: Header=BB0_20 Depth=2
	xorl	%ebx, %ebx
LBB0_26:                                ##   in Loop: Header=BB0_20 Depth=2
	leaq	(%r15,%rax,8), %r15
	incq	%r13
	cmpq	$0, (%r15)
	jne	LBB0_20
## %bb.27:                              ##   in Loop: Header=BB0_20 Depth=2
	cmpq	$0, -56(%rbp)
	movq	%r13, %r12
	jne	LBB0_20
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_3 Depth=1
	testb	%al, %al
	je	LBB0_2
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	leaq	-60(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movl	%r14d, %r8d
	leaq	-56(%rbp), %r9
	callq	__collate_lookup
	movslq	-60(%rbp), %rax
	leaq	(%r15,%rax,8), %r15
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jg	LBB0_32
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=2
	testl	%eax, %eax
	js	LBB0_39
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=2
	movq	$0, -56(%rbp)
	cmpq	$0, (%r15)
	jne	LBB0_29
	jmp	LBB0_2
LBB0_32:                                ##   in Loop: Header=BB0_29 Depth=2
	testq	%rbx, %rbx
	je	LBB0_34
## %bb.33:                              ##   in Loop: Header=BB0_29 Depth=2
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	addq	$8, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	decq	%rbx
	jmp	LBB0_35
LBB0_34:                                ##   in Loop: Header=BB0_29 Depth=2
	xorl	%ebx, %ebx
LBB0_35:                                ##   in Loop: Header=BB0_29 Depth=2
	incq	%r13
	cmpq	$0, (%r15)
	movq	%r13, %r12
	jne	LBB0_29
## %bb.36:                              ##   in Loop: Header=BB0_29 Depth=2
	cmpq	$0, -56(%rbp)
	movq	%r13, %r12
	jne	LBB0_29
	jmp	LBB0_2
LBB0_39:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_41:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %r12
	jmp	LBB0_42
LBB0_37:
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
LBB0_42:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	%r12, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_40:
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_41
	.cfi_endproc
                                        ## -- End function
	.comm	_DIRECTIVE_FORWARD,4,2          ## @DIRECTIVE_FORWARD
	.comm	_DIRECTIVE_UNDEFINED,4,2        ## @DIRECTIVE_UNDEFINED
	.comm	_DIRECTIVE_BACKWARD,4,2         ## @DIRECTIVE_BACKWARD
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_errno,4,2                      ## @errno
	.comm	_DIRECTIVE_POSITION,4,2         ## @DIRECTIVE_POSITION
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_COLLATE_MAX_PRIORITY,4,2       ## @COLLATE_MAX_PRIORITY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__collate_wxfrm                 ; -- Begin function _collate_wxfrm
	.p2align	2
__collate_wxfrm:                        ; @_collate_wxfrm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x3
	mov	x19, x2
	mov	x21, x0
	ldr	x8, [x0]
	ldr	w27, [x8]
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	x0, x1
	bl	_assert
	tbnz	w27, #31, LBB0_34
; %bb.1:
	mov	x23, #0
	mov	x28, #0
	mov	x25, #0
	mov	x24, #0
	add	w8, w27, #1
	str	x8, [sp]                        ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	cmp	x23, x8
	b.eq	LBB0_35
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
                                        ;     Child Loop BB0_20 Depth 2
                                        ;     Child Loop BB0_26 Depth 2
	str	xzr, [sp, #16]
	cbz	x23, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x22, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #1
	str	x8, [x19], #8
	sub	x22, x22, #1
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x23, x27
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh0:
	adrp	x8, _DIRECTIVE_FORWARD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DIRECTIVE_FORWARD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DIRECTIVE_UNDEFINED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DIRECTIVE_UNDEFINED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w20, w9, w8
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	ldr	w20, [x8, x23, lsl #2]
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh6:
	adrp	x8, _DIRECTIVE_BACKWARD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DIRECTIVE_BACKWARD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x24
	bl	_free
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_wcsdup
	cbz	x0, LBB0_36
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x0
	bl	_wcslen
	add	x8, x26, w0, sxtw #3
	sub	x8, x8, #8
	cmp	x26, x8
	b.hs	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x26, #8
LBB0_14:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	x10, [x9, #-8]
	ldr	x11, [x8]
	stur	x11, [x9, #-8]
	str	x10, [x8], #-8
	add	x10, x9, #8
	cmp	x9, x8
	mov	x9, x10
	b.lo	LBB0_14
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x24, x26
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x26, [sp, #8]                   ; 8-byte Folded Reload
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh9:
	adrp	x8, _DIRECTIVE_POSITION@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DIRECTIVE_POSITION@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x8]
	ldr	x8, [x26]
	ldr	x10, [sp, #16]
	orr	x8, x8, x10
	cmp	x8, #0
	cset	w8, ne
	and	w9, w9, w20
	cbz	w9, LBB0_25
; %bb.18:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh12:
	adrp	x20, _COLLATE_MAX_PRIORITY@GOTPAGE
Lloh13:
	ldr	x20, [x20, _COLLATE_MAX_PRIORITY@GOTPAGEOFF]
	cbnz	w8, LBB0_20
	b	LBB0_2
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	add	x26, x26, x8, lsl #3
	add	x25, x25, #1
	ldr	x8, [x26]
	ldr	x9, [sp, #16]
	cmp	x8, #0
	ccmp	x9, #0, #0, eq
	mov	x28, x25
	b.eq	LBB0_2
LBB0_20:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x2, sp, #24
	add	x3, sp, #28
	add	x5, sp, #16
	mov	x0, x21
	mov	x1, x26
	mov	x4, x23
	bl	__collate_lookup
	ldp	w8, w9, [sp, #24]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	cmp	w9, #0
	b.le	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	cbnz	x22, LBB0_24
	b	LBB0_19
LBB0_22:                                ;   in Loop: Header=BB0_20 Depth=2
	tbnz	w9, #31, LBB0_32
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=2
	str	xzr, [sp, #16]
	ldr	w9, [x20]
	str	w9, [sp, #28]
	cbz	x22, LBB0_19
LBB0_24:                                ;   in Loop: Header=BB0_20 Depth=2
	sxtw	x9, w9
	str	x9, [x19], #8
	sub	x22, x22, #1
	b	LBB0_19
LBB0_25:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w8, LBB0_2
LBB0_26:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x2, sp, #24
	add	x3, sp, #28
	add	x5, sp, #16
	mov	x0, x21
	mov	x1, x26
	mov	x4, x23
	bl	__collate_lookup
	ldrsw	x8, [sp, #24]
	add	x26, x26, x8, lsl #3
	ldr	w8, [sp, #28]
	cmp	w8, #0
	b.gt	LBB0_29
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=2
	tbnz	w8, #31, LBB0_32
; %bb.28:                               ;   in Loop: Header=BB0_26 Depth=2
	str	xzr, [sp, #16]
	ldr	x8, [x26]
	cbnz	x8, LBB0_26
	b	LBB0_2
LBB0_29:                                ;   in Loop: Header=BB0_26 Depth=2
	cbz	x22, LBB0_31
; %bb.30:                               ;   in Loop: Header=BB0_26 Depth=2
	str	x8, [x19], #8
	sub	x22, x22, #1
LBB0_31:                                ;   in Loop: Header=BB0_26 Depth=2
	add	x28, x25, #1
	ldr	x8, [x26]
	ldr	x9, [sp, #16]
	cmp	x8, #0
	ccmp	x9, #0, #0, eq
	mov	x25, x28
	b.ne	LBB0_26
	b	LBB0_2
LBB0_32:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_33:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _errno@GOTPAGE
Lloh17:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh18:
	str	w8, [x9]
	mov	x28, #-1
	b	LBB0_35
LBB0_34:
	mov	x24, #0
	mov	x28, #0
LBB0_35:
	mov	x0, x24
	bl	_free
	mov	x0, x28
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_36:
	mov	x24, #0
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_33
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DIRECTIVE_FORWARD,4,2          ; @DIRECTIVE_FORWARD
	.comm	_DIRECTIVE_UNDEFINED,4,2        ; @DIRECTIVE_UNDEFINED
	.comm	_DIRECTIVE_BACKWARD,4,2         ; @DIRECTIVE_BACKWARD
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_errno,4,2                      ; @errno
	.comm	_DIRECTIVE_POSITION,4,2         ; @DIRECTIVE_POSITION
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_COLLATE_MAX_PRIORITY,4,2       ; @COLLATE_MAX_PRIORITY
.subsections_via_symbols
