	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_udl_gem_vmap                   ## -- Begin function udl_gem_vmap
	.p2align	4, 0x90
_udl_gem_vmap:                          ## @udl_gem_vmap
	.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
	movq	%rdi, %rbx
	movl	16(%rdi), %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %r15d
	movq	24(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rax), %edi
	callq	_dma_buf_vmap
	movq	%rax, (%rbx)
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_2:
	movq	%rbx, %rdi
	callq	_udl_gem_get_pages
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	8(%rbx), %edi
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r14d, %r14d
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_vmap
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_KERNEL,4,2                ## @PAGE_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_udl_gem_vmap                   ; -- Begin function udl_gem_vmap
	.p2align	2
_udl_gem_vmap:                          ; @udl_gem_vmap
	.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, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w0, [x8]
	bl	_dma_buf_vmap
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.2:
	mov	w0, #0
	b	LBB0_6
LBB0_3:
	ldr	w20, [x19, #16]
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_udl_gem_get_pages
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _PAGE_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	sdiv	w1, w20, w21
	mov	w2, #0
	bl	_vmap
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
	cbnz	x8, LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_KERNEL,4,2                ; @PAGE_KERNEL
.subsections_via_symbols
