	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vgdev_output_init
_vgdev_output_init:                     ## @vgdev_output_init
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	16(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movslq	%esi, %rax
	leaq	(%rax,%rax,2), %r15
	shlq	$4, %r15
	movl	%eax, (%r12,%r15)
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	$1, %edi
	callq	_cpu_to_le32
	movq	%rax, 24(%r12,%r15)
	movq	_XRES_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r12,%r15)
	movq	_YRES_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%r12,%r15)
LBB0_2:
	movq	_DRM_PLANE_TYPE_PRIMARY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_virtio_gpu_plane_init
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r13, %rdi
	jmp	LBB0_4
LBB0_5:
	movq	_DRM_PLANE_TYPE_CURSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_virtio_gpu_plane_init
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_7:
	leaq	(%r12,%r15), %rax
	addq	$40, %rax
	leaq	36(%r12,%r15), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	32(%r12,%r15), %r15
	movq	_virtio_gpu_crtc_funcs@GOTPCREL(%rip), %r8
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movq	%rbx, %rcx
	movq	%rax, %r13
	xorl	%r9d, %r9d
	callq	_drm_crtc_init_with_planes
	movq	_virtio_gpu_crtc_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_drm_crtc_helper_add
	movq	_DRM_MODE_CONNECTOR_VIRTUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_virtio_gpu_connector_funcs@GOTPCREL(%rip), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_drm_connector_init
	movq	_virtio_gpu_conn_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_drm_connector_helper_add
	cmpq	$0, (%r14)
	je	LBB0_9
## %bb.8:
	movq	%r13, %rdi
	callq	_drm_connector_attach_edid_property
LBB0_9:
	movq	_DRM_MODE_ENCODER_VIRTUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_virtio_gpu_enc_funcs@GOTPCREL(%rip), %rdx
	movq	%r12, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	xorl	%r8d, %r8d
	callq	_drm_encoder_init
	movq	_virtio_gpu_enc_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_drm_encoder_helper_add
	movl	$1, %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, (%rbx)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_drm_connector_attach_encoder
	movq	%r13, %rdi
	callq	_drm_connector_register
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XRES_DEF,4,2                   ## @XRES_DEF
	.comm	_YRES_DEF,4,2                   ## @YRES_DEF
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ## @DRM_PLANE_TYPE_PRIMARY
	.comm	_DRM_PLANE_TYPE_CURSOR,4,2      ## @DRM_PLANE_TYPE_CURSOR
	.comm	_virtio_gpu_crtc_funcs,4,2      ## @virtio_gpu_crtc_funcs
	.comm	_virtio_gpu_crtc_helper_funcs,4,2 ## @virtio_gpu_crtc_helper_funcs
	.comm	_virtio_gpu_connector_funcs,4,2 ## @virtio_gpu_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_VIRTUAL,4,2 ## @DRM_MODE_CONNECTOR_VIRTUAL
	.comm	_virtio_gpu_conn_helper_funcs,4,2 ## @virtio_gpu_conn_helper_funcs
	.comm	_virtio_gpu_enc_funcs,4,2       ## @virtio_gpu_enc_funcs
	.comm	_DRM_MODE_ENCODER_VIRTUAL,4,2   ## @DRM_MODE_ENCODER_VIRTUAL
	.comm	_virtio_gpu_enc_helper_funcs,4,2 ## @virtio_gpu_enc_helper_funcs
	.no_dead_strip	_vgdev_output_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vgdev_output_init
_vgdev_output_init:                     ; @vgdev_output_init
	.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	x21, x0
	ldp	x23, x20, [x0, #8]
	mov	w8, #48
	smaddl	x24, w1, w8, x23
	mov	x22, x24
	str	w1, [x22], #32
	cbnz	w1, LBB0_2
; %bb.1:
	sxtw	x25, w19
	mov	w0, #1
	bl	_cpu_to_le32
	mov	w8, #48
	madd	x23, x25, x8, x23
	str	x0, [x23, #24]
Lloh0:
	adrp	x8, _XRES_DEF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XRES_DEF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x23, #16]
Lloh3:
	adrp	x8, _YRES_DEF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _YRES_DEF@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	x0, [x23, #8]
LBB0_2:
Lloh6:
	adrp	x8, _DRM_PLANE_TYPE_PRIMARY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRM_PLANE_TYPE_PRIMARY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x19
	bl	_virtio_gpu_plane_init
	mov	x25, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x25
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x8, _DRM_PLANE_TYPE_CURSOR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DRM_PLANE_TYPE_CURSOR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x19
	bl	_virtio_gpu_plane_init
	mov	x26, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x26
LBB0_6:
	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:
	add	x23, x24, #40
	add	x24, x24, #36
Lloh12:
	adrp	x4, _virtio_gpu_crtc_funcs@GOTPAGE
Lloh13:
	ldr	x4, [x4, _virtio_gpu_crtc_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x25
	mov	x3, x26
	mov	x5, #0
	bl	_drm_crtc_init_with_planes
Lloh14:
	adrp	x1, _virtio_gpu_crtc_helper_funcs@GOTPAGE
Lloh15:
	ldr	x1, [x1, _virtio_gpu_crtc_helper_funcs@GOTPAGEOFF]
	mov	x0, x22
	bl	_drm_crtc_helper_add
Lloh16:
	adrp	x8, _DRM_MODE_CONNECTOR_VIRTUAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_VIRTUAL@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
Lloh19:
	adrp	x2, _virtio_gpu_connector_funcs@GOTPAGE
Lloh20:
	ldr	x2, [x2, _virtio_gpu_connector_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x23
	bl	_drm_connector_init
Lloh21:
	adrp	x1, _virtio_gpu_conn_helper_funcs@GOTPAGE
Lloh22:
	ldr	x1, [x1, _virtio_gpu_conn_helper_funcs@GOTPAGEOFF]
	mov	x0, x23
	bl	_drm_connector_helper_add
	ldr	x8, [x21]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x23
	bl	_drm_connector_attach_edid_property
LBB0_9:
Lloh23:
	adrp	x8, _DRM_MODE_ENCODER_VIRTUAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DRM_MODE_ENCODER_VIRTUAL@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
Lloh26:
	adrp	x2, _virtio_gpu_enc_funcs@GOTPAGE
Lloh27:
	ldr	x2, [x2, _virtio_gpu_enc_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x24
	mov	x4, #0
	bl	_drm_encoder_init
Lloh28:
	adrp	x1, _virtio_gpu_enc_helper_funcs@GOTPAGE
Lloh29:
	ldr	x1, [x1, _virtio_gpu_enc_helper_funcs@GOTPAGEOFF]
	mov	x0, x24
	bl	_drm_encoder_helper_add
	mov	w8, #1
	lsl	w8, w8, w19
	str	w8, [x24]
	mov	x0, x23
	mov	x1, x24
	bl	_drm_connector_attach_encoder
	mov	x0, x23
	bl	_drm_connector_register
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_XRES_DEF,4,2                   ; @XRES_DEF
	.comm	_YRES_DEF,4,2                   ; @YRES_DEF
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ; @DRM_PLANE_TYPE_PRIMARY
	.comm	_DRM_PLANE_TYPE_CURSOR,4,2      ; @DRM_PLANE_TYPE_CURSOR
	.comm	_virtio_gpu_crtc_funcs,4,2      ; @virtio_gpu_crtc_funcs
	.comm	_virtio_gpu_crtc_helper_funcs,4,2 ; @virtio_gpu_crtc_helper_funcs
	.comm	_virtio_gpu_connector_funcs,4,2 ; @virtio_gpu_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_VIRTUAL,4,2 ; @DRM_MODE_CONNECTOR_VIRTUAL
	.comm	_virtio_gpu_conn_helper_funcs,4,2 ; @virtio_gpu_conn_helper_funcs
	.comm	_virtio_gpu_enc_funcs,4,2       ; @virtio_gpu_enc_funcs
	.comm	_DRM_MODE_ENCODER_VIRTUAL,4,2   ; @DRM_MODE_ENCODER_VIRTUAL
	.comm	_virtio_gpu_enc_helper_funcs,4,2 ; @virtio_gpu_enc_helper_funcs
	.no_dead_strip	_vgdev_output_init
.subsections_via_symbols
