	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ehea_qp_alloc_register
_ehea_qp_alloc_register:                ## @ehea_qp_alloc_register
	.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
	movq	%r9, %r14
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_EHEA_PAGESIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rsi, %rdi
	movl	%ebx, %esi
	callq	_hw_queue_ctor
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	testl	%ebx, %ebx
	jle	LBB0_10
## %bb.2:
	movq	_H_SUCCESS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_hw_qpageit_get_inc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rdi
	callq	___pa
	movl	(%r14), %edi
	movl	(%r12), %ecx
	xorl	%esi, %esi
	movl	16(%rbp), %edx
	movq	%rax, %r8
	movl	$1, %r9d
	callq	_ehea_h_register_rpage
	cmpq	(%r13), %rax
	jl	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	decl	%ebx
	jne	LBB0_4
LBB0_10:
	movq	%r15, %rdi
	callq	_hw_qeit_reset
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	callq	_pr_err
	movq	%r15, %rdi
	callq	_hw_queue_dtor
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EHEA_PAGESIZE,4,2              ## @EHEA_PAGESIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hw_qpageit_get_inc failed\n"

	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"register_rpage_qp failed\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ehea_qp_alloc_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ehea_qp_alloc_register
_ehea_qp_alloc_register:                ; @ehea_qp_alloc_register
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x6
	mov	x21, x5
	mov	x22, x2
	mov	x19, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _EHEA_PAGESIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EHEA_PAGESIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x1
	mov	x1, x22
	bl	_hw_queue_ctor
	cbnz	w0, LBB0_9
; %bb.1:
	cmp	w22, #1
	b.lt	LBB0_6
; %bb.2:
Lloh3:
	adrp	x24, l_.str@PAGE
Lloh4:
	add	x24, x24, l_.str@PAGEOFF
Lloh5:
	adrp	x26, _H_SUCCESS@GOTPAGE
Lloh6:
	ldr	x26, [x26, _H_SUCCESS@GOTPAGEOFF]
Lloh7:
	adrp	x25, l_.str.1@PAGE
Lloh8:
	add	x25, x25, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_hw_qpageit_get_inc
	cbz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	___pa
	mov	x4, x0
	ldr	w0, [x21]
	ldr	w3, [x23]
	mov	w1, #0
	mov	x2, x20
	mov	w5, #1
	bl	_ehea_h_register_rpage
	ldr	x8, [x26]
	cmp	x0, x8
	b.lt	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w22, w22, #1
	b.ne	LBB0_3
LBB0_6:
	mov	x0, x19
	bl	_hw_qeit_reset
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	x24, x25
LBB0_8:
	mov	x0, x24
	bl	_pr_err
	mov	x0, x19
	bl	_hw_queue_dtor
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EHEA_PAGESIZE,4,2              ; @EHEA_PAGESIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hw_qpageit_get_inc failed\n"

	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"register_rpage_qp failed\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ehea_qp_alloc_register
.subsections_via_symbols
