	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ehea_reg_mr_section
_ehea_reg_mr_section:                   ## @ehea_reg_mr_section
	.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	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movl	%edx, %r15d
	movl	%esi, %ebx
	movl	%edi, %r14d
	movq	%rcx, %rdi
	callq	___pa
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_ehea_calc_sectbase
	movq	%rax, %rbx
	movq	_EHEA_PAGES_PER_SECTION@GOTPCREL(%rip), %rax
	movq	_EHEA_MAX_RPAGE@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
                                        ## implicit-def: $rsi
	cmpq	(%rax), %rcx
	ja	LBB0_14
## %bb.1:
	xorl	%r12d, %r12d
	movq	_EHEA_PAGESIZE@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	movq	_EHEA_PAGES_PER_SECTION@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%edx, %edx
	divq	%rcx
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	cmpq	%rax, %r12
	movq	_EHEA_PAGESIZE@GOTPCREL(%rip), %rax
	jae	LBB0_14
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	(%r14,%r15), %rdi
	imulq	(%rax), %rdi
	addq	%rbx, %rdi
	callq	___pa
	movq	%rax, (%r13,%r15,8)
	movq	_EHEA_PAGESIZE@GOTPCREL(%rip), %rax
	incq	%r15
	movq	(%r12), %r9
	cmpq	%r9, %r15
	jb	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	addq	%r15, %r14
	movq	%r12, %r15
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r9d, %r9d
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	callq	_ehea_h_register_rpage_mr
	movq	%rax, %rsi
	movq	_H_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_2
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_H_PAGE_REGISTERED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_2
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_6 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_5
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rsi, %rbx
	movl	(%rax), %esi
	movq	_FORCE_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ehea_h_free_resource
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	%rbx, %rsi
LBB0_14:
	movq	%rsi, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EHEA_PAGES_PER_SECTION,8,3     ## @EHEA_PAGES_PER_SECTION
	.comm	_EHEA_MAX_RPAGE,8,3             ## @EHEA_MAX_RPAGE
	.comm	_EHEA_PAGESIZE,8,3              ## @EHEA_PAGESIZE
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.comm	_H_PAGE_REGISTERED,8,3          ## @H_PAGE_REGISTERED
	.comm	_FORCE_FREE,4,2                 ## @FORCE_FREE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"register_rpage_mr failed\n"

	.no_dead_strip	_ehea_reg_mr_section
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ehea_reg_mr_section
_ehea_reg_mr_section:                   ; @ehea_reg_mr_section
	.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	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
	mov	x0, x3
	bl	___pa
	mov	x22, x0
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	bl	_ehea_calc_sectbase
Lloh0:
	adrp	x8, _EHEA_PAGES_PER_SECTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EHEA_PAGES_PER_SECTION@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
Lloh3:
	adrp	x26, _EHEA_MAX_RPAGE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _EHEA_MAX_RPAGE@GOTPAGEOFF]
	ldr	x8, [x26]
                                        ; implicit-def: $x24
	cmp	x8, x9
	b.hi	LBB0_10
; %bb.1:
	mov	x23, x0
	mov	x27, #0
	mov	x28, #0
Lloh5:
	adrp	x25, _EHEA_PAGESIZE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _EHEA_PAGESIZE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	cbz	x8, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, #0
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, x28, x24
	ldr	x9, [x25]
	madd	x0, x9, x8, x23
	bl	___pa
	str	x0, [x21, x24, lsl #3]
	add	x24, x24, #1
	ldr	x5, [x26]
	cmp	x24, x5
	b.lo	LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x28, x28, x24
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x5, #0
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20]
	ldr	w1, [x19]
	mov	w2, #0
	mov	w3, #0
	mov	x4, x22
	bl	_ehea_h_register_rpage_mr
	mov	x24, x0
Lloh7:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _H_PAGE_REGISTERED@GOTPAGE
Lloh11:
	ldr	x9, [x9, _H_PAGE_REGISTERED@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #4, ne
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x27, x27, #1
Lloh13:
	adrp	x8, _EHEA_PAGES_PER_SECTION@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EHEA_PAGES_PER_SECTION@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x8]
	ldr	x8, [x26]
	udiv	x9, x9, x8
	cmp	x27, x9
	b.lo	LBB0_2
	b	LBB0_10
LBB0_9:
	ldr	w0, [x20]
	ldr	w1, [x19]
Lloh16:
	adrp	x8, _FORCE_FREE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FORCE_FREE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	bl	_ehea_h_free_resource
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_10:
	mov	x0, x24
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EHEA_PAGES_PER_SECTION,8,3     ; @EHEA_PAGES_PER_SECTION
	.comm	_EHEA_MAX_RPAGE,8,3             ; @EHEA_MAX_RPAGE
	.comm	_EHEA_PAGESIZE,8,3              ; @EHEA_PAGESIZE
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.comm	_H_PAGE_REGISTERED,8,3          ; @H_PAGE_REGISTERED
	.comm	_FORCE_FREE,4,2                 ; @FORCE_FREE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"register_rpage_mr failed\n"

	.no_dead_strip	_ehea_reg_mr_section
.subsections_via_symbols
