	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_dma_buf_begin_cpu_access
_amdgpu_dma_buf_begin_cpu_access:       ## @amdgpu_dma_buf_begin_cpu_access
	.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, %ebx
	movl	(%rdi), %edi
	callq	_gem_to_amdgpu_bo
	movq	%rax, %r15
	movl	8(%rax), %edi
	callq	_amdgpu_ttm_adev
	movq	$1, -32(%rbp)
	movl	16(%r15), %esi
	movq	%rax, %rdi
	callq	_amdgpu_display_supported_domains
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpl	%ebx, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jne	LBB0_8
LBB0_2:
	movq	_AMDGPU_GEM_DOMAIN_GTT@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_bo_reserve
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:
	cmpl	$0, 12(%r15)
	jne	LBB0_7
## %bb.5:
	movl	(%rbx), %esi
	testl	%esi, (%r15)
	je	LBB0_7
## %bb.6:
	leaq	8(%r15), %rbx
	movq	%r15, %rdi
	callq	_amdgpu_bo_placement_from_domain
	movq	%r15, %rsi
	addq	$4, %rsi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ttm_bo_validate
	movl	%eax, %r14d
LBB0_7:
	movq	%r15, %rdi
	callq	_amdgpu_bo_unreserve
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ## @AMDGPU_GEM_DOMAIN_GTT
	.no_dead_strip	_amdgpu_dma_buf_begin_cpu_access
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_dma_buf_begin_cpu_access
_amdgpu_dma_buf_begin_cpu_access:       ; @amdgpu_dma_buf_begin_cpu_access
	.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	x21, x1
	ldr	w0, [x0]
	bl	_gem_to_amdgpu_bo
	mov	x19, x0
	mov	x20, x0
	ldr	w0, [x20, #8]!
	bl	_amdgpu_ttm_adev
	mov	w8, #1
	str	x8, [sp, #8]
	ldr	w1, [x19, #16]
	bl	_amdgpu_display_supported_domains
Lloh0:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w21
	ccmp	w9, w21, #4, ne
	b.ne	LBB0_7
; %bb.1:
Lloh6:
	adrp	x22, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGE
Lloh7:
	ldr	x22, [x22, _AMDGPU_GEM_DOMAIN_GTT@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	bl	_amdgpu_bo_reserve
	mov	x21, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.3:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_6
; %bb.4:
	ldr	w8, [x19]
	ldr	w1, [x22]
	tst	w1, w8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_amdgpu_bo_placement_from_domain
	add	x1, x19, #4
	add	x2, sp, #8
	mov	x0, x20
	bl	_ttm_bo_validate
	mov	x21, x0
LBB0_6:
	mov	x0, x19
	bl	_amdgpu_bo_unreserve
	b	LBB0_8
LBB0_7:
	mov	w21, #0
LBB0_8:
	mov	x0, x21
	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 AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_AMDGPU_GEM_DOMAIN_GTT,4,2      ; @AMDGPU_GEM_DOMAIN_GTT
	.no_dead_strip	_amdgpu_dma_buf_begin_cpu_access
.subsections_via_symbols
