	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehea_create_qp                 ## -- Begin function ehea_create_qp
	.p2align	4, 0x90
_ehea_create_qp:                        ## @ehea_create_qp
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$72, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	%rax, %r12
	movq	%r14, 64(%rax)
	movl	(%r14), %edi
	leaq	56(%rax), %r8
	movq	%r15, %rsi
	movl	%ebx, %edx
	movq	%rax, %rcx
	callq	_ehea_h_alloc_resource_qp
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movl	28(%r15), %edi
	callq	_map_wqe_size
	movl	%eax, %ebx
	movl	20(%r15), %edi
	callq	_map_wqe_size
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	12(%r15), %edi
	callq	_map_wqe_size
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	4(%r15), %edi
	callq	_map_wqe_size
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	leaq	4(%r12), %r13
	movl	28(%r15), %r8d
	movl	32(%r15), %edx
	movl	$0, (%rsp)
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %ecx
	movq	%r14, %r9
	callq	_ehea_qp_alloc_register
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_15
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_16
LBB0_5:
	leaq	8(%r12), %rbx
	movl	20(%r15), %r8d
	movl	24(%r15), %edx
	movl	$1, (%rsp)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r9
	callq	_ehea_qp_alloc_register
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_14:
	movq	%r13, %rdi
	callq	_hw_queue_dtor
LBB0_15:
	movl	(%r14), %edi
	movl	(%r12), %esi
	callq	_ehea_h_disable_and_get_hea
	movl	(%r14), %edi
	movl	(%r12), %esi
	movq	_FORCE_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ehea_h_free_resource
LBB0_16:
	movq	%r12, %rdi
	callq	_kfree
LBB0_17:
	xorl	%r12d, %r12d
LBB0_18:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpl	$2, (%r15)
	jl	LBB0_19
## %bb.8:
	leaq	12(%r12), %rbx
	movl	12(%r15), %r8d
	movl	16(%r15), %edx
	movl	$2, (%rsp)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r9
	callq	_ehea_qp_alloc_register
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_hw_queue_dtor
	jmp	LBB0_14
LBB0_10:
	cmpl	$3, (%r15)
	jl	LBB0_19
## %bb.11:
	movq	%r12, %rsi
	addq	$52, %rsi
	movl	4(%r15), %r8d
	movl	8(%r15), %edx
	movl	$3, (%rsp)
	movq	%r12, %rdi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r9
	callq	_ehea_qp_alloc_register
	testl	%eax, %eax
	je	LBB0_19
## %bb.12:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movq	%rbx, %rdi
	callq	_hw_queue_dtor
	jmp	LBB0_13
LBB0_19:
	movl	32(%r15), %eax
	movl	%eax, 48(%r12)
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movups	%xmm1, 32(%r12)
	movups	%xmm0, 16(%r12)
	jmp	LBB0_18
	.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	"ehea_h_alloc_resource_qp failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"can't register for sq ret=%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"can't register for rq1 ret=%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"can't register for rq2 ret=%x\n"

L_.str.4:                               ## @.str.4
	.asciz	"can't register for rq3 ret=%x\n"

	.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_qp                 ; -- Begin function ehea_create_qp
	.p2align	2
_ehea_create_qp:                        ; @ehea_create_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #72
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.1:
	str	x20, [x19, #64]
	ldr	w0, [x20]
	add	x4, x19, #56
	mov	x1, x21
	mov	x2, x22
	mov	x3, x19
	bl	_ehea_h_alloc_resource_qp
Lloh3:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x21, #28]
	bl	_map_wqe_size
	mov	x23, x0
	ldr	w0, [x21, #20]
	bl	_map_wqe_size
	mov	x26, x0
	ldr	w0, [x21, #12]
	bl	_map_wqe_size
	mov	x25, x0
	ldr	w0, [x21, #4]
	bl	_map_wqe_size
	mov	x24, x0
	add	x22, x19, #4
	ldp	w4, w2, [x21, #28]
	mov	x0, x19
	mov	x1, x22
	mov	x3, x23
	mov	x5, x20
	mov	w6, #0
	bl	_ehea_qp_alloc_register
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_5
; %bb.3:
	str	x0, [sp]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_8
LBB0_4:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_9
LBB0_5:
	add	x23, x19, #8
	ldp	w4, w2, [x21, #20]
	mov	x0, x19
	mov	x1, x23
	mov	x3, x26
	mov	x5, x20
	mov	w6, #1
	bl	_ehea_qp_alloc_register
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_11
; %bb.6:
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
LBB0_7:
	mov	x0, x22
	bl	_hw_queue_dtor
LBB0_8:
	ldr	w0, [x20]
	ldr	w1, [x19]
	bl	_ehea_h_disable_and_get_hea
	ldr	w0, [x20]
	ldr	w1, [x19]
Lloh12:
	adrp	x8, _FORCE_FREE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FORCE_FREE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	bl	_ehea_h_free_resource
LBB0_9:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
LBB0_11:
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_18
; %bb.12:
	add	x26, x19, #12
	ldp	w4, w2, [x21, #12]
	mov	x0, x19
	mov	x1, x26
	mov	x3, x25
	mov	x5, x20
	mov	w6, #2
	bl	_ehea_qp_alloc_register
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_15
; %bb.13:
	str	x0, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
LBB0_14:
	mov	x0, x23
	bl	_hw_queue_dtor
	b	LBB0_7
LBB0_15:
	ldr	w8, [x21]
	cmp	w8, #3
	b.lt	LBB0_18
; %bb.16:
	add	x1, x19, #52
	ldp	w4, w2, [x21, #4]
	mov	x0, x19
	mov	x3, x24
	mov	x5, x20
	mov	w6, #3
	bl	_ehea_qp_alloc_register
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_18
; %bb.17:
	str	x0, [sp]
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
	mov	x0, x26
	bl	_hw_queue_dtor
	b	LBB0_14
LBB0_18:
	ldp	q0, q1, [x21]
	ldr	w8, [x21, #32]
	str	w8, [x19, #48]
	stp	q0, q1, [x19, #16]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.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	"ehea_h_alloc_resource_qp failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"can't register for sq ret=%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"can't register for rq1 ret=%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"can't register for rq2 ret=%x\n"

l_.str.4:                               ; @.str.4
	.asciz	"can't register for rq3 ret=%x\n"

	.comm	_FORCE_FREE,4,2                 ; @FORCE_FREE
.subsections_via_symbols
