	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qm_qp_ctx_cfg
_qm_qp_ctx_cfg:                         ## @qm_qp_ctx_cfg
	.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
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	16(%rdi), %rbx
	movq	8(%rbx), %r15
	movl	(%rbx), %r12d
	callq	_qm_init_qp_status
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$24, %edx
	callq	_dma_map_single
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	callq	_kfree
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_2:
	movl	%r15d, %eax
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	8(%r13), %esi
	movq	%r14, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_INIT_QC_COMMON
	movq	_QM_HW_V1@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	jne	LBB0_7
## %bb.6:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %ecx
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_QM_MK_SQC_DW3_V1
	movl	%eax, 16(%r14)
	movq	_QM_Q_DEPTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	decq	%rax
	jmp	LBB0_9
LBB0_7:
	movq	_QM_HW_V2@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_10
## %bb.8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	callq	_QM_MK_SQC_DW3_V2
	movl	%eax, 16(%r14)
	xorl	%eax, %eax
LBB0_9:
	movq	%rax, 8(%r14)
LBB0_10:
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, (%r14)
	movl	4(%r13), %edx
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_QM_MK_SQC_W13
	movl	%eax, 20(%r14)
	movq	_QM_MB_CMD_SQC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	callq	_qm_mb
	movl	%eax, %r15d
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	$24, %edx
	callq	_dma_unmap_single
	movq	%r14, %rdi
	callq	_kfree
	testl	%r15d, %r15d
	jne	LBB0_2
## %bb.11:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.12:
	movq	%rax, %r14
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$24, %edx
	callq	_dma_map_single
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_4
## %bb.13:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_INIT_QC_COMMON
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	_QM_HW_V1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_15
## %bb.14:
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$4, %ecx
	callq	_QM_MK_CQC_DW3_V1
	movl	%eax, 16(%r14)
	movq	_QM_Q_DEPTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	decq	%rax
	jmp	LBB0_17
LBB0_15:
	movq	_QM_HW_V2@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_18
## %bb.16:
	movl	$4, %edi
	callq	_QM_MK_CQC_DW3_V2
	movl	%eax, 16(%r14)
	xorl	%eax, %eax
LBB0_17:
	movq	%rax, 8(%r14)
LBB0_18:
	movq	_QM_CQ_PHASE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	_QM_CQ_FLAG_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	btsl	%eax, %edx
	movl	%edx, 4(%r14)
	movq	_QM_MB_CMD_CQC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	callq	_qm_mb
	movl	%eax, %ebx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$24, %edx
	callq	_dma_unmap_single
	movq	%r14, %rdi
	callq	_kfree
	movl	%ebx, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_QM_HW_V1,4,2                   ## @QM_HW_V1
	.comm	_QM_Q_DEPTH,8,3                 ## @QM_Q_DEPTH
	.comm	_QM_HW_V2,4,2                   ## @QM_HW_V2
	.comm	_QM_MB_CMD_SQC,4,2              ## @QM_MB_CMD_SQC
	.comm	_QM_CQ_PHASE_SHIFT,4,2          ## @QM_CQ_PHASE_SHIFT
	.comm	_QM_CQ_FLAG_SHIFT,4,2           ## @QM_CQ_FLAG_SHIFT
	.comm	_QM_MB_CMD_CQC,4,2              ## @QM_MB_CMD_CQC
	.no_dead_strip	_qm_qp_ctx_cfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qm_qp_ctx_cfg
_qm_qp_ctx_cfg:                         ; @qm_qp_ctx_cfg
	.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	x22, x2
	mov	x20, x1
	mov	x23, x0
	ldr	x21, [x0, #16]
	ldr	x19, [x21, #8]
	ldr	w28, [x21]
	bl	_qm_init_qp_status
Lloh0:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x24, x0
Lloh2:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x24
	mov	w2, #24
	bl	_dma_map_single
	mov	x25, x0
	mov	x0, x19
	mov	x1, x25
	bl	_dma_mapping_error
	cbz	x0, LBB0_6
LBB0_2:
	mov	x0, x24
	bl	_kfree
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_4:
	mov	x0, x26
LBB0_5:
	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
LBB0_6:
	ldr	w1, [x23, #8]
	mov	x0, x24
	mov	x2, x22
	bl	_INIT_QC_COMMON
Lloh8:
	adrp	x8, _QM_HW_V1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _QM_HW_V1@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w28, w8
	b.ne	LBB0_8
; %bb.7:
	ldr	w3, [x21, #4]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #0
	bl	_QM_MK_SQC_DW3_V1
	str	w0, [x24, #16]
Lloh11:
	adrp	x8, _QM_Q_DEPTH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QM_Q_DEPTH@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	sub	x8, x8, #1
	b	LBB0_10
LBB0_8:
Lloh14:
	adrp	x8, _QM_HW_V2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _QM_HW_V2@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w28, w8
	b.ne	LBB0_11
; %bb.9:
	ldr	w0, [x21, #4]
	bl	_QM_MK_SQC_DW3_V2
	mov	x8, #0
	str	w0, [x24, #16]
LBB0_10:
	str	x8, [x24, #8]
LBB0_11:
	str	w20, [x24]
	ldr	w2, [x23, #4]
	mov	w0, #0
	mov	w1, #1
	bl	_QM_MK_SQC_W13
	str	w0, [x24, #20]
Lloh17:
	adrp	x8, _QM_MB_CMD_SQC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _QM_MB_CMD_SQC@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x25
	mov	x3, x20
	mov	w4, #0
	bl	_qm_mb
	mov	x26, x0
Lloh20:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x25
	mov	w2, #24
	bl	_dma_unmap_single
	mov	x0, x24
	bl	_kfree
	cbnz	w26, LBB0_4
; %bb.12:
	ldr	w1, [x27]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.13:
	mov	x24, x0
Lloh23:
	adrp	x26, _DMA_TO_DEVICE@GOTPAGE
Lloh24:
	ldr	x26, [x26, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x0, x19
	mov	x1, x24
	mov	w2, #24
	bl	_dma_map_single
	mov	x25, x0
	mov	x0, x19
	mov	x1, x25
	bl	_dma_mapping_error
	cbnz	x0, LBB0_2
; %bb.14:
	ldr	w1, [x23]
	mov	x0, x24
	mov	x2, x22
	bl	_INIT_QC_COMMON
Lloh25:
	adrp	x8, _QM_HW_V1@GOTPAGE
Lloh26:
	ldr	x8, [x8, _QM_HW_V1@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w28, w8
	b.ne	LBB0_16
; %bb.15:
	mov	w0, #0
	mov	w1, #0
	mov	w2, #0
	mov	w3, #4
	bl	_QM_MK_CQC_DW3_V1
	str	w0, [x24, #16]
Lloh28:
	adrp	x8, _QM_Q_DEPTH@GOTPAGE
Lloh29:
	ldr	x8, [x8, _QM_Q_DEPTH@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	sub	x8, x8, #1
	b	LBB0_18
LBB0_16:
Lloh31:
	adrp	x8, _QM_HW_V2@GOTPAGE
Lloh32:
	ldr	x8, [x8, _QM_HW_V2@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmp	w28, w8
	b.ne	LBB0_19
; %bb.17:
	mov	w0, #4
	bl	_QM_MK_CQC_DW3_V2
	mov	x8, #0
	str	w0, [x24, #16]
LBB0_18:
	str	x8, [x24, #8]
LBB0_19:
Lloh34:
	adrp	x8, _QM_CQ_PHASE_SHIFT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _QM_CQ_PHASE_SHIFT@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
Lloh37:
	adrp	x10, _QM_CQ_FLAG_SHIFT@GOTPAGE
Lloh38:
	ldr	x10, [x10, _QM_CQ_FLAG_SHIFT@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
	str	w8, [x24, #4]
Lloh40:
	adrp	x8, _QM_MB_CMD_CQC@GOTPAGE
Lloh41:
	ldr	x8, [x8, _QM_MB_CMD_CQC@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x25
	mov	x3, x20
	mov	w4, #0
	bl	_qm_mb
	mov	x20, x0
	ldr	w3, [x26]
	mov	x0, x19
	mov	x1, x25
	mov	w2, #24
	bl	_dma_unmap_single
	mov	x0, x24
	bl	_kfree
	mov	x0, x20
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_QM_HW_V1,4,2                   ; @QM_HW_V1
	.comm	_QM_Q_DEPTH,8,3                 ; @QM_Q_DEPTH
	.comm	_QM_HW_V2,4,2                   ; @QM_HW_V2
	.comm	_QM_MB_CMD_SQC,4,2              ; @QM_MB_CMD_SQC
	.comm	_QM_CQ_PHASE_SHIFT,4,2          ; @QM_CQ_PHASE_SHIFT
	.comm	_QM_CQ_FLAG_SHIFT,4,2           ; @QM_CQ_FLAG_SHIFT
	.comm	_QM_MB_CMD_CQC,4,2              ; @QM_MB_CMD_CQC
	.no_dead_strip	_qm_qp_ctx_cfg
.subsections_via_symbols
