	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_hole_for_elf
_find_hole_for_elf:                     ## @find_hole_for_elf
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	(%rdi), %r8d
	testl	%r8d, %r8d
	jle	LBB0_14
## %bb.1:
	movq	_PT_LOAD@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	cmpl	$1, %r8d
	jne	LBB0_8
## %bb.2:
	xorl	%r11d, %r11d
	xorl	%ebx, %ebx
	xorl	%edx, %edx
LBB0_3:
	testb	$1, %r8b
	je	LBB0_5
## %bb.4:
	leaq	(%r11,%r11,2), %rax
	leaq	(%rsi,%rax,8), %rcx
	testq	%rbx, %rbx
	movq	%rbx, %rdi
	cmoveq	%rcx, %rdi
	cmpq	%r10, (%rsi,%rax,8)
	cmoveq	%rcx, %rdx
	cmoveq	%rdi, %rbx
LBB0_5:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.6:
	movq	16(%rdx), %rdi
	addq	8(%rdx), %rdi
	callq	_PAGE_ROUND_UP
	movq	%rax, %r14
	movq	8(%rbx), %rdi
	callq	_PAGE
	subq	%rax, %r14
	jmp	LBB0_15
LBB0_14:
	xorl	%r14d, %r14d
LBB0_15:
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_pt_find_hole
	movq	_PAGE_BITS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movl	%r8d, %r9d
	andl	$-2, %r9d
	xorl	%r11d, %r11d
	movq	%rsi, %rcx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r10, 24(%rcx)
	cmoveq	%rax, %rdx
	cmoveq	%rdi, %rbx
	addq	$2, %r11
	addq	$48, %rcx
	cmpq	%r11, %r9
	je	LBB0_3
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rax
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rax
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r10, (%rcx)
	cmoveq	%rcx, %rdx
	cmoveq	%rax, %rbx
	leaq	24(%rcx), %rax
	movq	%rax, %rdi
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rdi
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PT_LOAD,8,3                    ## @PT_LOAD
	.comm	_current,8,3                    ## @current
	.comm	_PAGE_BITS,4,2                  ## @PAGE_BITS
	.no_dead_strip	_find_hole_for_elf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_hole_for_elf
_find_hole_for_elf:                     ; @find_hole_for_elf
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, #0
	mov	x9, #0
Lloh0:
	adrp	x10, _PT_LOAD@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PT_LOAD@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	mov	x11, x1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11], #24
	cmp	x12, x10
	csel	x9, x1, x9, eq
	cmp	x20, #0
	ccmp	x12, x10, #0, eq
	csel	x20, x1, x20, eq
	mov	x1, x11
	subs	x8, x8, #1
	b.ne	LBB0_2
; %bb.3:
	cbz	x20, LBB0_5
; %bb.4:
	ldp	x8, x9, [x9, #8]
	add	x0, x9, x8
	bl	_PAGE_ROUND_UP
	mov	x19, x0
	ldr	x0, [x20, #8]
	bl	_PAGE
	sub	x1, x19, x0
	b	LBB0_6
LBB0_5:
	mov	x1, #0
LBB0_6:
Lloh3:
	adrp	x8, _current@GOTPAGE
Lloh4:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_pt_find_hole
Lloh6:
	adrp	x8, _PAGE_BITS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_BITS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w0, w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PT_LOAD,8,3                    ; @PT_LOAD
	.comm	_current,8,3                    ; @current
	.comm	_PAGE_BITS,4,2                  ; @PAGE_BITS
	.no_dead_strip	_find_hole_for_elf
.subsections_via_symbols
