	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qm_eq_ctx_cfg
_qm_eq_ctx_cfg:                         ## @qm_eq_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	callq	_qm_init_eq_aeq_status
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r13
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$32, %edx
	callq	_dma_map_single
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%r13, %rdi
LBB0_3:
	callq	_kfree
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	12(%r15), %edi
	callq	_lower_32_bits
	movq	%rax, 16(%r13)
	movl	12(%r15), %edi
	callq	_upper_32_bits
	movq	%rax, 8(%r13)
	movq	(%r15), %rax
	movq	_QM_HW_V1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	_QM_EQE_AEQE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
LBB0_9:
	movq	_QM_Q_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	movq	_QM_EQC_PHASE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movl	%eax, (%r13)
	movq	_QM_MB_CMD_EQC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_qm_mb
	movl	%eax, %ebx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	$32, %edx
	callq	_dma_unmap_single
	movq	%r13, %rdi
	callq	_kfree
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.11:
	movq	%rax, %rbx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	$32, %edx
	callq	_dma_map_single
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	jmp	LBB0_3
LBB0_13:
	movl	8(%r15), %edi
	callq	_lower_32_bits
	movq	%rax, 16(%rbx)
	movl	8(%r15), %edi
	callq	_upper_32_bits
	movq	%rax, 8(%rbx)
	movq	_QM_Q_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	movq	_QM_EQC_PHASE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movl	%eax, (%rbx)
	movq	_QM_MB_CMD_AEQC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_qm_mb
	movl	%eax, %r15d
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	$32, %edx
	callq	_dma_unmap_single
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r15d, %eax
	jmp	LBB0_6
	.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,8,3                   ## @QM_HW_V1
	.comm	_QM_EQE_AEQE_SIZE,4,2           ## @QM_EQE_AEQE_SIZE
	.comm	_QM_Q_DEPTH,4,2                 ## @QM_Q_DEPTH
	.comm	_QM_EQC_PHASE_SHIFT,4,2         ## @QM_EQC_PHASE_SHIFT
	.comm	_QM_MB_CMD_EQC,4,2              ## @QM_MB_CMD_EQC
	.comm	_QM_MB_CMD_AEQC,4,2             ## @QM_MB_CMD_AEQC
	.no_dead_strip	_qm_eq_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_eq_ctx_cfg
_qm_eq_ctx_cfg:                         ; @qm_eq_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	x20, x0
	ldr	x19, [x0, #16]
	bl	_qm_init_eq_aeq_status
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
Lloh2:
	adrp	x24, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #32
	bl	_dma_map_single
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_dma_mapping_error
	cbz	x0, LBB0_6
LBB0_2:
	mov	x0, x21
	bl	_kfree
LBB0_3:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	mov	x0, x23
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	w0, [x20, #12]
	bl	_lower_32_bits
	str	x0, [x21, #16]
	ldr	w0, [x20, #12]
	bl	_upper_32_bits
	str	x0, [x21, #8]
	ldr	x8, [x20]
Lloh7:
	adrp	x9, _QM_HW_V1@GOTPAGE
Lloh8:
	ldr	x9, [x9, _QM_HW_V1@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
Lloh10:
	adrp	x8, _QM_EQE_AEQE_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _QM_EQE_AEQE_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x21, #24]
LBB0_8:
Lloh13:
	adrp	x26, _QM_Q_DEPTH@GOTPAGE
Lloh14:
	ldr	x26, [x26, _QM_Q_DEPTH@GOTPAGEOFF]
	ldr	w8, [x26]
	sub	w8, w8, #1
Lloh15:
	adrp	x27, _QM_EQC_PHASE_SHIFT@GOTPAGE
Lloh16:
	ldr	x27, [x27, _QM_EQC_PHASE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x27]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w8, w9, w8
	str	w8, [x21]
Lloh17:
	adrp	x8, _QM_MB_CMD_EQC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _QM_MB_CMD_EQC@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	mov	w3, #0
	mov	w4, #0
	bl	_qm_mb
	mov	x23, x0
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x22
	mov	w2, #32
	bl	_dma_unmap_single
	mov	x0, x21
	bl	_kfree
	cbnz	w23, LBB0_4
; %bb.9:
	ldr	w1, [x25]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.10:
	mov	x21, x0
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #32
	bl	_dma_map_single
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_dma_mapping_error
	cbnz	x0, LBB0_2
; %bb.11:
	ldr	w0, [x20, #8]
	bl	_lower_32_bits
	str	x0, [x21, #16]
	ldr	w0, [x20, #8]
	bl	_upper_32_bits
	str	x0, [x21, #8]
	ldr	w8, [x26]
	sub	w8, w8, #1
	ldr	w9, [x27]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w8, w9, w8
	str	w8, [x21]
Lloh20:
	adrp	x8, _QM_MB_CMD_AEQC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _QM_MB_CMD_AEQC@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	mov	w3, #0
	mov	w4, #0
	bl	_qm_mb
	mov	x20, x0
	ldr	w3, [x24]
	mov	x0, x19
	mov	x1, x22
	mov	w2, #32
	bl	_dma_unmap_single
	mov	x0, x21
	bl	_kfree
	mov	x0, x20
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.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,8,3                   ; @QM_HW_V1
	.comm	_QM_EQE_AEQE_SIZE,4,2           ; @QM_EQE_AEQE_SIZE
	.comm	_QM_Q_DEPTH,4,2                 ; @QM_Q_DEPTH
	.comm	_QM_EQC_PHASE_SHIFT,4,2         ; @QM_EQC_PHASE_SHIFT
	.comm	_QM_MB_CMD_EQC,4,2              ; @QM_MB_CMD_EQC
	.comm	_QM_MB_CMD_AEQC,4,2             ; @QM_MB_CMD_AEQC
	.no_dead_strip	_qm_eq_ctx_cfg
.subsections_via_symbols
