	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tc_port_fixup_legacy_flag
_tc_port_fixup_legacy_flag:             ## @tc_port_fixup_legacy_flag
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	_TC_PORT_LEGACY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	jmp	LBB0_3
LBB0_2:
	movq	_TC_PORT_DP_ALT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r15d
	movq	_TC_PORT_TBT_ALT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%r15d, %eax
LBB0_3:
	notl	%eax
	testl	%r14d, %eax
	je	LBB0_5
## %bb.4:
	movl	4(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	callq	_DRM_ERROR
	xorl	%eax, %eax
	cmpl	$0, (%rbx)
	sete	%al
	movl	%eax, (%rbx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TC_PORT_LEGACY,4,2             ## @TC_PORT_LEGACY
	.comm	_TC_PORT_DP_ALT,4,2             ## @TC_PORT_DP_ALT
	.comm	_TC_PORT_TBT_ALT,4,2            ## @TC_PORT_TBT_ALT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port %s: live status %08x mismatches the legacy port flag, fix flag\n"

	.no_dead_strip	_tc_port_fixup_legacy_flag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tc_port_fixup_legacy_flag
_tc_port_fixup_legacy_flag:             ; @tc_port_fixup_legacy_flag
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _TC_PORT_LEGACY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TC_PORT_LEGACY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_BIT
	bics	wzr, w20, w0
	b.eq	LBB0_3
LBB0_2:
	ldr	w1, [x19, #4]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_DRM_ERROR
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh5:
	adrp	x8, _TC_PORT_DP_ALT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TC_PORT_DP_ALT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_BIT
	mov	x21, x0
Lloh8:
	adrp	x8, _TC_PORT_TBT_ALT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TC_PORT_TBT_ALT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_BIT
	orr	w0, w0, w21
	bics	wzr, w20, w0
	b.ne	LBB0_2
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TC_PORT_LEGACY,4,2             ; @TC_PORT_LEGACY
	.comm	_TC_PORT_DP_ALT,4,2             ; @TC_PORT_DP_ALT
	.comm	_TC_PORT_TBT_ALT,4,2            ; @TC_PORT_TBT_ALT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port %s: live status %08x mismatches the legacy port flag, fix flag\n"

	.no_dead_strip	_tc_port_fixup_legacy_flag
.subsections_via_symbols
