	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dce_mi_free_dmif
_dce_mi_free_dmif:                      ## @dce_mi_free_dmif
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_TO_DCE_MEM_INPUT
	movq	%rax, %r15
	movq	_DMIF_BUFFER_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_DMIF_BUFFERS_ALLOCATED@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-40(%rbp), %rdx
	callq	_REG_GET
	cmpq	$0, -40(%rbp)
	je	LBB0_3
## %bb.1:
	movl	(%r12), %edi
	movl	(%rbx), %edx
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	callq	_REG_SET
	movl	(%r12), %edi
	movq	_DMIF_BUFFERS_ALLOCATION_COMPLETED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	movl	$10, %ecx
	movl	$3500, %r8d                     ## imm = 0xDAC
	callq	_REG_WAIT
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	cmpq	$2, %r14
	cmovgeq	%rax, %rdx
	movq	_MC_HUB_RDREQ_DMIF_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_REG_UPDATE
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMIF_BUFFER_CONTROL,4,2        ## @DMIF_BUFFER_CONTROL
	.comm	_DMIF_BUFFERS_ALLOCATED,4,2     ## @DMIF_BUFFERS_ALLOCATED
	.comm	_DMIF_BUFFERS_ALLOCATION_COMPLETED,4,2 ## @DMIF_BUFFERS_ALLOCATION_COMPLETED
	.comm	_MC_HUB_RDREQ_DMIF_LIMIT,4,2    ## @MC_HUB_RDREQ_DMIF_LIMIT
	.comm	_ENABLE,4,2                     ## @ENABLE
	.no_dead_strip	_dce_mi_free_dmif
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dce_mi_free_dmif
_dce_mi_free_dmif:                      ; @dce_mi_free_dmif
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	bl	_TO_DCE_MEM_INPUT
	mov	x20, x0
Lloh0:
	adrp	x21, _DMIF_BUFFER_CONTROL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DMIF_BUFFER_CONTROL@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x22, _DMIF_BUFFERS_ALLOCATED@GOTPAGE
Lloh3:
	ldr	x22, [x22, _DMIF_BUFFERS_ALLOCATED@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #8
	bl	_REG_GET
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x1, x0
	ldr	w0, [x21]
	ldr	w2, [x22]
	mov	w3, #0
	bl	_REG_SET
	ldr	w0, [x21]
Lloh4:
	adrp	x8, _DMIF_BUFFERS_ALLOCATION_COMPLETED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMIF_BUFFERS_ALLOCATION_COMPLETED@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w2, #1
	mov	w3, #10
	mov	w4, #3500
	bl	_REG_WAIT
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.2:
	cmp	x19, #1
	csel	x2, xzr, x8, gt
Lloh7:
	adrp	x8, _MC_HUB_RDREQ_DMIF_LIMIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MC_HUB_RDREQ_DMIF_LIMIT@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _ENABLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENABLE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_REG_UPDATE
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DMIF_BUFFER_CONTROL,4,2        ; @DMIF_BUFFER_CONTROL
	.comm	_DMIF_BUFFERS_ALLOCATED,4,2     ; @DMIF_BUFFERS_ALLOCATED
	.comm	_DMIF_BUFFERS_ALLOCATION_COMPLETED,4,2 ; @DMIF_BUFFERS_ALLOCATION_COMPLETED
	.comm	_MC_HUB_RDREQ_DMIF_LIMIT,4,2    ; @MC_HUB_RDREQ_DMIF_LIMIT
	.comm	_ENABLE,4,2                     ; @ENABLE
	.no_dead_strip	_dce_mi_free_dmif
.subsections_via_symbols
