	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_map_dma_buf            ## -- Begin function drm_gem_map_dma_buf
	.p2align	4, 0x90
_drm_gem_map_dma_buf:                   ## @drm_gem_map_dma_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movq	_DMA_NONE@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%esi, (%rax)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_2:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	jne	LBB0_4
## %bb.3:
	movq	(%r15), %rax
	movq	(%rax), %rcx
LBB0_4:
	movq	%r15, %rdi
	callq	*(%rcx)
	movq	%rax, %r15
	movl	(%rbx), %edi
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movq	_DMA_ATTR_SKIP_CPU_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r14d, %ecx
	callq	_dma_map_sg_attrs
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_sg_free_table
	movq	%r15, %rdi
	callq	_kfree
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_NONE,4,2                   ## @DMA_NONE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,4,2     ## @DMA_ATTR_SKIP_CPU_SYNC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_map_dma_buf            ; -- Begin function drm_gem_map_dma_buf
	.p2align	2
_drm_gem_map_dma_buf:                   ; @drm_gem_map_dma_buf
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x21, [x8]
Lloh0:
	adrp	x8, _DMA_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_3:
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x21]
	ldr	x8, [x8]
LBB0_5:
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	mov	x21, x0
	ldr	w0, [x20]
	ldp	w2, w1, [x21]
Lloh5:
	adrp	x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	mov	x3, x19
	bl	_dma_map_sg_attrs
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x21
	bl	_sg_free_table
	mov	x0, x21
	bl	_kfree
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_NONE,4,2                   ; @DMA_NONE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,4,2     ; @DMA_ATTR_SKIP_CPU_SYNC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
