	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_phy_init_pctl
_b43legacy_phy_init_pctl:               ## @b43legacy_phy_init_pctl
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	_B43legacy_PHYTYPE_B@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	setne	%cl
	movq	_B43legacy_PHYTYPE_G@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_B43legacy_BUG_ON
	movq	%rbx, %rdi
	callq	_is_bcm_board_vendor
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	cmpl	$1046, (%rax)                   ## imm = 0x416
	je	LBB0_15
LBB0_2:
	movq	%rbx, %rdi
	movl	$40, %esi
	movl	$32792, %edx                    ## imm = 0x8018
	callq	_b43legacy_phy_write
	movq	%rbx, %rdi
	movl	$998, %esi                      ## imm = 0x3E6
	callq	_b43legacy_read16
	andl	$65503, %eax                    ## imm = 0xFFDF
	movq	%rbx, %rdi
	movl	$998, %esi                      ## imm = 0x3E6
	movl	%eax, %edx
	callq	_b43legacy_write16
	movq	8(%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_5
## %bb.3:
	cmpl	$0, 56(%rbx)
	je	LBB0_15
## %bb.4:
	movq	%rbx, %rdi
	movl	$1146, %esi                     ## imm = 0x47A
	movl	$49425, %edx                    ## imm = 0xC111
	callq	_b43legacy_phy_write
LBB0_5:
	cmpl	$65535, 16(%rbx)                ## imm = 0xFFFF
	jne	LBB0_15
## %bb.6:
	movq	8(%rbx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_10
## %bb.7:
	cmpl	$2, 20(%rbx)
	jl	LBB0_10
## %bb.8:
	cmpl	$8272, 24(%rbx)                 ## imm = 0x2050
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movl	$118, %esi
	callq	_b43legacy_radio_read16
	orl	$132, %eax
	movq	%rbx, %rdi
	movl	$118, %esi
	movl	%eax, %edx
	callq	_b43legacy_radio_write16
	movb	$1, %r13b
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	28(%rbx), %r14d
	movl	32(%rbx), %r15d
	movl	36(%rbx), %r12d
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	movl	$11, %esi
	movl	$9, %edx
	xorl	%ecx, %ecx
	callq	_b43legacy_radio_set_txpower_bg
LBB0_11:
	movq	%rbx, %rdi
	callq	_b43legacy_dummy_transmission
	movq	_B43legacy_PHY_G_PCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_b43legacy_phy_read
	movl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	testb	%r13b, %r13b
	je	LBB0_12
## %bb.13:
	movl	$118, %esi
	callq	_b43legacy_radio_read16
	andl	$65403, %eax                    ## imm = 0xFF7B
	movq	%rbx, %rdi
	movl	$118, %esi
	movl	%eax, %edx
	callq	_b43legacy_radio_write16
	jmp	LBB0_14
LBB0_12:
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	_b43legacy_radio_set_txpower_bg
LBB0_14:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_b43legacy_radio_clear_tssi     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_PHYTYPE_B,8,3        ## @B43legacy_PHYTYPE_B
	.comm	_B43legacy_PHYTYPE_G,8,3        ## @B43legacy_PHYTYPE_G
	.comm	_B43legacy_PHY_G_PCTL,4,2       ## @B43legacy_PHY_G_PCTL
	.no_dead_strip	_b43legacy_phy_init_pctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43legacy_phy_init_pctl
_b43legacy_phy_init_pctl:               ; @b43legacy_phy_init_pctl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x20, _B43legacy_PHYTYPE_B@GOTPAGE
Lloh1:
	ldr	x20, [x20, _B43legacy_PHYTYPE_B@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
Lloh2:
	adrp	x21, _B43legacy_PHYTYPE_G@GOTPAGE
Lloh3:
	ldr	x21, [x21, _B43legacy_PHYTYPE_G@GOTPAGEOFF]
	ldr	x9, [x21]
	ccmp	x8, x9, #4, ne
	cset	w0, ne
	bl	_B43legacy_BUG_ON
	mov	x0, x19
	bl	_is_bcm_board_vendor
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w8, #1046
	b.eq	LBB0_10
LBB0_2:
	mov	x0, x19
	mov	w1, #40
	mov	w2, #32792
	bl	_b43legacy_phy_write
	mov	x0, x19
	mov	w1, #998
	bl	_b43legacy_read16
	mov	w8, #65503
	and	w2, w0, w8
	mov	x0, x19
	mov	w1, #998
	bl	_b43legacy_write16
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	w8, [x19, #56]
	cbz	w8, LBB0_10
; %bb.4:
	mov	x0, x19
	mov	w1, #1146
	mov	w2, #49425
	bl	_b43legacy_phy_write
LBB0_5:
	ldr	w8, [x19, #16]
	mov	w9, #65535
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.6:
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
	ldr	w8, [x19, #20]
	cmp	w8, #2
	b.lt	LBB0_11
; %bb.8:
	ldr	w8, [x19, #24]
	mov	w9, #8272
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.9:
	mov	x0, x19
	mov	w1, #118
	bl	_b43legacy_radio_read16
	mov	w8, #132
	orr	w2, w0, w8
	mov	x0, x19
	mov	w1, #118
	bl	_b43legacy_radio_write16
	mov	w20, #0
	mov	w21, #0
	mov	w22, #0
	mov	w23, #1
	b	LBB0_12
LBB0_10:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldp	w20, w21, [x19, #28]
	ldr	w22, [x19, #36]
	mov	x0, x19
	mov	w1, #11
	mov	w2, #9
	mov	w3, #0
	bl	_b43legacy_radio_set_txpower_bg
	mov	w23, #0
LBB0_12:
	mov	x0, x19
	bl	_b43legacy_dummy_transmission
Lloh4:
	adrp	x8, _B43legacy_PHY_G_PCTL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _B43legacy_PHY_G_PCTL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43legacy_phy_read
	str	w0, [x19, #16]
	mov	x0, x19
	tbz	w23, #0, LBB0_14
; %bb.13:
	mov	w1, #118
	bl	_b43legacy_radio_read16
	mov	w8, #65403
	and	w2, w0, w8
	mov	x0, x19
	mov	w1, #118
	bl	_b43legacy_radio_write16
	b	LBB0_15
LBB0_14:
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_b43legacy_radio_set_txpower_bg
LBB0_15:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_b43legacy_radio_clear_tssi
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_PHYTYPE_B,8,3        ; @B43legacy_PHYTYPE_B
	.comm	_B43legacy_PHYTYPE_G,8,3        ; @B43legacy_PHYTYPE_G
	.comm	_B43legacy_PHY_G_PCTL,4,2       ; @B43legacy_PHY_G_PCTL
	.no_dead_strip	_b43legacy_phy_init_pctl
.subsections_via_symbols
