	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bus_dmamap_sync_buf
_bus_dmamap_sync_buf:                   ## @bus_dmamap_sync_buf
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_arm_dcache_align@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	_BUS_DMASYNC_PREWRITE@GOTPCREL(%rip), %r13
	testl	%r15d, (%r13)
	je	LBB0_3
## %bb.1:
	movq	_BUS_DMASYNC_PREREAD@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_3
## %bb.2:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_cpu_dcache_wb_range
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_cpu_l2cache_wb_range
LBB0_3:
	movl	%r14d, %r12d
	orl	%ebx, %r12d
	movq	_arm_dcache_align_mask@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movq	_BUS_DMASYNC_PREREAD@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.4:
	movl	(%r13), %eax
	andl	%r15d, %eax
	movl	%ebx, %edi
	movl	%r14d, %esi
	orl	%r12d, %eax
	je	LBB0_5
## %bb.6:
	callq	_cpu_dcache_wbinv_range
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_cpu_l2cache_wbinv_range
	jmp	LBB0_7
LBB0_5:
	callq	_cpu_dcache_inv_range
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_cpu_l2cache_inv_range
LBB0_7:
	movq	_BUS_DMASYNC_POSTREAD@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_19
## %bb.8:
	testl	%r12d, %r12d
	sete	%al
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	setne	%r15b
	orb	%al, %r15b
                                        ## implicit-def: $r13d
	jne	LBB0_13
## %bb.9:
	xorl	%eax, %eax
	callq	_intr_disable
	movl	%eax, %r13d
	movq	_arm_dcache_align_mask@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, %edx
	andl	%ebx, %edx
	je	LBB0_11
## %bb.10:
	notl	%eax
	andl	%ebx, %eax
	movslq	%eax, %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_memcpy
	movl	(%r12), %eax
LBB0_11:
	leal	(%r14,%rbx), %ecx
	andl	%ecx, %eax
	je	LBB0_13
## %bb.12:
	movslq	%ecx, %rsi
	movq	_arm_dcache_align@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	subl	%eax, %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_memcpy
LBB0_13:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_cpu_dcache_inv_range
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_cpu_l2cache_inv_range
	testb	%r15b, %r15b
	jne	LBB0_19
## %bb.14:
	movq	_arm_dcache_align_mask@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, %edx
	andl	%ebx, %edx
	je	LBB0_16
## %bb.15:
	notl	%eax
	andl	%ebx, %eax
	movslq	%eax, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	movl	(%r15), %eax
LBB0_16:
	addl	%ebx, %r14d
	andl	%r14d, %eax
	je	LBB0_18
## %bb.17:
	movslq	%r14d, %rdi
	movq	_arm_dcache_align@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	subl	%eax, %edx
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
LBB0_18:
	movl	%r13d, %edi
	callq	_intr_restore
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_arm_dcache_align,4,2           ## @arm_dcache_align
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ## @BUS_DMASYNC_PREWRITE
	.comm	_BUS_DMASYNC_PREREAD,4,2        ## @BUS_DMASYNC_PREREAD
	.comm	_arm_dcache_align_mask,4,2      ## @arm_dcache_align_mask
	.comm	_BUS_DMASYNC_POSTREAD,4,2       ## @BUS_DMASYNC_POSTREAD
	.no_dead_strip	_bus_dmamap_sync_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bus_dmamap_sync_buf
_bus_dmamap_sync_buf:                   ; @bus_dmamap_sync_buf
	.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
	sub	sp, sp, #16
	mov	x23, x3
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _arm_dcache_align@GOTPAGE
Lloh4:
	ldr	x8, [x8, _arm_dcache_align@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x1fffffff0
	sub	x22, x9, x12
	mov	sp, x22
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x21, x8, x12
	mov	sp, x21
Lloh10:
	adrp	x28, _BUS_DMASYNC_PREWRITE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _BUS_DMASYNC_PREWRITE@GOTPAGEOFF]
	ldr	w8, [x28]
Lloh12:
	adrp	x25, _BUS_DMASYNC_PREREAD@GOTPAGE
Lloh13:
	ldr	x25, [x25, _BUS_DMASYNC_PREREAD@GOTPAGEOFF]
	tst	w8, w2
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x25]
	tst	w8, w24
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	_cpu_dcache_wb_range
	mov	x0, x20
	mov	x1, x19
	bl	_cpu_l2cache_wb_range
LBB0_3:
	orr	w8, w19, w20
Lloh14:
	adrp	x26, _arm_dcache_align_mask@GOTPAGE
Lloh15:
	ldr	x26, [x26, _arm_dcache_align_mask@GOTPAGEOFF]
	ldr	w9, [x26]
	and	w27, w9, w8
	ldr	w8, [x25]
	tst	w8, w24
	b.eq	LBB0_7
; %bb.4:
	ldr	w8, [x28]
	and	w8, w8, w24
	mov	x0, x20
	mov	x1, x19
	orr	w8, w8, w27
	cbz	w8, LBB0_6
; %bb.5:
	bl	_cpu_dcache_wbinv_range
	mov	x0, x20
	mov	x1, x19
	bl	_cpu_l2cache_wbinv_range
	b	LBB0_7
LBB0_6:
	bl	_cpu_dcache_inv_range
	mov	x0, x20
	mov	x1, x19
	bl	_cpu_l2cache_inv_range
LBB0_7:
Lloh16:
	adrp	x8, _BUS_DMASYNC_POSTREAD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BUS_DMASYNC_POSTREAD@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w24
	b.eq	LBB0_19
; %bb.8:
	cmp	w23, #0
	ccmp	w27, #0, #4, eq
	cset	w24, eq
                                        ; implicit-def: $w23
	b.eq	LBB0_13
; %bb.9:
	bl	_intr_disable
	mov	x23, x0
	ldr	w8, [x26]
	ands	w2, w8, w20
	b.eq	LBB0_11
; %bb.10:
	bic	w8, w20, w8
	sxtw	x1, w8
	mov	x0, x22
	bl	_memcpy
	ldr	w8, [x26]
LBB0_11:
	add	w9, w19, w20
	ands	w8, w8, w9
	b.eq	LBB0_13
; %bb.12:
	sxtw	x1, w9
Lloh19:
	adrp	x9, _arm_dcache_align@GOTPAGE
Lloh20:
	ldr	x9, [x9, _arm_dcache_align@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	sub	w2, w9, w8
	mov	x0, x21
	bl	_memcpy
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	bl	_cpu_dcache_inv_range
	mov	x0, x20
	mov	x1, x19
	bl	_cpu_l2cache_inv_range
	tbnz	w24, #0, LBB0_19
; %bb.14:
	ldr	w8, [x26]
	ands	w2, w8, w20
	b.eq	LBB0_16
; %bb.15:
	bic	w8, w20, w8
	sxtw	x0, w8
	mov	x1, x22
	bl	_memcpy
	ldr	w8, [x26]
LBB0_16:
	add	w9, w19, w20
	ands	w8, w8, w9
	b.eq	LBB0_18
; %bb.17:
	sxtw	x0, w9
Lloh22:
	adrp	x9, _arm_dcache_align@GOTPAGE
Lloh23:
	ldr	x9, [x9, _arm_dcache_align@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	sub	w2, w9, w8
	mov	x1, x21
	bl	_memcpy
LBB0_18:
	mov	x0, x23
	bl	_intr_restore
LBB0_19:
	ldur	x8, [x29, #-88]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	sub	sp, x29, #80
	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_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_arm_dcache_align,4,2           ; @arm_dcache_align
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ; @BUS_DMASYNC_PREWRITE
	.comm	_BUS_DMASYNC_PREREAD,4,2        ; @BUS_DMASYNC_PREREAD
	.comm	_arm_dcache_align_mask,4,2      ; @arm_dcache_align_mask
	.comm	_BUS_DMASYNC_POSTREAD,4,2       ; @BUS_DMASYNC_POSTREAD
	.no_dead_strip	_bus_dmamap_sync_buf
.subsections_via_symbols
