	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_vtcon_control_tx
_pci_vtcon_control_tx:                  ## @pci_vtcon_control_tx
	.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	%rdx, %r15
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpl	$1, %ecx
	sete	%dil
	callq	_assert
	movq	16(%rbx), %r14
	movq	(%r15), %rax
	movl	(%rax), %ecx
	cmpl	$128, %ecx
	je	LBB0_9
## %bb.1:
	cmpl	$129, %ecx
	jne	LBB0_12
## %bb.2:
	movl	$1, (%r14)
	movq	_VTCON_MAXPORTS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.3:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	movq	_VTCON_MAXPORTS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$24, %rbx
	cmpq	%rax, %r13
	jge	LBB0_12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %r15
	leaq	(%r15,%rbx), %r12
	cmpl	$0, 8(%r15,%rbx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_pci_vtcon_announce_port
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, 4(%r15,%rbx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_pci_vtcon_open_port
	jmp	LBB0_8
LBB0_9:
	movq	8(%rax), %rdi
	cmpq	8(%r14), %rdi
	jae	LBB0_13
## %bb.10:
	movq	16(%r14), %rax
	leaq	(%rdi,%rdi,2), %rcx
	cmpl	$0, (%rax,%rcx,8)
	je	LBB0_12
## %bb.11:
	movq	_VTCON_CONSOLE_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	%rdi, -56(%rbp)
	movl	$1, -48(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_pci_vtcon_control_send
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WPRINTF                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VTCON_MAXPORTS,4,2             ## @VTCON_MAXPORTS
	.comm	_VTCON_CONSOLE_PORT,4,2         ## @VTCON_CONSOLE_PORT
	.no_dead_strip	_pci_vtcon_control_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_vtcon_control_tx
_pci_vtcon_control_tx:                  ; @pci_vtcon_control_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x2
	mov	x19, x0
	cmp	w3, #1
	cset	w0, eq
	bl	_assert
	ldr	x19, [x19, #16]
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w9, #128
	b.eq	LBB0_9
; %bb.1:
	cmp	w9, #129
	b.ne	LBB0_12
; %bb.2:
	mov	w8, #1
	str	w8, [x19]
Lloh0:
	adrp	x21, _VTCON_MAXPORTS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _VTCON_MAXPORTS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.3:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	x22, x22, #24
	cmp	x23, x8
	b.ge	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x20, x8, x22
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_pci_vtcon_announce_port
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	w1, #1
	bl	_pci_vtcon_open_port
	b	LBB0_4
LBB0_9:
	ldr	x0, [x8, #8]
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.hs	LBB0_13
; %bb.10:
	ldr	x8, [x19, #16]
	mov	w9, #24
	mul	x9, x0, x9
	ldr	w8, [x8, x9]
	cbz	w8, LBB0_12
; %bb.11:
Lloh2:
	adrp	x8, _VTCON_CONSOLE_PORT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VTCON_CONSOLE_PORT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	str	x0, [sp, #16]
	mov	w8, #1
	str	w8, [sp, #24]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	bl	_pci_vtcon_control_send
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_WPRINTF
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_VTCON_MAXPORTS,4,2             ; @VTCON_MAXPORTS
	.comm	_VTCON_CONSOLE_PORT,4,2         ; @VTCON_CONSOLE_PORT
	.no_dead_strip	_pci_vtcon_control_tx
.subsections_via_symbols
