	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_vtcon_init
_pci_vtcon_init:                        ## @pci_vtcon_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
	movq	%rsi, %r12
	movq	%rdx, -56(%rbp)
	movl	$1, %edi
	movl	$56, %esi
	callq	_calloc
	movq	%rax, %r13
	movl	$1, %edi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, 48(%r13)
	movl	$25, 4(%rax)
	leaq	24(%r13), %r15
	movq	_vtcon_vi_consts@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	movq	%r13, %rdx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_vi_softc_linkup
	leaq	40(%r13), %rax
	movq	%rax, 24(%r13)
	movq	_VTCON_MAXQ@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_5
## %bb.1:
	movq	32(%r13), %rcx
	xorl	%edx, %edx
	movq	_VTCON_RINGSZ@GOTPCREL(%rip), %rsi
	movq	_pci_vtcon_notify_tx@GOTPCREL(%rip), %rbx
	movq	_pci_vtcon_notify_rx@GOTPCREL(%rip), %r8
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rdi), %edi
	movl	%edi, (%rcx,%rdx,8)
	incq	%rdx
	movslq	(%rax), %rdi
	cmpq	%rdi, %rdx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi), %edi
	movl	%edi, 4(%rcx,%rdx,8)
	movq	%rbx, %rdi
	testb	$1, %dl
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r8, %rdi
	jmp	LBB0_4
LBB0_5:
	movq	_PCIR_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VIRTIO_DEV_CONSOLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_pci_set_cfgdata16
	movq	_PCIR_VENDOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VIRTIO_VENDOR@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r12, %rdi
	callq	_pci_set_cfgdata16
	movq	_PCIR_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCIC_SIMPLECOMM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_pci_set_cfgdata8
	movq	_PCIR_SUBDEV_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VIRTIO_TYPE_CONSOLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_pci_set_cfgdata16
	movq	_PCIR_SUBVEND_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r12, %rdi
	callq	_pci_set_cfgdata16
	xorl	%eax, %eax
	callq	_fbsdrun_virtio_msix
	movq	%r15, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_vi_intr_init
	testq	%rax, %rax
	jne	LBB0_11
## %bb.6:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_vi_set_io_bar
	movq	%r13, 16(%r13)
	movabsq	$12884901890, %rax              ## imm = 0x300000002
	movq	%rax, (%r13)
	movq	_pci_vtcon_control_tx@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r13)
	movl	$1, 8(%r13)
	leaq	-56(%rbp), %r12
	leaq	L_.str.1(%rip), %rbx
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strsep
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_strsep
	movq	%rax, %r15
	movq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_pci_vtcon_sock_add
	testq	%rax, %rax
	jns	LBB0_7
## %bb.10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movq	%r15, %rdx
	movq	%rax, %rcx
	callq	_fprintf
LBB0_11:
	movl	$1, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_VTCON_MAXPORTS,4,2             ## @VTCON_MAXPORTS
	.comm	_vtcon_vi_consts,4,2            ## @vtcon_vi_consts
	.comm	_VTCON_MAXQ,4,2                 ## @VTCON_MAXQ
	.comm	_VTCON_RINGSZ,4,2               ## @VTCON_RINGSZ
	.comm	_pci_vtcon_notify_rx,4,2        ## @pci_vtcon_notify_rx
	.comm	_pci_vtcon_notify_tx,4,2        ## @pci_vtcon_notify_tx
	.comm	_PCIR_DEVICE,4,2                ## @PCIR_DEVICE
	.comm	_VIRTIO_DEV_CONSOLE,4,2         ## @VIRTIO_DEV_CONSOLE
	.comm	_PCIR_VENDOR,4,2                ## @PCIR_VENDOR
	.comm	_VIRTIO_VENDOR,4,2              ## @VIRTIO_VENDOR
	.comm	_PCIR_CLASS,4,2                 ## @PCIR_CLASS
	.comm	_PCIC_SIMPLECOMM,4,2            ## @PCIC_SIMPLECOMM
	.comm	_PCIR_SUBDEV_0,4,2              ## @PCIR_SUBDEV_0
	.comm	_VIRTIO_TYPE_CONSOLE,4,2        ## @VIRTIO_TYPE_CONSOLE
	.comm	_PCIR_SUBVEND_0,4,2             ## @PCIR_SUBVEND_0
	.comm	_pci_vtcon_control_tx,4,2       ## @pci_vtcon_control_tx
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	","

L_.str.1:                               ## @.str.1
	.asciz	"="

	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"cannot create port %s: %s\n"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_pci_vtcon_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function pci_vtcon_init
lCPI0_0:
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_pci_vtcon_init:                        ; @pci_vtcon_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	str	x2, [sp, #8]
	mov	w0, #1
	mov	w1, #56
	bl	_calloc
	mov	x19, x0
	mov	w0, #1
	mov	w1, #4
	bl	_calloc
	str	x0, [x19, #48]
	mov	w8, #25
	str	w8, [x0, #4]
	add	x20, x19, #24
Lloh0:
	adrp	x1, _vtcon_vi_consts@GOTPAGE
Lloh1:
	ldr	x1, [x1, _vtcon_vi_consts@GOTPAGEOFF]
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	mov	x4, #0
	bl	_vi_softc_linkup
	add	x8, x19, #40
	str	x8, [x19, #24]
Lloh2:
	adrp	x8, _VTCON_MAXQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VTCON_MAXQ@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x9, #0
	ldr	x10, [x19, #32]
	add	x10, x10, #4
Lloh4:
	adrp	x11, _VTCON_RINGSZ@GOTPAGE
Lloh5:
	ldr	x11, [x11, _VTCON_RINGSZ@GOTPAGEOFF]
Lloh6:
	adrp	x12, _pci_vtcon_notify_rx@GOTPAGE
Lloh7:
	ldr	x12, [x12, _pci_vtcon_notify_rx@GOTPAGEOFF]
Lloh8:
	adrp	x13, _pci_vtcon_notify_tx@GOTPAGE
Lloh9:
	ldr	x13, [x13, _pci_vtcon_notify_tx@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x11]
	str	w14, [x10]
	tst	x9, #0x1
	csel	x14, x12, x13, eq
	ldr	w14, [x14]
	stur	w14, [x10, #-4]
	add	x9, x9, #1
	ldrsw	x14, [x8]
	add	x10, x10, #8
	cmp	x9, x14
	b.lt	LBB0_2
LBB0_3:
Lloh10:
	adrp	x8, _PCIR_DEVICE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCIR_DEVICE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _VIRTIO_DEV_CONSOLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VIRTIO_DEV_CONSOLE@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_pci_set_cfgdata16
Lloh16:
	adrp	x8, _PCIR_VENDOR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCIR_VENDOR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x22, _VIRTIO_VENDOR@GOTPAGE
Lloh20:
	ldr	x22, [x22, _VIRTIO_VENDOR@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_pci_set_cfgdata16
Lloh21:
	adrp	x8, _PCIR_CLASS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PCIR_CLASS@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _PCIC_SIMPLECOMM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PCIC_SIMPLECOMM@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_pci_set_cfgdata8
Lloh27:
	adrp	x8, _PCIR_SUBDEV_0@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PCIR_SUBDEV_0@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _VIRTIO_TYPE_CONSOLE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _VIRTIO_TYPE_CONSOLE@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_pci_set_cfgdata16
Lloh33:
	adrp	x8, _PCIR_SUBVEND_0@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PCIR_SUBVEND_0@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_pci_set_cfgdata16
	bl	_fbsdrun_virtio_msix
	mov	x2, x0
	mov	w21, #1
	mov	x0, x20
	mov	w1, #1
	bl	_vi_intr_init
	cbnz	x0, LBB0_9
; %bb.4:
	mov	x0, x20
	mov	w1, #0
	bl	_vi_set_io_bar
	str	x19, [x19, #16]
Lloh36:
	adrp	x8, lCPI0_0@PAGE
Lloh37:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
Lloh38:
	adrp	x8, _pci_vtcon_control_tx@GOTPAGE
Lloh39:
	ldr	x8, [x8, _pci_vtcon_control_tx@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	stp	w21, w8, [x19, #8]
Lloh41:
	adrp	x20, l_.str@PAGE
Lloh42:
	add	x20, x20, l_.str@PAGEOFF
Lloh43:
	adrp	x21, l_.str.1@PAGE
Lloh44:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	x1, x20
	bl	_strsep
	str	x0, [sp]
	cbz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, sp
	mov	x1, x21
	bl	_strsep
	mov	x22, x0
	ldr	x2, [sp]
	mov	x0, x19
	mov	x1, x22
	bl	_pci_vtcon_sock_add
	tbz	x0, #63, LBB0_5
; %bb.7:
Lloh45:
	adrp	x8, _stderr@GOTPAGE
Lloh46:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh47:
	ldr	w19, [x8]
Lloh48:
	adrp	x8, _errno@GOTPAGE
Lloh49:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh50:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh51:
	adrp	x1, l_.str.2@PAGE
Lloh52:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_fprintf
	mov	w21, #1
	b	LBB0_9
LBB0_8:
	mov	w21, #0
LBB0_9:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdrp	Lloh36, Lloh38
	.loh AdrpLdr	Lloh36, Lloh37
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_VTCON_MAXPORTS,4,2             ; @VTCON_MAXPORTS
	.comm	_vtcon_vi_consts,4,2            ; @vtcon_vi_consts
	.comm	_VTCON_MAXQ,4,2                 ; @VTCON_MAXQ
	.comm	_VTCON_RINGSZ,4,2               ; @VTCON_RINGSZ
	.comm	_pci_vtcon_notify_rx,4,2        ; @pci_vtcon_notify_rx
	.comm	_pci_vtcon_notify_tx,4,2        ; @pci_vtcon_notify_tx
	.comm	_PCIR_DEVICE,4,2                ; @PCIR_DEVICE
	.comm	_VIRTIO_DEV_CONSOLE,4,2         ; @VIRTIO_DEV_CONSOLE
	.comm	_PCIR_VENDOR,4,2                ; @PCIR_VENDOR
	.comm	_VIRTIO_VENDOR,4,2              ; @VIRTIO_VENDOR
	.comm	_PCIR_CLASS,4,2                 ; @PCIR_CLASS
	.comm	_PCIC_SIMPLECOMM,4,2            ; @PCIC_SIMPLECOMM
	.comm	_PCIR_SUBDEV_0,4,2              ; @PCIR_SUBDEV_0
	.comm	_VIRTIO_TYPE_CONSOLE,4,2        ; @VIRTIO_TYPE_CONSOLE
	.comm	_PCIR_SUBVEND_0,4,2             ; @PCIR_SUBVEND_0
	.comm	_pci_vtcon_control_tx,4,2       ; @pci_vtcon_control_tx
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	","

l_.str.1:                               ; @.str.1
	.asciz	"="

	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"cannot create port %s: %s\n"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_pci_vtcon_init
.subsections_via_symbols
