	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__collate_lookup                ## -- Begin function _collate_lookup
	.p2align	4, 0x90
__collate_lookup:                       ## @_collate_lookup
	.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	%r9, %r15
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	(%rdi), %rax
	cmpl	%r8d, (%rax)
	jle	LBB0_1
## %bb.2:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rax), %edx
	movl	%edx, (%rcx)
	addq	$4, %rax
	movq	%rax, (%r15)
	movl	$0, (%r14)
	jmp	LBB0_20
LBB0_1:
	movl	(%r13), %eax
	movl	%eax, (%rcx)
	movl	$1, (%r14)
	movq	$0, (%r15)
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r8d, %r12d
	movq	%rdi, %rbx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	$1, (%r14)
	leaq	-52(%rbp), %rdx
	movq	%r13, %rsi
	callq	_chainsearch
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	(%rax), %rax
	movslq	%r12d, %rcx
	movl	(%rax,%rcx,4), %esi
	testl	%esi, %esi
	js	LBB0_7
## %bb.6:
	movl	-52(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_16
LBB0_7:
	movq	(%r13), %rsi
	movq	_UCHAR_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	jbe	LBB0_8
## %bb.9:
	movq	(%rbx), %rax
	cmpq	$0, 8(%rax)
	jle	LBB0_12
## %bb.10:
	movq	%rbx, %rdi
	callq	_largesearch
	testq	%rax, %rax
	je	LBB0_11
## %bb.15:
	movq	(%rax), %rax
	movslq	%r12d, %rcx
	movl	(%rax,%rcx,4), %esi
LBB0_16:
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_17
LBB0_8:
	movq	8(%rbx), %rax
	movq	(%rax,%rsi,8), %rax
	movslq	%r12d, %rcx
	movl	(%rax,%rcx,4), %esi
LBB0_17:
	movl	%esi, (%r8)
	movq	%rbx, %rdi
	movl	%r12d, %edx
	movq	%r8, %rbx
	callq	_substsearch
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	movl	(%rax), %ecx
	movl	%ecx, (%rbx)
	testl	%ecx, %ecx
	jle	LBB0_20
## %bb.19:
	movq	%rax, %rcx
	addq	$4, %rcx
	xorl	%edx, %edx
	cmpl	$0, 4(%rax)
	cmovneq	%rcx, %rdx
	movq	%rdx, (%r15)
	jmp	LBB0_20
LBB0_11:
	movq	(%rbx), %rax
	movq	-48(%rbp), %r8                  ## 8-byte Reload
LBB0_12:
	movq	16(%rax), %rdx
	movslq	%r12d, %rcx
	movq	_DIRECTIVE_UNDEFINED@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rdx,%rcx,4)
	je	LBB0_14
## %bb.13:
	movq	_COLLATE_MAX_PRIORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r13), %eax
	movl	%eax, (%r8)
	jmp	LBB0_20
LBB0_14:
	movq	24(%rax), %rax
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%r8)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_UCHAR_MAX,8,3                  ## @UCHAR_MAX
	.comm	_DIRECTIVE_UNDEFINED,4,2        ## @DIRECTIVE_UNDEFINED
	.comm	_COLLATE_MAX_PRIORITY,8,3       ## @COLLATE_MAX_PRIORITY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__collate_lookup                ; -- Begin function _collate_lookup
	.p2align	2
__collate_lookup:                       ; @_collate_lookup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x5
	mov	x19, x3
	mov	x24, x2
	mov	x23, x1
	ldr	x8, [x0]
	ldr	w8, [x8]
	cmp	w8, w4
	b.le	LBB0_3
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	w9, [x8], #4
	str	w9, [x19]
	str	x8, [x20]
	str	wzr, [x24]
	b	LBB0_4
LBB0_3:
	ldr	x8, [x23]
	str	w8, [x19]
	mov	w8, #1
	str	w8, [x24]
	str	xzr, [x20]
LBB0_4:
	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
	add	sp, sp, #80
	ret
LBB0_5:
	mov	x21, x4
	mov	x22, x0
	mov	w8, #1
	str	w8, [x24]
	add	x2, sp, #12
	mov	x1, x23
	bl	_chainsearch
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x8, [x0]
	ldr	w1, [x8, w21, sxtw #2]
	tbnz	w1, #31, LBB0_8
; %bb.7:
	ldr	w8, [sp, #12]
	str	w8, [x24]
	b	LBB0_14
LBB0_8:
	ldr	x1, [x23]
Lloh0:
	adrp	x8, _UCHAR_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UCHAR_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ls	LBB0_12
; %bb.9:
	ldr	x8, [x22]
	ldr	x9, [x8, #8]
	cmp	x9, #1
	b.lt	LBB0_18
; %bb.10:
	mov	x0, x22
	bl	_largesearch
	cbz	x0, LBB0_17
; %bb.11:
	ldr	x8, [x0]
	b	LBB0_13
LBB0_12:
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x1, lsl #3]
LBB0_13:
	ldr	w1, [x8, w21, sxtw #2]
LBB0_14:
	str	w1, [x19]
	mov	x0, x22
	mov	x2, x21
	bl	_substsearch
	cbz	x0, LBB0_4
; %bb.15:
	ldr	w8, [x0]
	str	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.16:
	ldr	w8, [x0, #4]!
	cmp	w8, #0
	csel	x8, xzr, x0, eq
	str	x8, [x20]
	b	LBB0_4
LBB0_17:
	ldr	x8, [x22]
LBB0_18:
	ldr	x9, [x8, #16]
	ldr	w9, [x9, w21, sxtw #2]
Lloh3:
	adrp	x10, _DIRECTIVE_UNDEFINED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DIRECTIVE_UNDEFINED@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_20
; %bb.19:
	ldr	w8, [x23]
Lloh6:
	adrp	x9, _COLLATE_MAX_PRIORITY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _COLLATE_MAX_PRIORITY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x19]
	b	LBB0_4
LBB0_20:
	sxtw	x9, w21
	ldr	x8, [x8, #24]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x19]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_UCHAR_MAX,8,3                  ; @UCHAR_MAX
	.comm	_DIRECTIVE_UNDEFINED,4,2        ; @DIRECTIVE_UNDEFINED
	.comm	_COLLATE_MAX_PRIORITY,8,3       ; @COLLATE_MAX_PRIORITY
.subsections_via_symbols
