	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __videobuf_mmap_mapper
___videobuf_mmap_mapper:                ## @__videobuf_mmap_mapper
	.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	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	24(%rsi), %r12
	xorl	%edi, %edi
	testq	%r12, %r12
	sete	%dil
	callq	_BUG_ON
	movl	(%r12), %edi
	movq	_MAGIC_SG_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MAGIC_CHECK
	movq	_VIDEO_MAX_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	(%r14), %rcx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rcx,%r12,8)
	je	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	cmpq	%r12, %rax
	jne	LBB0_2
	jmp	LBB0_9
LBB0_3:
	movl	(%rbx), %edi
	callq	_PAGE_ALIGN
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	(%rax,%r12,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:
	movq	%rbx, 16(%rcx)
	movl	12(%r15), %ecx
	movq	(%rax,%r12,8), %rax
	movq	%rcx, 8(%rax)
	movl	(%rax), %edi
	callq	_PAGE_ALIGN
LBB0_7:
	movl	$1, (%rbx)
	movq	%r14, 8(%rbx)
	movq	_videobuf_vm_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r15)
	movq	_VM_DONTEXPAND@GOTPCREL(%rip), %rax
	movq	_VM_DONTDUMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	4(%r15), %ecx
	movq	_VM_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ecx, %eax
	movl	%eax, 4(%r15)
	movq	%rbx, 16(%r15)
	movl	12(%r15), %r8d
	movl	(%r15), %r10d
	movl	8(%r15), %r9d
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movl	$1, %edi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	xorl	%eax, %eax
	pushq	%r12
	pushq	%r12
	pushq	%r10
	callq	_dprintk
	addq	$32, %rsp
	jmp	LBB0_10
LBB0_9:
	movl	(%r15), %edx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MAGIC_SG_MEM,4,2               ## @MAGIC_SG_MEM
	.comm	_VIDEO_MAX_FRAME,4,2            ## @VIDEO_MAX_FRAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmap app bug: offset invalid [offset=0x%lx]\n"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_videobuf_vm_ops,4,2            ## @videobuf_vm_ops
	.comm	_VM_DONTEXPAND,4,2              ## @VM_DONTEXPAND
	.comm	_VM_DONTDUMP,4,2                ## @VM_DONTDUMP
	.comm	_VM_IO,4,2                      ## @VM_IO
L_.str.1:                               ## @.str.1
	.asciz	"mmap %p: q=%p %08lx-%08lx pgoff %08lx bufs %d-%d\n"

	.no_dead_strip	___videobuf_mmap_mapper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __videobuf_mmap_mapper
___videobuf_mmap_mapper:                ; @__videobuf_mmap_mapper
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x22, [x1, #24]
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	cmp	x22, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w0, [x22]
Lloh3:
	adrp	x8, _MAGIC_SG_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAGIC_SG_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_MAGIC_CHECK
Lloh6:
	adrp	x8, _VIDEO_MAX_FRAME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VIDEO_MAX_FRAME@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x22, #0
	ldr	x9, [x20]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x22, lsl #3]
	cmp	x10, x21
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	cmp	x8, x22
	b.ne	LBB0_2
	b	LBB0_9
LBB0_4:
	ldr	w0, [x21]
	bl	_PAGE_ALIGN
	cbz	w0, LBB0_9
; %bb.5:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
Lloh12:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_11
; %bb.6:
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x9, [x8, x22, lsl #3]
	cbz	x9, LBB0_8
; %bb.7:
	str	x21, [x9, #16]
	ldr	w9, [x19, #12]
	ldr	x8, [x8, x22, lsl #3]
	str	x9, [x8, #8]
	ldr	w0, [x8]
	bl	_PAGE_ALIGN
LBB0_8:
	mov	w8, #1
	str	w8, [x21]
Lloh15:
	adrp	x8, _VM_DONTEXPAND@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VM_DONTEXPAND@GOTPAGEOFF]
Lloh17:
	adrp	x9, _VM_DONTDUMP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _VM_DONTDUMP@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldp	w10, w9, [x19]
	orr	w8, w8, w9
Lloh21:
	adrp	x9, _VM_IO@GOTPAGE
Lloh22:
	ldr	x9, [x9, _VM_IO@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	x20, [x21, #8]
	str	w8, [x19, #4]
Lloh24:
	adrp	x8, _videobuf_vm_ops@GOTPAGE
Lloh25:
	ldr	x8, [x8, _videobuf_vm_ops@GOTPAGEOFF]
	stp	x21, x8, [x19, #16]
	ldp	w9, w8, [x19, #8]
	stp	x22, x22, [sp, #40]
	stp	x9, x10, [sp, #24]
	stp	x20, x8, [sp, #8]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	str	x21, [sp]
	mov	w0, #1
	bl	_dprintk
	mov	w20, #0
	b	LBB0_10
LBB0_9:
	neg	w20, w23
	ldr	w8, [x19]
Lloh28:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh29:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	str	x8, [sp]
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_dprintk
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
	neg	w20, w23
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MAGIC_SG_MEM,4,2               ; @MAGIC_SG_MEM
	.comm	_VIDEO_MAX_FRAME,4,2            ; @VIDEO_MAX_FRAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmap app bug: offset invalid [offset=0x%lx]\n"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_videobuf_vm_ops,4,2            ; @videobuf_vm_ops
	.comm	_VM_DONTEXPAND,4,2              ; @VM_DONTEXPAND
	.comm	_VM_DONTDUMP,4,2                ; @VM_DONTDUMP
	.comm	_VM_IO,4,2                      ; @VM_IO
l_.str.1:                               ; @.str.1
	.asciz	"mmap %p: q=%p %08lx-%08lx pgoff %08lx bufs %d-%d\n"

	.no_dead_strip	___videobuf_mmap_mapper
.subsections_via_symbols
