	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mbcs_getdma_start
_mbcs_getdma_start:                     ## @mbcs_getdma_start
	.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, %rbx
	movl	44(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_1
## %bb.2:
	movq	48(%rbx), %r15
	movl	(%rbx), %eax
	movq	_MBCS_CACHELINE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_tiocx_dma_addr
	movq	8(%rbx), %rdx
	movq	_MB2@GOTPCREL(%rip), %rsi
	movl	$0, %ecx
	cmpq	(%rsi), %rdx
	jl	LBB0_5
## %bb.3:
	movq	_MB4@GOTPCREL(%rip), %rsi
	movl	$1, %ecx
	cmpq	(%rsi), %rdx
	jl	LBB0_5
## %bb.4:
	movq	_MB6@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	cmpq	(%rsi), %rdx
	setl	%cl
	xorl	$3, %ecx
LBB0_5:
	movl	40(%rbx), %r9d
	movl	36(%rbx), %r10d
	movl	32(%rbx), %r11d
	movl	28(%rbx), %r13d
	movl	24(%rbx), %r12d
	movl	16(%rbx), %r14d
	movl	20(%rbx), %ebx
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	pushq	%r14
	pushq	%rbx
	pushq	%r12
	pushq	%r13
	pushq	%r11
	pushq	%r10
	callq	_mbcs_getdma_set
	addq	$48, %rsp
	movq	_MBCS_CM_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_MBCS_MMR_GET
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_MBCS_MMR_SET
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movl	$-1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBCS_CACHELINE_SIZE,4,2        ## @MBCS_CACHELINE_SIZE
	.comm	_MB2,8,3                        ## @MB2
	.comm	_MB4,8,3                        ## @MB4
	.comm	_MB6,8,3                        ## @MB6
	.comm	_MBCS_CM_CONTROL,4,2            ## @MBCS_CM_CONTROL
	.no_dead_strip	_mbcs_getdma_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mbcs_getdma_start
_mbcs_getdma_start:                     ; @mbcs_getdma_start
	.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	x20, x0
	ldr	w0, [x0, #44]
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x19, [x20, #48]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _MBCS_CACHELINE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MBCS_CACHELINE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w8, w8, w9
	sub	w8, w8, #1
	sdiv	w21, w8, w9
	bl	_tiocx_dma_addr
	mov	x1, x0
	ldr	x2, [x20, #8]
Lloh3:
	adrp	x8, _MB2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MB2@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_4
; %bb.2:
	mov	w3, #0
	b	LBB0_7
LBB0_3:
	mov	w0, #-1
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x8, _MB4@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MB4@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_6
; %bb.5:
	mov	w3, #1
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _MB6@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MB6@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x2, x8
	mov	w8, #2
	cinc	w3, w8, ge
LBB0_7:
	ldp	w6, w5, [x20, #36]
	ldp	w8, w7, [x20, #28]
	ldp	w10, w9, [x20, #20]
	ldr	w11, [x20, #16]
	stp	w10, w11, [sp, #8]
	stp	w8, w9, [sp]
	mov	x0, x19
	mov	x4, x21
	bl	_mbcs_getdma_set
Lloh12:
	adrp	x20, _MBCS_CM_CONTROL@GOTPAGE
Lloh13:
	ldr	x20, [x20, _MBCS_CM_CONTROL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_MBCS_MMR_GET
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_MBCS_MMR_SET
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MBCS_CACHELINE_SIZE,4,2        ; @MBCS_CACHELINE_SIZE
	.comm	_MB2,8,3                        ; @MB2
	.comm	_MB4,8,3                        ; @MB4
	.comm	_MB6,8,3                        ; @MB6
	.comm	_MBCS_CM_CONTROL,4,2            ; @MBCS_CM_CONTROL
	.no_dead_strip	_mbcs_getdma_start
.subsections_via_symbols
