	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function insert_dma_buffer
_insert_dma_buffer:                     ## @insert_dma_buffer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	movl	8(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %edx
	callq	_DBGMSG
	movl	24(%rbx), %edi
	callq	_cpu_to_le32
	movq	16(%rbx), %rcx
	movslq	%r15d, %r15
	movq	(%rcx,%r15,8), %rcx
	movl	%eax, 4(%rcx)
	movl	$-16, %edi
	callq	_le32_to_cpu
	movq	16(%rbx), %rcx
	movq	(%rcx,%r15,8), %rcx
	andl	%eax, (%rcx)
	movl	(%rbx), %ecx
	leal	(%r15,%rcx), %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%edx, %r15d
	movl	$1, %edi
	callq	_le32_to_cpu
	movq	16(%rbx), %rcx
	movslq	%r15d, %rdx
	movq	(%rcx,%rdx,8), %rcx
	orl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_wmb
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	callq	_reg_read
	testl	$1024, %eax                     ## imm = 0x400
	jne	LBB0_2
## %bb.1:
	movq	_KERN_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_PRINT
LBB0_2:
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	movl	$4096, %edx                     ## imm = 0x1000
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_reg_write                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Inserting dma buf ctx=%d idx=%d"

	.comm	_KERN_INFO,4,2                  ## @KERN_INFO
L_.str.1:                               ## @.str.1
	.asciz	"Waking dma ctx=%d ... processing is probably too slow"

	.no_dead_strip	_insert_dma_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function insert_dma_buffer
_insert_dma_buffer:                     ; @insert_dma_buffer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #32]
	ldr	w1, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DBGMSG
	ldr	w0, [x20, #24]
	bl	_cpu_to_le32
	ldr	x8, [x20, #16]
	sbfiz	x22, x21, #3, #32
	ldr	x8, [x8, x22]
	str	w0, [x8, #4]
	mov	w0, #-16
	bl	_le32_to_cpu
	ldr	x8, [x20, #16]
	ldr	x8, [x8, x22]
	ldr	w9, [x8]
	and	w9, w9, w0
	str	w9, [x8]
	ldr	w8, [x20]
	add	w9, w21, w8
	sub	w9, w9, #1
	sdiv	w10, w9, w8
	msub	w21, w10, w8, w9
	mov	w0, #1
	bl	_le32_to_cpu
	ldr	x8, [x20, #16]
	ldr	x8, [x8, w21, sxtw #3]
	ldr	w9, [x8]
	orr	w9, w9, w0
	str	w9, [x8]
	bl	_wmb
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_reg_read
	tbnz	w0, #10, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _KERN_INFO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KERN_INFO@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w2, [x20, #8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PRINT
LBB0_2:
	ldr	w1, [x20, #4]
	mov	x0, x19
	mov	w2, #4096
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_reg_write
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Inserting dma buf ctx=%d idx=%d"

	.comm	_KERN_INFO,4,2                  ; @KERN_INFO
l_.str.1:                               ; @.str.1
	.asciz	"Waking dma ctx=%d ... processing is probably too slow"

	.no_dead_strip	_insert_dma_buffer
.subsections_via_symbols
