	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psb6970_hw_apply
_psb6970_hw_apply:                      ## @psb6970_hw_apply
	.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
	callq	_to_psb6970
	movq	%rax, %r15
	leaq	32(%rax), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	cmpq	$0, 48(%r15)
	je	LBB0_7
## %bb.1:
	movq	_PSB6970_MAX_VLANS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	callq	*%r12
	incq	%rbx
	movq	_PSB6970_MAX_VLANS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %r13d
	movq	40(%r15), %r12
	movl	36(%r15), %r14d
	movl	%ebx, %edi
	callq	_PSB6970_VFxL
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rcx
	movl	(%rcx,%rbx,4), %edx
	movq	_PSB6970_VFxL_VV@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	*%r12
	movq	40(%r15), %r12
	movl	36(%r15), %r14d
	movl	%ebx, %edi
	callq	_PSB6970_VFxH
	movl	16(%r15), %edx
	andl	%r13d, %edx
	movq	_PSB6970_VFxH_TM_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %edx
	orl	%r13d, %edx
	movl	%r14d, %edi
	movl	%eax, %esi
	jmp	LBB0_6
LBB0_7:
	movq	_PSB6970_NUM_PORTS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_16
## %bb.8:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movq	_PSB6970_NUM_PORTS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addl	$2, %r13d
	cmpq	%rax, %rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jge	LBB0_16
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	_PSB6970_PBVM_VSD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	orl	$127, %r14d
	cmpq	$0, 48(%r15)
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_PSB6970_EC_IFNTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r15), %rax
	movq	24(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_PSB6970_PBVM_TBVE@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_PSB6970_PBVM_VMCE@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	testl	%r13d, 16(%r15)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_PSB6970_PBVM_AOVTP@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_PSB6970_PBVM_VC@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rax
	movq	40(%r15), %r15
	movl	36(%rax), %r12d
	movl	%ebx, %edi
	callq	_PSB6970_PBVM
	movl	%r12d, %edi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	*%r15
	movl	%ebx, %edi
	callq	_PSB6970_IS_CPU_PORT
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	40(%r12), %r15
	movl	36(%r12), %r14d
	movl	%ebx, %edi
	callq	_PSB6970_EC
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	*%r15
	movq	40(%r12), %r15
	movl	36(%r12), %r14d
	movl	%ebx, %edi
	callq	_PSB6970_DVID
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	*%r15
	jmp	LBB0_15
LBB0_16:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSB6970_MAX_VLANS,4,2          ## @PSB6970_MAX_VLANS
	.comm	_PSB6970_VFxL_VV,4,2            ## @PSB6970_VFxL_VV
	.comm	_PSB6970_VFxH_TM_SHIFT,4,2      ## @PSB6970_VFxH_TM_SHIFT
	.comm	_PSB6970_NUM_PORTS,4,2          ## @PSB6970_NUM_PORTS
	.comm	_PSB6970_PBVM_VSD,4,2           ## @PSB6970_PBVM_VSD
	.comm	_PSB6970_EC_IFNTE,4,2           ## @PSB6970_EC_IFNTE
	.comm	_PSB6970_PBVM_TBVE,4,2          ## @PSB6970_PBVM_TBVE
	.comm	_PSB6970_PBVM_VMCE,4,2          ## @PSB6970_PBVM_VMCE
	.comm	_PSB6970_PBVM_AOVTP,4,2         ## @PSB6970_PBVM_AOVTP
	.comm	_PSB6970_PBVM_VC,4,2            ## @PSB6970_PBVM_VC
	.no_dead_strip	_psb6970_hw_apply
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psb6970_hw_apply
_psb6970_hw_apply:                      ; @psb6970_hw_apply
	.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
	bl	_to_psb6970
	mov	x20, x0
	add	x0, x0, #32
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_mutex_lock
	ldr	x8, [x20, #48]
Lloh0:
	adrp	x19, _PSB6970_MAX_VLANS@GOTPAGE
Lloh1:
	ldr	x19, [x19, _PSB6970_MAX_VLANS@GOTPAGEOFF]
	ldr	w9, [x19]
	cmp	x8, #0
	ccmp	w9, #1, #8, ne
	b.ge	LBB0_11
LBB0_1:
Lloh2:
	adrp	x26, _PSB6970_NUM_PORTS@GOTPAGE
Lloh3:
	ldr	x26, [x26, _PSB6970_NUM_PORTS@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	mov	w27, #0
	mov	x21, #0
Lloh4:
	adrp	x28, _PSB6970_PBVM_VSD@GOTPAGE
Lloh5:
	ldr	x28, [x28, _PSB6970_PBVM_VSD@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x26]
	add	w27, w27, #2
	cmp	x21, x8
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x28]
	orr	w24, w8, #0x7f
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x8, _PSB6970_EC_IFNTE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PSB6970_EC_IFNTE@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	ldr	x8, [x20, #8]
	ldr	x9, [x20, #24]
	ldr	x9, [x9, x21, lsl #3]
	ldr	w22, [x8, x9, lsl #2]
Lloh9:
	adrp	x8, _PSB6970_PBVM_TBVE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PSB6970_PBVM_TBVE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _PSB6970_PBVM_VMCE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PSB6970_PBVM_VMCE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w24
	orr	w24, w8, w9
	ldr	w8, [x20, #16]
	tst	w8, w27
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh15:
	adrp	x8, _PSB6970_PBVM_AOVTP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PSB6970_PBVM_AOVTP@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _PSB6970_PBVM_VC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PSB6970_PBVM_VC@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w24
	orr	w24, w8, w9
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w23, #0
	mov	w22, #1
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x19, [x20, #40]
	ldr	w25, [x20, #36]
	mov	x0, x21
	bl	_PSB6970_PBVM
	mov	x1, x0
	mov	x0, x25
	mov	x2, x24
	blr	x19
	mov	x0, x21
	bl	_PSB6970_IS_CPU_PORT
	cbnz	w0, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x19, [x20, #40]
	ldr	w24, [x20, #36]
	mov	x0, x21
	bl	_PSB6970_EC
	mov	x1, x0
	mov	x0, x24
	mov	x2, x23
	blr	x19
	ldr	x19, [x20, #40]
	ldr	w23, [x20, #36]
	mov	x0, x21
	bl	_PSB6970_DVID
	mov	x1, x0
	mov	x0, x23
	mov	x2, x22
	blr	x19
	b	LBB0_3
LBB0_10:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_mutex_unlock
	mov	w0, #0
	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_11:
	mov	x21, #0
Lloh21:
	adrp	x23, _PSB6970_VFxL_VV@GOTPAGE
Lloh22:
	ldr	x23, [x23, _PSB6970_VFxL_VV@GOTPAGEOFF]
Lloh23:
	adrp	x24, _PSB6970_VFxH_TM_SHIFT@GOTPAGE
Lloh24:
	ldr	x24, [x24, _PSB6970_VFxH_TM_SHIFT@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x22
	mov	w2, #0
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	blr	x26
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.ge	LBB0_1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	w25, [x8, x21, lsl #2]
	ldr	x26, [x20, #40]
	ldr	w22, [x20, #36]
	mov	x0, x21
	bl	_PSB6970_VFxL
	mov	x1, x0
	cbz	w25, LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x23]
	ldr	x9, [x20, #8]
	ldr	w9, [x9, x21, lsl #2]
	orr	w2, w9, w8
	mov	x0, x22
	blr	x26
	ldr	x26, [x20, #40]
	ldr	w22, [x20, #36]
	mov	x0, x21
	bl	_PSB6970_VFxH
	mov	x1, x0
	ldr	w8, [x20, #16]
	and	w8, w8, w25
	ldr	w9, [x24]
	lsl	w8, w8, w9
	orr	w2, w8, w25
	mov	x0, x22
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PSB6970_MAX_VLANS,4,2          ; @PSB6970_MAX_VLANS
	.comm	_PSB6970_VFxL_VV,4,2            ; @PSB6970_VFxL_VV
	.comm	_PSB6970_VFxH_TM_SHIFT,4,2      ; @PSB6970_VFxH_TM_SHIFT
	.comm	_PSB6970_NUM_PORTS,4,2          ; @PSB6970_NUM_PORTS
	.comm	_PSB6970_PBVM_VSD,4,2           ; @PSB6970_PBVM_VSD
	.comm	_PSB6970_EC_IFNTE,4,2           ; @PSB6970_EC_IFNTE
	.comm	_PSB6970_PBVM_TBVE,4,2          ; @PSB6970_PBVM_TBVE
	.comm	_PSB6970_PBVM_VMCE,4,2          ; @PSB6970_PBVM_VMCE
	.comm	_PSB6970_PBVM_AOVTP,4,2         ; @PSB6970_PBVM_AOVTP
	.comm	_PSB6970_PBVM_VC,4,2            ; @PSB6970_PBVM_VC
	.no_dead_strip	_psb6970_hw_apply
.subsections_via_symbols
