	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_ordinals
_fill_ordinals:                         ## @fill_ordinals
	.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	%rdi, %r14
	movq	_d_nfuncs@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_pfunc@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movl	$8, %edx
	callq	_qsort
	movl	$65536, %edi                    ## imm = 0x10000
	callq	_xmalloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_memset
	movl	(%r15), %edx
	testl	%edx, %edx
	jle	LBB0_6
## %bb.1:
	movl	$-1, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	movslq	(%r15), %rdx
	cmpq	%rdx, %rcx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rcx,8), %rdx
	movslq	(%rdx), %rdx
	cmpq	$-1, %rdx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	$1, (%rbx,%rdx)
	movq	(%r14,%rcx,8), %rdx
	movl	(%rdx), %edx
	cmpl	%eax, %edx
	movl	%eax, %esi
	cmovll	%edx, %esi
	cmpl	$-1, %eax
	cmovel	%edx, %esi
	movl	%esi, %eax
	jmp	LBB0_4
LBB0_5:
	cmpl	$-1, %eax
	jne	LBB0_7
LBB0_6:
	movl	$1, %eax
LBB0_7:
	testl	%edx, %edx
	jle	LBB0_18
## %bb.8:
	movslq	%eax, %rcx
	movl	%ecx, %r8d
	xorl	%esi, %esi
	jmp	LBB0_9
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	movb	$1, (%rbx,%rdi)
	movq	(%r14,%rsi,8), %rdx
	movl	%edi, (%rdx)
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rsi
	movslq	(%r15), %rdx
	cmpq	%rdx, %rsi
	jge	LBB0_18
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
	movq	(%r14,%rsi,8), %rdi
	cmpl	$-1, (%rdi)
	jne	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rcx, %rdi
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jg	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$0, (%rbx,%rdi)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	incq	%rdi
	cmpl	$65536, %edi                    ## imm = 0x10000
	jne	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r8, %rdi
	testl	%eax, %eax
	jle	LBB0_17
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%edi, %edx
	cmpb	$0, (%rbx,%rdx)
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	decq	%rdi
	leal	1(%rdi), %edx
	cmpl	$1, %edx
	jg	LBB0_12
	jmp	LBB0_17
LBB0_18:
	movq	%rbx, %rdi
	callq	_free
	movl	(%r15), %esi
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_qsort
	movslq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_23
## %bb.19:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.20:
	movl	(%rcx), %ecx
	movq	_d_low_ord@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
LBB0_21:
	movq	-8(%r14,%rax,8), %rax
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movl	(%rax), %eax
	movq	_d_high_ord@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_23:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_d_nfuncs,4,2                   ## @d_nfuncs
	.comm	_pfunc,4,2                      ## @pfunc
	.comm	_d_low_ord,4,2                  ## @d_low_ord
	.comm	_d_high_ord,4,2                 ## @d_high_ord
	.no_dead_strip	_fill_ordinals
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_ordinals
_fill_ordinals:                         ; @fill_ordinals
	.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, x0
Lloh0:
	adrp	x21, _d_nfuncs@GOTPAGE
Lloh1:
	ldr	x21, [x21, _d_nfuncs@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _pfunc@GOTPAGE
Lloh3:
	ldr	x22, [x22, _pfunc@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	w2, #8
	bl	_qsort
	mov	w0, #65536
	bl	_xmalloc
	mov	x20, x0
	mov	w1, #0
	mov	w2, #65536
	bl	_memset
	ldr	w12, [x21]
	cmp	w12, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x9, #0
	mov	w10, #-1
	mov	w11, #1
	mov	w8, #-1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	ldrsw	x12, [x21]
	cmp	x9, x12
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x19, x9, lsl #3]
	ldrsw	x12, [x12]
	cmn	w12, #1
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	strb	w11, [x20, x12]
	ldr	x12, [x19, x9, lsl #3]
	ldr	w12, [x12]
	cmp	w12, w8
	ccmp	w8, w10, #4, ge
	csel	w8, w12, w8, eq
	b	LBB0_2
LBB0_5:
	cmn	w8, #1
	b.ne	LBB0_7
LBB0_6:
	mov	w8, #1
LBB0_7:
	cmp	w12, #1
	b.lt	LBB0_20
; %bb.8:
	mov	x9, #0
	sxtw	x10, w8
	mov	w11, #1
	mov	w12, w8
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_12 Depth=1
	add	x13, x12, x13
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	strb	w11, [x20, x13]
	ldr	x14, [x19, x9, lsl #3]
	str	w13, [x14]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x9, x9, #1
	ldrsw	x13, [x21]
	cmp	x9, x13
	b.ge	LBB0_20
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
                                        ;     Child Loop BB0_18 Depth 2
	ldr	x13, [x19, x9, lsl #3]
	ldr	w13, [x13]
	cmn	w13, #1
	b.ne	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x13, x10
	cmp	w8, #16, lsl #12                ; =65536
	b.ge	LBB0_16
LBB0_14:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w14, [x20, x13]
	cbz	w14, LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x13, #1
	cmp	w13, #16, lsl #12               ; =65536
	b.ne	LBB0_14
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x13, #0
LBB0_18:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w14, w12, w13
	ldrb	w14, [x20, w14, uxtw]
	cbz	w14, LBB0_9
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	sub	x13, x13, #1
	add	w14, w12, w13
	add	w14, w14, #1
	cmp	w14, #1
	b.gt	LBB0_18
	b	LBB0_11
LBB0_20:
	mov	x0, x20
	bl	_free
	ldr	w1, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w2, #8
	bl	_qsort
	ldr	w8, [x21]
	cbz	w8, LBB0_25
; %bb.21:
	ldr	x9, [x19]
	cbz	x9, LBB0_23
; %bb.22:
	ldr	w9, [x9]
Lloh4:
	adrp	x10, _d_low_ord@GOTPAGE
Lloh5:
	ldr	x10, [x10, _d_low_ord@GOTPAGEOFF]
Lloh6:
	str	w9, [x10]
LBB0_23:
	sub	w8, w8, #1
	ldr	x8, [x19, w8, sxtw #3]
	cbz	x8, LBB0_25
; %bb.24:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _d_high_ord@GOTPAGE
Lloh8:
	ldr	x9, [x9, _d_high_ord@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
LBB0_25:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_d_nfuncs,4,2                   ; @d_nfuncs
	.comm	_pfunc,4,2                      ; @pfunc
	.comm	_d_low_ord,4,2                  ; @d_low_ord
	.comm	_d_high_ord,4,2                 ; @d_high_ord
	.no_dead_strip	_fill_ordinals
.subsections_via_symbols
