	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bo_sync_for_device     ## -- Begin function nouveau_bo_sync_for_device
	.p2align	4, 0x90
_nouveau_bo_sync_for_device:            ## @nouveau_bo_sync_for_device
	.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, %r15
	movl	16(%rdi), %edi
	callq	_nouveau_bdev
	movq	8(%r15), %r12
	testq	%r12, %r12
	je	LBB0_5
## %bb.1:
	cmpq	$0, (%r15)
	jne	LBB0_5
## %bb.2:
	cmpl	$0, 8(%r12)
	jle	LBB0_5
## %bb.3:
	movq	%rax, %r14
	xorl	%ebx, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	(%r12), %rax
	movl	(%rax,%rbx,4), %esi
	movl	(%r15), %edx
	movl	(%r13), %ecx
	callq	_dma_sync_single_for_device
	incq	%rbx
	movslq	8(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bo_sync_for_device     ; -- Begin function nouveau_bo_sync_for_device
	.p2align	2
_nouveau_bo_sync_for_device:            ; @nouveau_bo_sync_for_device
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	w0, [x0, #16]
	bl	_nouveau_bdev
	ldr	x21, [x20, #8]
	cbz	x21, LBB0_5
; %bb.1:
	ldr	x8, [x20]
	cbnz	x8, LBB0_5
; %bb.2:
	ldr	w8, [x21, #8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x19, x0
	mov	x20, #0
Lloh0:
	adrp	x22, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x23, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DMA_TO_DEVICE@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	x8, [x21]
	ldr	w1, [x8, x20, lsl #2]
	ldr	w2, [x22]
	ldr	w3, [x23]
	bl	_dma_sync_single_for_device
	add	x20, x20, #1
	ldrsw	x8, [x21, #8]
	cmp	x20, x8
	b.lt	LBB0_4
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
.subsections_via_symbols
