	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ehca_check_kpages_per_ate
_ehca_check_kpages_per_ate:             ## @ehca_check_kpages_per_ate
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	cmpl	%edx, %esi
	jg	LBB0_8
## %bb.1:
	movq	%rcx, %r15
	movl	%edx, %r12d
	movl	%esi, %r13d
	movslq	%esi, %rax
	incl	%r12d
	leaq	(%rdi,%rax,4), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_sg_page
	movl	%eax, %edi
	callq	_page_to_pfn
	movq	%rax, %r14
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	shlq	%cl, %r14
	movq	_ehca_debug_level@GOTPCREL(%rip), %rax
	cmpl	$3, (%rax)
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_phys_to_abs
	movl	%eax, %edi
	callq	_abs_to_virt
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_ehca_gen_dbg
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	(%r15), %rdx
	cmpq	%rdx, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, (%r15)
	incl	%r13d
	addq	$4, %rbx
	cmpl	%r13d, %r12d
	jne	LBB0_2
## %bb.7:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movl	%r13d, %ecx
	callq	_ehca_gen_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_ehca_debug_level,4,2           ## @ehca_debug_level
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chunk_page=%llx value=%016llx"

	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"uncontiguous page found pgaddr=%llx prev_pgaddr=%llx page_list_i=%x"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ehca_check_kpages_per_ate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ehca_check_kpages_per_ate
_ehca_check_kpages_per_ate:             ; @ehca_check_kpages_per_ate
	.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
	cmp	w1, w2
	b.gt	LBB0_6
; %bb.1:
	mov	x20, x3
	mov	x19, x1
	add	w24, w2, #1
	add	x21, x0, w1, sxtw #2
Lloh0:
	adrp	x25, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	adrp	x26, _ehca_debug_level@GOTPAGE
Lloh3:
	ldr	x26, [x26, _ehca_debug_level@GOTPAGEOFF]
Lloh4:
	adrp	x27, _PAGE_SIZE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _PAGE_SIZE@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_sg_page
	bl	_page_to_pfn
	ldr	x8, [x25]
	lsl	x23, x0, x8
	ldr	w8, [x26]
	cmp	w8, #3
	b.lt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_phys_to_abs
	bl	_abs_to_virt
	ldr	x2, [x0]
	mov	x0, x22
	mov	x1, x23
	bl	_ehca_gen_dbg
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x27]
	ldr	x2, [x20]
	sub	x8, x23, x8
	cmp	x8, x2
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x23, [x20]
	add	w19, w19, #1
	add	x21, x21, #4
	cmp	w24, w19
	b.ne	LBB0_2
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	mov	x3, x19
	bl	_ehca_gen_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_ehca_debug_level,4,2           ; @ehca_debug_level
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chunk_page=%llx value=%016llx"

	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"uncontiguous page found pgaddr=%llx prev_pgaddr=%llx page_list_i=%x"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ehca_check_kpages_per_ate
.subsections_via_symbols
