	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msm_gem_pin_iova
_msm_gem_pin_iova:                      ## @msm_gem_pin_iova
	.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	%rsi, %r14
	movq	%rdi, %r15
	callq	_to_msm_bo
	movq	%rax, %rbx
	movq	_IOMMU_READ@GOTPCREL(%rip), %rax
	movq	_MSM_BO_GPU_READONLY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r12d, %r12d
	andl	(%rbx), %ecx
	jne	LBB0_2
## %bb.1:
	movq	_IOMMU_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_2:
	orl	(%rax), %r12d
	leaq	20(%rbx), %rdi
	callq	_mutex_is_locked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	8(%rbx), %rax
	movq	_MSM_MADV_WILLNEED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_lookup_vma
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r15, %rdi
	callq	_get_pages
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_8:
	movl	16(%rbx), %eax
	movl	(%r15), %r8d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %r8d
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msm_gem_map_vma                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IOMMU_READ,4,2                 ## @IOMMU_READ
	.comm	_MSM_BO_GPU_READONLY,4,2        ## @MSM_BO_GPU_READONLY
	.comm	_IOMMU_WRITE,4,2                ## @IOMMU_WRITE
	.comm	_MSM_MADV_WILLNEED,8,3          ## @MSM_MADV_WILLNEED
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.no_dead_strip	_msm_gem_pin_iova
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msm_gem_pin_iova
_msm_gem_pin_iova:                      ; @msm_gem_pin_iova
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_to_msm_bo
	mov	x21, x0
Lloh0:
	adrp	x8, _IOMMU_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IOMMU_READ@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	ldr	w8, [x0], #20
Lloh3:
	adrp	x9, _MSM_BO_GPU_READONLY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MSM_BO_GPU_READONLY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _IOMMU_WRITE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IOMMU_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w25, w10, wzr, eq
	bl	_mutex_is_locked
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	x8, [x21, #8]
Lloh9:
	adrp	x9, _MSM_MADV_WILLNEED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MSM_MADV_WILLNEED@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x0, x20
	mov	x1, x19
	bl	_lookup_vma
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_5
; %bb.3:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x20
	bl	_get_pages
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_7:
	orr	w2, w25, w24
	ldr	w3, [x21, #16]
	ldr	w8, [x20]
Lloh16:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	asr	w4, w8, w9
	mov	x0, x19
	mov	x1, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_msm_gem_map_vma
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_IOMMU_READ,4,2                 ; @IOMMU_READ
	.comm	_MSM_BO_GPU_READONLY,4,2        ; @MSM_BO_GPU_READONLY
	.comm	_IOMMU_WRITE,4,2                ; @IOMMU_WRITE
	.comm	_MSM_MADV_WILLNEED,8,3          ; @MSM_MADV_WILLNEED
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.no_dead_strip	_msm_gem_pin_iova
.subsections_via_symbols
