	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_spu_elf_find_overlays          ## -- Begin function spu_elf_find_overlays
	.p2align	4, 0x90
_spu_elf_find_overlays:                 ## @spu_elf_find_overlays
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_spu_hash_table
	movl	(%rbx), %edi
	movq	_FALSE@GOTPCREL(%rip), %r14
	cmpl	$2, %edi
	jl	LBB0_26
## %bb.1:
	movq	%rax, %r15
	shll	$3, %edi
	callq	_bfd_malloc
	testq	%rax, %rax
	je	LBB0_26
## %bb.2:
	movq	%rax, %r13
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	_SEC_ALLOC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_SEC_LOAD@GOTPCREL(%rip), %rsi
	movq	_SEC_THREAD_LOCAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	(%rsi), %esi
	orl	%edx, %esi
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%rax), %rax
	testq	%rax, %rax
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax), %edi
	testl	%edi, %ecx
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	andl	%esi, %edi
	cmpl	%edx, %edi
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 8(%rax)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %edi
	incl	%ebx
	movq	%rax, (%r13,%rdi,8)
	jmp	LBB0_8
LBB0_9:
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.11:
	movq	_sort_sections@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	$8, %edx
	callq	_qsort
	cmpl	$1, %ebx
	jne	LBB0_13
## %bb.12:
	movq	$0, (%r15)
	jmp	LBB0_10
LBB0_13:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rax
	movq	8(%rax), %r12
	addq	16(%rax), %r12
	movl	%ebx, %ecx
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %r14d
	xorl	%r15d, %r15d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_14 Depth=1
	addq	8(%rbx), %rax
LBB0_22:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%r14
	movq	%rax, %r12
	cmpq	%r14, %rcx
	je	LBB0_23
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%r14,8), %rbx
	movq	16(%rbx), %rax
	cmpq	%r12, %rax
	jge	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	-8(%r13,%r14,8), %r15
	movq	%r15, %rdi
	callq	_spu_elf_section_data
	cmpl	$0, (%rax)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_18
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	movq	%r15, %rdi
	callq	_spu_elf_section_data
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%rax)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leal	(%rcx,%rcx), %eax
	movq	%r15, (%r13,%rax,8)
	leal	(%rcx,%rcx), %eax
	incl	%eax
	movq	%r15, (%r13,%rax,8)
	movl	%edx, %r15d
	incl	%ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	incl	%r15d
	movq	%rbx, %rdi
	callq	_spu_elf_section_data
	movl	%r15d, (%rax)
	movq	8(%rbx), %rax
	addq	16(%rbx), %rax
	cmpq	%rax, %r12
	jge	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %ecx
	decl	%ecx
	movq	%rbx, (%r13,%rcx,8)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%r12, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_23:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%r15d, (%rbx)
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%esi, 4(%rbx)
	testl	%r15d, %r15d
	movq	_FALSE@GOTPCREL(%rip), %r14
	je	LBB0_10
## %bb.24:
	shll	$4, %esi
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bfd_realloc
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	%rax, 8(%rbx)
	movq	_TRUE@GOTPCREL(%rip), %r14
	jmp	LBB0_26
LBB0_10:
	movq	%r13, %rdi
	callq	_free
LBB0_26:
	movl	(%r14), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_SEC_ALLOC,4,2                  ## @SEC_ALLOC
	.comm	_SEC_LOAD,4,2                   ## @SEC_LOAD
	.comm	_SEC_THREAD_LOCAL,4,2           ## @SEC_THREAD_LOCAL
	.comm	_sort_sections,4,2              ## @sort_sections
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_spu_elf_find_overlays          ; -- Begin function spu_elf_find_overlays
	.p2align	2
_spu_elf_find_overlays:                 ; @spu_elf_find_overlays
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x0
	mov	x0, x1
	bl	_spu_hash_table
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_23
; %bb.1:
	mov	x19, x0
	lsl	w0, w8, #3
	bl	_bfd_malloc
	cbz	x0, LBB0_23
; %bb.2:
	mov	x20, x0
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_22
; %bb.3:
	mov	w21, #0
Lloh0:
	adrp	x9, _SEC_ALLOC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SEC_ALLOC@GOTPAGEOFF]
Lloh2:
	adrp	x10, _SEC_LOAD@GOTPAGE
Lloh3:
	ldr	x10, [x10, _SEC_LOAD@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	ldr	w11, [x10]
Lloh6:
	adrp	x10, _SEC_THREAD_LOCAL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SEC_THREAD_LOCAL@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w11, w10, w11
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x8]
	and	w13, w9, w12
	and	w12, w11, w12
	cmp	w13, #0
	ccmp	w12, w10, #4, ne
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x12, [x8, #8]
	cbz	x12, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x8, [x20, w21, uxtw #3]
	add	w21, w21, #1
	b	LBB0_4
LBB0_8:
	cbz	w21, LBB0_22
; %bb.9:
Lloh9:
	adrp	x8, _sort_sections@GOTPAGE
Lloh10:
	ldr	x8, [x8, _sort_sections@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	w2, #8
	bl	_qsort
	cmp	w21, #1
	b.ne	LBB0_11
; %bb.10:
	str	xzr, [x19]
	b	LBB0_22
LBB0_11:
	mov	x25, #0
	mov	w23, #0
	mov	w24, #0
	ldr	x8, [x20]
	ldp	x9, x8, [x8, #8]
	add	x27, x9, x8
	mov	w8, w21
	sub	x26, x8, #1
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x9, [x21, #8]
	add	x27, x9, x8
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x25, x25, #1
	cmp	x26, x25
	b.eq	LBB0_19
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x20, x25, lsl #3
	ldr	x21, [x8, #8]
	ldr	x8, [x21, #16]
	cmp	x8, x27
	b.ge	LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x22, [x20, x25, lsl #3]
	mov	x0, x22
	bl	_spu_elf_section_data
	ldr	w8, [x0]
	cbnz	w8, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	add	w24, w24, #1
	mov	x0, x22
	bl	_spu_elf_section_data
	lsl	w8, w23, #1
	str	x22, [x20, w8, uxtw #3]
	str	w24, [x0]
	mov	w8, #1
	bfi	w8, w23, #1, #31
	str	x22, [x20, w8, uxtw #3]
	add	w23, w23, #1
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=1
	add	w24, w24, #1
	mov	x0, x21
	bl	_spu_elf_section_data
	str	w24, [x0]
	ldp	x9, x8, [x21, #8]
	add	x8, x9, x8
	cmp	x27, x8
	b.ge	LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
	lsl	w9, w23, #1
	sub	w9, w9, #1
	str	x21, [x20, w9, uxtw #3]
	mov	x27, x8
	b	LBB0_13
LBB0_19:
	stp	w24, w23, [x19]
	cbz	w24, LBB0_22
; %bb.20:
	lsl	w1, w23, #4
	mov	x0, x20
	bl	_bfd_realloc
	cbz	x0, LBB0_23
; %bb.21:
	str	x0, [x19, #8]
Lloh12:
	adrp	x8, _TRUE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_24
LBB0_22:
	mov	x0, x20
	bl	_free
LBB0_23:
Lloh14:
	adrp	x8, _FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_24:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_SEC_ALLOC,4,2                  ; @SEC_ALLOC
	.comm	_SEC_LOAD,4,2                   ; @SEC_LOAD
	.comm	_SEC_THREAD_LOCAL,4,2           ; @SEC_THREAD_LOCAL
	.comm	_sort_sections,4,2              ; @sort_sections
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
