	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_rmchars                 ## -- Begin function DMAbuf_rmchars
	.p2align	4, 0x90
_DMAbuf_rmchars:                        ## @DMAbuf_rmchars
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_audio_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rcx
	movq	_DMA_MAP_MAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rcx)
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_3:
	movq	24(%rcx), %rsi
	testq	%rsi, %rsi
	jle	LBB0_6
## %bb.4:
	movq	(%rcx), %rdi
	movq	8(%rcx), %rax
	addl	(%rdi,%rax,4), %edx
	cmpl	32(%rcx), %edx
	jge	LBB0_7
## %bb.5:
	movl	%edx, (%rdi,%rax,4)
	jmp	LBB0_11
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_7:
	movl	$0, (%rdi,%rax,4)
	decq	%rsi
	movq	%rsi, 24(%rcx)
	incq	%rax
	movslq	36(%rcx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_9
## %bb.8:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_10
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_10:
	movq	%rdx, 8(%rcx)
LBB0_11:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_DMA_MAP_MAPPED,4,2             ## @DMA_MAP_MAPPED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DMAbuf_rmchars                 ; -- Begin function DMAbuf_rmchars
	.p2align	2
_DMAbuf_rmchars:                        ; @DMAbuf_rmchars
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _audio_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldr	x8, [x8]
	ldr	w9, [x8, #16]
Lloh3:
	adrp	x10, _DMA_MAP_MAPPED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DMA_MAP_MAPPED@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_3:
	ldr	x9, [x8, #24]
	cmp	x9, #0
	b.le	LBB0_6
; %bb.4:
	ldp	x11, x10, [x8]
	ldr	w12, [x11, x10, lsl #2]
	ldr	w13, [x8, #32]
	add	w12, w12, w2
	cmp	w12, w13
	b.ge	LBB0_7
; %bb.5:
	mov	w0, #0
	str	w12, [x11, x10, lsl #2]
	ret
LBB0_6:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
	mov	w0, #0
	str	wzr, [x11, x10, lsl #2]
	sub	x9, x9, #1
	str	x9, [x8, #24]
	add	x9, x10, #1
	ldrsw	x10, [x8, #36]
	udiv	x11, x9, x10
	msub	x9, x11, x10, x9
	str	x9, [x8, #8]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_DMA_MAP_MAPPED,4,2             ; @DMA_MAP_MAPPED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
