	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_buf_map_attachment         ## -- Begin function dma_buf_map_attachment
	.p2align	4, 0x90
_dma_buf_map_attachment:                ## @dma_buf_map_attachment
	.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
	xorl	%eax, %eax
	callq	_might_sleep
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_6:
	movq	8(%rbx), %r15
	testq	%r15, %r15
	je	LBB0_10
## %bb.7:
	movslq	(%rbx), %rax
	cmpl	%r14d, %eax
	je	LBB0_15
## %bb.8:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_15
## %bb.9:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_10:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	*8(%rax)
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %r15
LBB0_12:
	movq	%r15, %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.14:
	movq	%r15, 8(%rbx)
	movl	%r14d, (%rbx)
LBB0_15:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMA_BIDIRECTIONAL,8,3          ## @DMA_BIDIRECTIONAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dma_buf_map_attachment         ; -- Begin function dma_buf_map_attachment
	.p2align	2
_dma_buf_map_attachment:                ; @dma_buf_map_attachment
	.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
	bl	_might_sleep
	cbz	x20, LBB0_4
; %bb.1:
	ldr	x8, [x20, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	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_4:
	mov	w0, #1
	bl	_WARN_ON
	cbnz	x0, LBB0_2
LBB0_5:
	ldr	x21, [x20, #8]
	cbz	x21, LBB0_9
; %bb.6:
	ldrsw	x8, [x20]
	cmp	w8, w19
	b.eq	LBB0_14
; %bb.7:
Lloh2:
	adrp	x9, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x9, x8
	b.eq	LBB0_14
; %bb.8:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_3
LBB0_9:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	mov	x0, x20
	mov	x1, x19
	blr	x8
	mov	x21, x0
	cbnz	x0, LBB0_11
; %bb.10:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x21, x0
LBB0_11:
	mov	x0, x21
	bl	_IS_ERR
	cbnz	w0, LBB0_14
; %bb.12:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.13:
	str	x21, [x20, #8]
	str	w19, [x20]
LBB0_14:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMA_BIDIRECTIONAL,8,3          ; @DMA_BIDIRECTIONAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
