	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vicam_mmap
_vicam_mmap:                            ## @vicam_mmap
	.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	(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.3:
	movq	%rsi, %r14
	movq	(%rsi), %r15
	movq	8(%rsi), %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	subq	%r15, %rsi
	callq	_DBG
	subq	%r15, %rbx
	je	LBB0_4
## %bb.5:
	movq	(%r12), %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_vmalloc_to_pfn
	movq	(%r13), %rcx
	movq	_PAGE_SHARED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_remap_pfn_range
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r13), %rcx
	addq	%rcx, %r15
	addq	%rcx, %r12
	xorl	%eax, %eax
	movl	$0, %edx
	subq	%rcx, %rbx
	cmovbq	%rdx, %rbx
	ja	LBB0_6
	jmp	LBB0_9
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vicam_mmap: %ld\n"

	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_SHARED,4,2                ## @PAGE_SHARED
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_vicam_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vicam_mmap
_vicam_mmap:                            ; @vicam_mmap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x22, [x0]
	cbz	x22, LBB0_6
; %bb.1:
	mov	x19, x1
	ldp	x20, x8, [x1]
	sub	x21, x8, x20
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DBG
	cbz	x21, LBB0_5
; %bb.2:
	ldr	x22, [x22]
Lloh2:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x24, _PAGE_SHARED@GOTPAGE
Lloh5:
	ldr	x24, [x24, _PAGE_SHARED@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_vmalloc_to_pfn
	mov	x2, x0
	ldr	x3, [x23]
	ldr	w4, [x24]
	mov	x0, x19
	mov	x1, x20
	bl	_remap_pfn_range
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23]
	add	x20, x8, x20
	add	x22, x8, x22
	subs	x8, x21, x8
	csel	x21, xzr, x8, lo
	b.hi	LBB0_3
LBB0_5:
	mov	w0, #0
	b	LBB0_9
LBB0_6:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vicam_mmap: %ld\n"

	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_SHARED,4,2                ; @PAGE_SHARED
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_vicam_mmap
.subsections_via_symbols
