	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehea_create_eq                 ## -- Begin function ehea_create_eq
	.p2align	4, 0x90
_ehea_create_eq:                        ## @ehea_create_eq
	.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
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, 32(%rax)
	movl	%r14d, %eax
	movq	%rbx, %r14
	leaq	8(%r15), %rbx
	movl	%r13d, 8(%r15)
	movl	%r12d, 20(%r15)
	movl	%eax, 16(%r15)
	leaq	24(%r15), %rdi
	callq	_spin_lock_init
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_ehea_h_alloc_resource_eq
	movq	_H_SUCCESS@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_2
## %bb.5:
	movq	%r15, %r13
	addq	$4, %r13
	movl	12(%r15), %esi
	movq	_EHEA_PAGESIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$4, %ecx
	callq	_hw_queue_ctor
	testl	%eax, %eax
	je	LBB0_6
## %bb.19:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_20:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	(%r15), %esi
	movq	_FORCE_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ehea_h_free_resource
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_3:
	movq	%r15, %rdi
	callq	_kfree
LBB0_4:
	xorl	%r15d, %r15d
LBB0_18:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$0, 12(%r15)
	jle	LBB0_17
## %bb.7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_H_PAGE_REGISTERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r12
	jne	LBB0_10
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_17
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_hw_qpageit_get_inc
	testq	%rax, %rax
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %rdi
	callq	___pa
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	movq	_EHEA_EQ_REGISTER_ORIG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%r15), %ecx
	xorl	%esi, %esi
	movq	%rax, %r8
	movl	$1, %r9d
	callq	_ehea_h_register_rpage
	movq	%rax, %r12
	movl	12(%r15), %eax
	leal	-1(%rax), %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r13, %rdi
	callq	_hw_qpageit_get_inc
	cmpq	(%r14), %r12
	jne	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	testq	%rax, %rax
	jne	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	12(%r15), %eax
	jmp	LBB0_16
LBB0_17:
	movq	%r13, %rdi
	callq	_hw_qeit_reset
	jmp	LBB0_18
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
LBB0_10:
	movq	%r13, %rdi
	callq	_hw_queue_dtor
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alloc_resource_eq failed\n"

	.comm	_EHEA_PAGESIZE,4,2              ## @EHEA_PAGESIZE
L_.str.1:                               ## @.str.1
	.asciz	"can't allocate eq pages\n"

L_.str.2:                               ## @.str.2
	.asciz	"hw_qpageit_get_inc failed\n"

	.comm	_H_RESOURCE,8,3                 ## @H_RESOURCE
	.comm	_EHEA_EQ_REGISTER_ORIG,4,2      ## @EHEA_EQ_REGISTER_ORIG
	.comm	_H_PAGE_REGISTERED,8,3          ## @H_PAGE_REGISTERED
	.comm	_FORCE_FREE,4,2                 ## @FORCE_FREE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehea_create_eq                 ; -- Begin function ehea_create_eq
	.p2align	2
_ehea_create_eq:                        ; @ehea_create_eq
	.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	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	str	x20, [x19, #32]
	mov	x24, x19
	str	w23, [x24, #8]!
	stp	w21, w22, [x19, #16]
	add	x0, x19, #24
	bl	_spin_lock_init
	ldr	w0, [x20]
	mov	x1, x24
	mov	x2, x19
	bl	_ehea_h_alloc_resource_eq
Lloh3:
	adrp	x23, _H_SUCCESS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _H_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
	add	x21, x19, #4
	ldr	w1, [x19, #12]
Lloh5:
	adrp	x8, _EHEA_PAGESIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EHEA_PAGESIZE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w3, #4
	bl	_hw_queue_ctor
	cbz	w0, LBB0_8
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_4:
	ldr	w0, [x20]
	ldr	w1, [x19]
Lloh10:
	adrp	x8, _FORCE_FREE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FORCE_FREE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_ehea_h_free_resource
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_6:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	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
LBB0_8:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.9:
	mov	w24, #0
Lloh15:
	adrp	x25, _EHEA_EQ_REGISTER_ORIG@GOTPAGE
Lloh16:
	ldr	x25, [x25, _EHEA_EQ_REGISTER_ORIG@GOTPAGEOFF]
Lloh17:
	adrp	x26, _H_PAGE_REGISTERED@GOTPAGE
Lloh18:
	ldr	x26, [x26, _H_PAGE_REGISTERED@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x9, [x26]
	cmp	x22, x9
	b.ne	LBB0_18
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w24, w24, #1
	cmp	w24, w8
	b.ge	LBB0_16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_hw_qpageit_get_inc
	cbz	x0, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	___pa
	mov	x4, x0
	ldr	w0, [x20]
	ldr	w2, [x25]
	ldr	w3, [x19]
	mov	w1, #0
	mov	w5, #1
	bl	_ehea_h_register_rpage
	mov	x22, x0
	ldr	w8, [x19, #12]
	sub	w9, w8, #1
	cmp	w24, w9
	b.ne	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x21
	bl	_hw_qpageit_get_inc
	ldr	x8, [x23]
	cmp	x22, x8
	ccmp	x0, #0, #0, eq
	b.ne	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x19, #12]
	b	LBB0_11
LBB0_16:
	mov	x0, x21
	bl	_hw_qeit_reset
	b	LBB0_7
LBB0_17:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
LBB0_18:
	mov	x0, x21
	bl	_hw_queue_dtor
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc_resource_eq failed\n"

	.comm	_EHEA_PAGESIZE,4,2              ; @EHEA_PAGESIZE
l_.str.1:                               ; @.str.1
	.asciz	"can't allocate eq pages\n"

l_.str.2:                               ; @.str.2
	.asciz	"hw_qpageit_get_inc failed\n"

	.comm	_H_RESOURCE,8,3                 ; @H_RESOURCE
	.comm	_EHEA_EQ_REGISTER_ORIG,4,2      ; @EHEA_EQ_REGISTER_ORIG
	.comm	_H_PAGE_REGISTERED,8,3          ; @H_PAGE_REGISTERED
	.comm	_FORCE_FREE,4,2                 ; @FORCE_FREE
.subsections_via_symbols
