	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vino_mmap
_vino_mmap:                             ## @vino_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_video_drvdata
	movq	%rax, %r13
	movq	(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %r14
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %r14
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r13, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINTR@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_2:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	cmpq	$0, 8(%r13)
	je	LBB0_4
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_4:
	movl	24(%r15), %eax
	movq	_VM_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.5:
	movq	_VM_SHARED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.6:
	movq	%r13, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_vino_queue_get_length
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:
	movl	%eax, %r12d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subq	%rax, -72(%rbp)                 ## 8-byte Folded Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_vino_queue_get_buffer
	testq	%rax, %rax
	je	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %r13
	cmpq	%r14, (%rax)
	je	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	incl	%r15d
	cmpl	%r15d, %r12d
	jne	LBB0_8
## %bb.11:
	leaq	L_.str.5(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_19
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_15
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.3(%rip), %rdi
LBB0_15:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_16:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_19
LBB0_17:
	leaq	L_.str.6(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	16(%r13), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	imulq	%rax, %rdx
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rdx, %rsi
	jbe	LBB0_24
## %bb.18:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
LBB0_19:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_20:
	subl	(%rax), %ebx
LBB0_21:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_22:
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_23:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	testq	%rax, %rax
	je	LBB0_29
## %bb.25:
	movq	%rsi, %rbx
	xorl	%r15d, %r15d
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movq	(%rax,%r15,8), %rdi
	callq	_virt_to_phys
	movq	%rax, %rdx
	movq	(%r12), %rax
	cmpq	%rax, %rbx
	jb	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shrq	%cl, %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	56(%rdi), %r8d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%rax, %rcx
	callq	_remap_pfn_range
	testq	%rax, %rax
	jne	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	(%r12), %rax
	addq	%rax, %r14
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	subq	%rax, %rbx
	incl	%r15d
	cmpq	%r15, 16(%r13)
	ja	LBB0_26
LBB0_29:
	movl	$1, 8(%r13)
	movq	_VM_DONTEXPAND@GOTPCREL(%rip), %rax
	movq	_VM_RESERVED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	orl	24(%rdx), %ecx
	movq	_VM_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ecx, %eax
	movl	%eax, 24(%rdx)
	movq	%r13, 48(%rdx)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%rdx)
	movq	_vino_vm_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rdx)
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_30:
	leaq	L_.str.8(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmap():\n"

	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_VM_WRITE,4,2                   ## @VM_WRITE
L_.str.1:                               ## @.str.1
	.asciz	"mmap(): app bug: PROT_WRITE please\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VM_SHARED,4,2                  ## @VM_SHARED
L_.str.2:                               ## @.str.2
	.asciz	"mmap(): app bug: MAP_SHARED please\n"

L_.str.3:                               ## @.str.3
	.asciz	"mmap(): queue not initialized\n"

L_.str.4:                               ## @.str.4
	.asciz	"mmap(): vino_queue_get_buffer() failed\n"

L_.str.5:                               ## @.str.5
	.asciz	"mmap(): invalid offset = %lu\n"

L_.str.6:                               ## @.str.6
	.asciz	"mmap(): buffer = %d\n"

	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
L_.str.7:                               ## @.str.7
	.asciz	"mmap(): failed: size = %lu > %lu\n"

L_.str.8:                               ## @.str.8
	.asciz	"mmap(): remap_pfn_range() failed\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_VM_DONTEXPAND,4,2              ## @VM_DONTEXPAND
	.comm	_VM_RESERVED,4,2                ## @VM_RESERVED
	.comm	_VM_IO,4,2                      ## @VM_IO
	.comm	_vino_vm_ops,4,2                ## @vino_vm_ops
	.no_dead_strip	_vino_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vino_mmap
_vino_mmap:                             ; @vino_mmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
	bl	_video_drvdata
	mov	x19, x0
	ldp	x22, x28, [x20]
	ldr	x23, [x20, #16]
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x27, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	mov	x0, x19
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _EINTR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_21
LBB0_2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_19
LBB0_4:
	ldr	w8, [x20, #24]
Lloh10:
	adrp	x9, _VM_WRITE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _VM_WRITE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.5:
Lloh13:
	adrp	x9, _VM_SHARED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _VM_SHARED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.6:
	add	x24, x19, #4
	mov	x0, x24
	bl	_vino_queue_get_length
	cbz	w0, LBB0_14
; %bb.7:
	mov	x26, x0
	mov	w25, #0
	sub	x28, x28, x22
	lsl	x27, x23, x27
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x25
	bl	_vino_queue_get_buffer
	cbz	x0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x23, x0
	ldr	x8, [x0]
	cmp	x8, x27
	b.eq	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	w25, w25, #1
	cmp	w26, w25
	b.ne	LBB0_8
; %bb.11:
	str	x27, [sp]
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_18
LBB0_12:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_13:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_14:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_15:
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_16:
	str	x25, [sp]
Lloh26:
	adrp	x0, l_.str.6@PAGE
Lloh27:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_dprintk
	ldr	x8, [x23, #16]
Lloh28:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh29:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x9, [x24]
	mul	x9, x9, x8
	cmp	x28, x9
	b.ls	LBB0_22
; %bb.17:
	stp	x28, x9, [sp]
Lloh30:
	adrp	x0, l_.str.7@PAGE
Lloh31:
	add	x0, x0, l_.str.7@PAGEOFF
LBB0_18:
	bl	_dprintk
Lloh32:
	adrp	x8, _EINVAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_20:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_21:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_22:
Lloh34:
	adrp	x26, _PAGE_SHIFT@GOTPAGE
Lloh35:
	ldr	x26, [x26, _PAGE_SHIFT@GOTPAGEOFF]
	cbz	x8, LBB0_27
; %bb.23:
	mov	x25, #0
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #24]
	ldr	x0, [x8, x25, lsl #3]
	bl	_virt_to_phys
	ldr	x3, [x24]
	cmp	x28, x3
	b.lo	LBB0_27
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	x8, [x26]
	lsr	x2, x0, x8
	ldr	w4, [x20, #56]
	mov	x0, x20
	mov	x1, x22
	bl	_remap_pfn_range
	cbnz	x0, LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	x8, [x24]
	add	x22, x8, x22
	sub	x28, x28, x8
	add	w25, w25, #1
	ldr	x8, [x23, #16]
	cmp	x8, x25
	b.hi	LBB0_24
LBB0_27:
	mov	w22, #0
	mov	w8, #1
Lloh36:
	adrp	x9, _VM_DONTEXPAND@GOTPAGE
Lloh37:
	ldr	x9, [x9, _VM_DONTEXPAND@GOTPAGEOFF]
	str	w8, [x23, #8]
Lloh38:
	ldr	w8, [x9]
Lloh39:
	adrp	x9, _VM_RESERVED@GOTPAGE
Lloh40:
	ldr	x9, [x9, _VM_RESERVED@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20, #24]
	orr	w8, w8, w9
Lloh42:
	adrp	x9, _VM_IO@GOTPAGE
Lloh43:
	ldr	x9, [x9, _VM_IO@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x20, #24]
	str	x23, [x20, #48]
Lloh45:
	adrp	x8, _vino_vm_ops@GOTPAGE
Lloh46:
	ldr	x8, [x8, _vino_vm_ops@GOTPAGEOFF]
	stp	x8, x21, [x20, #32]
	b	LBB0_20
LBB0_28:
Lloh47:
	adrp	x0, l_.str.8@PAGE
Lloh48:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_dprintk
Lloh49:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh50:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_19
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmap():\n"

	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_VM_WRITE,4,2                   ; @VM_WRITE
l_.str.1:                               ; @.str.1
	.asciz	"mmap(): app bug: PROT_WRITE please\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VM_SHARED,4,2                  ; @VM_SHARED
l_.str.2:                               ; @.str.2
	.asciz	"mmap(): app bug: MAP_SHARED please\n"

l_.str.3:                               ; @.str.3
	.asciz	"mmap(): queue not initialized\n"

l_.str.4:                               ; @.str.4
	.asciz	"mmap(): vino_queue_get_buffer() failed\n"

l_.str.5:                               ; @.str.5
	.asciz	"mmap(): invalid offset = %lu\n"

l_.str.6:                               ; @.str.6
	.asciz	"mmap(): buffer = %d\n"

	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
l_.str.7:                               ; @.str.7
	.asciz	"mmap(): failed: size = %lu > %lu\n"

l_.str.8:                               ; @.str.8
	.asciz	"mmap(): remap_pfn_range() failed\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_VM_DONTEXPAND,4,2              ; @VM_DONTEXPAND
	.comm	_VM_RESERVED,4,2                ; @VM_RESERVED
	.comm	_VM_IO,4,2                      ; @VM_IO
	.comm	_vino_vm_ops,4,2                ; @vino_vm_ops
	.no_dead_strip	_vino_mmap
.subsections_via_symbols
