	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_phy_initg
_b43legacy_phy_initg:                   ## @b43legacy_phy_initg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	cmpl	$1, 8(%rdi)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_b43legacy_phy_initb5
	cmpl	$2, 8(%rbx)
	jge	LBB0_4
	jmp	LBB0_10
LBB0_2:
	movq	%rbx, %rdi
	callq	_b43legacy_phy_initb6
	cmpl	$2, 8(%rbx)
	jl	LBB0_10
LBB0_4:
	cmpq	$0, 40(%rbx)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_b43legacy_phy_inita
	cmpl	$2, 8(%rbx)
	jl	LBB0_10
LBB0_6:
	movq	%rbx, %rdi
	movl	$2068, %esi                     ## imm = 0x814
	xorl	%edx, %edx
	callq	_b43legacy_phy_write
	movq	%rbx, %rdi
	movl	$2069, %esi                     ## imm = 0x815
	xorl	%edx, %edx
	callq	_b43legacy_phy_write
	movl	8(%rbx), %eax
	cmpl	$2, %eax
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movl	$2065, %esi                     ## imm = 0x811
	xorl	%edx, %edx
	callq	_b43legacy_phy_write
	movq	%rbx, %rdi
	movl	$21, %esi
	movl	$192, %edx
	callq	_b43legacy_phy_write
	movl	8(%rbx), %eax
LBB0_8:
	cmpl	$6, %eax
	jl	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	movl	$2065, %esi                     ## imm = 0x811
	movl	$1024, %edx                     ## imm = 0x400
	callq	_b43legacy_phy_write
	movq	%rbx, %rdi
	movl	$21, %esi
	movl	$192, %edx
	callq	_b43legacy_phy_write
LBB0_10:
	cmpq	$0, 40(%rbx)
	je	LBB0_17
## %bb.11:
	movq	%rbx, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_b43legacy_phy_read
	movl	%eax, %r14d
	cmpb	$3, %r14b
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	movl	$1218, %esi                     ## imm = 0x4C2
	movl	$6166, %edx                     ## imm = 0x1816
	callq	_b43legacy_phy_write
	movq	%rbx, %rdi
	movl	$1219, %esi                     ## imm = 0x4C3
	movl	$34310, %edx                    ## imm = 0x8606
	callq	_b43legacy_phy_write
LBB0_13:
	andl	$254, %r14d
	cmpl	$4, %r14d
	jne	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	movl	$1218, %esi                     ## imm = 0x4C2
	movl	$6166, %edx                     ## imm = 0x1816
	callq	_b43legacy_phy_write
	movq	%rbx, %rdi
	movl	$1219, %esi                     ## imm = 0x4C3
	movl	$32774, %edx                    ## imm = 0x8006
	callq	_b43legacy_phy_write
	movq	%rbx, %rdi
	movl	$1228, %esi                     ## imm = 0x4CC
	callq	_b43legacy_phy_read
	movzbl	%al, %edx
	orl	$7936, %edx                     ## imm = 0x1F00
	movq	%rbx, %rdi
	movl	$1228, %esi                     ## imm = 0x4CC
	callq	_b43legacy_phy_write
LBB0_15:
	cmpl	$2, 8(%rbx)
	jl	LBB0_17
## %bb.16:
	movq	%rbx, %rdi
	movl	$1150, %esi                     ## imm = 0x47E
	movl	$120, %edx
	callq	_b43legacy_phy_write
LBB0_17:
	cmpl	$8, 12(%rbx)
	jne	LBB0_19
## %bb.18:
	movq	%rbx, %rdi
	movl	$2049, %esi                     ## imm = 0x801
	callq	_b43legacy_phy_read
	orl	$128, %eax
	movq	%rbx, %rdi
	movl	$2049, %esi                     ## imm = 0x801
	movl	%eax, %edx
	callq	_b43legacy_phy_write
	movq	%rbx, %rdi
	movl	$1086, %esi                     ## imm = 0x43E
	callq	_b43legacy_phy_read
	orl	$4, %eax
	movq	%rbx, %rdi
	movl	$1086, %esi                     ## imm = 0x43E
	movl	%eax, %edx
	callq	_b43legacy_phy_write
LBB0_19:
	cmpl	$2, 8(%rbx)
	jl	LBB0_22
## %bb.20:
	cmpq	$0, 40(%rbx)
	je	LBB0_22
## %bb.21:
	movq	%rbx, %rdi
	callq	_b43legacy_calc_loopback_gain
LBB0_22:
	cmpl	$8, 12(%rbx)
	je	LBB0_26
## %bb.23:
	movl	16(%rbx), %edx
	movq	%rbx, %rdi
	cmpl	$65535, %edx                    ## imm = 0xFFFF
	jne	LBB0_25
## %bb.24:
	callq	_b43legacy_radio_init2050
	movl	%eax, 16(%rbx)
	jmp	LBB0_26
LBB0_25:
	movl	$120, %esi
	callq	_b43legacy_radio_write16
LBB0_26:
	movl	20(%rbx), %eax
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	jne	LBB0_28
## %bb.27:
	movq	%rbx, %rdi
	callq	_b43legacy_phy_lo_g_measure
	cmpq	$0, 40(%rbx)
	jne	LBB0_39
	jmp	LBB0_40
LBB0_28:
	cmpl	$8272, 24(%rbx)                 ## imm = 0x2050
	jne	LBB0_31
## %bb.29:
	cmpl	$8, 12(%rbx)
	jne	LBB0_31
## %bb.30:
	movl	28(%rbx), %edx
	shll	$4, %edx
	orl	%eax, %edx
	jmp	LBB0_32
LBB0_31:
	movq	%rbx, %rdi
	movl	$82, %esi
	callq	_b43legacy_radio_read16
	movl	%eax, %edx
	andl	$65520, %edx                    ## imm = 0xFFF0
	orl	28(%rbx), %edx
LBB0_32:
	movq	%rbx, %rdi
	movl	$82, %esi
	callq	_b43legacy_radio_write16
	cmpl	$6, 8(%rbx)
	jl	LBB0_34
## %bb.33:
	movq	%rbx, %rdi
	movl	$54, %esi
	callq	_b43legacy_phy_read
	andl	$4095, %eax                     ## imm = 0xFFF
	movl	20(%rbx), %edx
	shll	$12, %edx
	orl	%eax, %edx
	movq	%rbx, %rdi
	movl	$54, %esi
	callq	_b43legacy_phy_write
LBB0_34:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_B43legacy_BFL_PACTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	8(%rax), %ecx
	movl	$32895, %eax                    ## imm = 0x807F
	movl	$32885, %edx                    ## imm = 0x8075
	cmovel	%eax, %edx
	movq	%rbx, %rdi
	movl	$46, %esi
	callq	_b43legacy_phy_write
	cmpl	$1, 8(%rbx)
	jg	LBB0_36
## %bb.35:
	movq	%rbx, %rdi
	movl	$47, %esi
	movl	$257, %edx                      ## imm = 0x101
	jmp	LBB0_37
LBB0_36:
	movq	%rbx, %rdi
	movl	$47, %esi
	movl	$514, %edx                      ## imm = 0x202
LBB0_37:
	callq	_b43legacy_phy_write
	cmpq	$0, 40(%rbx)
	je	LBB0_40
LBB0_39:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_b43legacy_phy_lo_adjust
	movq	%rbx, %rdi
	movl	$2063, %esi                     ## imm = 0x80F
	movl	$32888, %edx                    ## imm = 0x8078
	callq	_b43legacy_phy_write
LBB0_40:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_B43legacy_BFL_RSSI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rax)
	je	LBB0_41
## %bb.42:
	cmpq	$0, 40(%rbx)
	jne	LBB0_44
## %bb.43:
	cmpl	$2, 8(%rbx)
	jl	LBB0_48
LBB0_44:
	movq	32(%rbx), %rcx
	movl	4(%rcx), %eax
	cmpl	$-1000, (%rcx)                  ## imm = 0xFC18
	jne	LBB0_46
## %bb.45:
	xorl	%edi, %edi
	cmpl	$-1000, %eax                    ## imm = 0xFC18
	setne	%dil
	callq	_B43legacy_WARN_ON
	movq	%rbx, %rdi
	callq	_b43legacy_calc_nrssi_slope
LBB0_48:
	cmpl	$8, 12(%rbx)
	jne	LBB0_50
LBB0_49:
	movq	%rbx, %rdi
	movl	$2053, %esi                     ## imm = 0x805
	movl	$12848, %edx                    ## imm = 0x3230
	callq	_b43legacy_phy_write
LBB0_50:
	movq	%rbx, %rdi
	callq	_b43legacy_phy_init_pctl
	movq	(%rbx), %rax
	movq	(%rax), %rax
	cmpl	$17158, (%rax)                  ## imm = 0x4306
	jne	LBB0_52
## %bb.51:
	cmpl	$2, 4(%rax)
	jne	LBB0_52
## %bb.53:
	movq	%rbx, %rdi
	movl	$1065, %esi                     ## imm = 0x429
	callq	_b43legacy_phy_read
	andl	$49151, %eax                    ## imm = 0xBFFF
	movq	%rbx, %rdi
	movl	$1065, %esi                     ## imm = 0x429
	movl	%eax, %edx
	callq	_b43legacy_phy_write
	movq	%rbx, %rdi
	movl	$1219, %esi                     ## imm = 0x4C3
	callq	_b43legacy_phy_read
	andl	$32767, %eax                    ## imm = 0x7FFF
	movq	%rbx, %rdi
	movl	$1219, %esi                     ## imm = 0x4C3
	movl	%eax, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_b43legacy_phy_write            ## TAILCALL
LBB0_52:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_41:
	movq	%rbx, %rdi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_b43legacy_nrssi_hw_update
	jmp	LBB0_47
LBB0_46:
	xorl	%edi, %edi
	cmpl	$-1000, %eax                    ## imm = 0xFC18
	sete	%dil
	callq	_B43legacy_WARN_ON
LBB0_47:
	movq	%rbx, %rdi
	callq	_b43legacy_calc_nrssi_threshold
	cmpl	$8, 12(%rbx)
	je	LBB0_49
	jmp	LBB0_50
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_BFL_PACTRL,4,2       ## @B43legacy_BFL_PACTRL
	.comm	_B43legacy_BFL_RSSI,4,2         ## @B43legacy_BFL_RSSI
	.no_dead_strip	_b43legacy_phy_initg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43legacy_phy_initg
_b43legacy_phy_initg:                   ; @b43legacy_phy_initg
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	bl	_b43legacy_phy_initb5
	b	LBB0_3
LBB0_2:
	bl	_b43legacy_phy_initb6
LBB0_3:
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.4:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_b43legacy_phy_inita
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.lt	LBB0_10
LBB0_6:
	mov	x0, x19
	mov	w1, #2068
	mov	w2, #0
	bl	_b43legacy_phy_write
	mov	x0, x19
	mov	w1, #2069
	mov	w2, #0
	bl	_b43legacy_phy_write
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #2065
	mov	w2, #0
	bl	_b43legacy_phy_write
	mov	x0, x19
	mov	w1, #21
	mov	w2, #192
	bl	_b43legacy_phy_write
	ldr	w8, [x19, #8]
LBB0_8:
	cmp	w8, #6
	b.lt	LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #2065
	mov	w2, #1024
	bl	_b43legacy_phy_write
	mov	x0, x19
	mov	w1, #21
	mov	w2, #192
	bl	_b43legacy_phy_write
LBB0_10:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_17
; %bb.11:
	mov	x0, x19
	mov	w1, #1024
	bl	_b43legacy_phy_read
	mov	x20, x0
	and	w8, w0, #0xff
	cmp	w8, #3
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x19
	mov	w1, #1218
	mov	w2, #6166
	bl	_b43legacy_phy_write
	mov	x0, x19
	mov	w1, #1219
	mov	w2, #34310
	bl	_b43legacy_phy_write
LBB0_13:
	and	w8, w20, #0xfe
	cmp	w8, #4
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x19
	mov	w1, #1218
	mov	w2, #6166
	bl	_b43legacy_phy_write
	mov	x0, x19
	mov	w1, #1219
	mov	w2, #32774
	bl	_b43legacy_phy_write
	mov	x0, x19
	mov	w1, #1228
	bl	_b43legacy_phy_read
	mov	w2, #7936
	bfxil	w2, w0, #0, #8
	mov	x0, x19
	mov	w1, #1228
	bl	_b43legacy_phy_write
LBB0_15:
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.lt	LBB0_17
; %bb.16:
	mov	x0, x19
	mov	w1, #1150
	mov	w2, #120
	bl	_b43legacy_phy_write
LBB0_17:
	ldr	w8, [x19, #12]
	cmp	w8, #8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x19
	mov	w1, #2049
	bl	_b43legacy_phy_read
	orr	w2, w0, #0x80
	mov	x0, x19
	mov	w1, #2049
	bl	_b43legacy_phy_write
	mov	x0, x19
	mov	w1, #1086
	bl	_b43legacy_phy_read
	orr	w2, w0, #0x4
	mov	x0, x19
	mov	w1, #1086
	bl	_b43legacy_phy_write
LBB0_19:
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.lt	LBB0_22
; %bb.20:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_22
; %bb.21:
	mov	x0, x19
	bl	_b43legacy_calc_loopback_gain
LBB0_22:
	ldr	w8, [x19, #12]
	cmp	w8, #8
	b.eq	LBB0_26
; %bb.23:
	ldr	w2, [x19, #16]
	mov	w8, #65535
	mov	x0, x19
	cmp	w2, w8
	b.ne	LBB0_25
; %bb.24:
	bl	_b43legacy_radio_init2050
	str	w0, [x19, #16]
	b	LBB0_26
LBB0_25:
	mov	w1, #120
	bl	_b43legacy_radio_write16
LBB0_26:
	ldr	w8, [x19, #20]
	mov	w9, #65535
	cmp	w8, w9
	b.ne	LBB0_28
; %bb.27:
	mov	x0, x19
	bl	_b43legacy_phy_lo_g_measure
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_38
	b	LBB0_39
LBB0_28:
	ldr	w9, [x19, #24]
	mov	w10, #8272
	cmp	w9, w10
	b.ne	LBB0_31
; %bb.29:
	ldr	w9, [x19, #12]
	cmp	w9, #8
	b.ne	LBB0_31
; %bb.30:
	ldr	w9, [x19, #28]
	orr	w2, w8, w9, lsl #4
	b	LBB0_32
LBB0_31:
	mov	x0, x19
	mov	w1, #82
	bl	_b43legacy_radio_read16
	and	w8, w0, #0xfff0
	ldr	w9, [x19, #28]
	orr	w2, w8, w9
LBB0_32:
	mov	x0, x19
	mov	w1, #82
	bl	_b43legacy_radio_write16
	ldr	w8, [x19, #8]
	cmp	w8, #6
	b.lt	LBB0_34
; %bb.33:
	mov	x0, x19
	mov	w1, #54
	bl	_b43legacy_phy_read
	mov	x2, x0
	ldr	w8, [x19, #20]
	bfi	w2, w8, #12, #20
	mov	x0, x19
	mov	w1, #54
	bl	_b43legacy_phy_write
LBB0_34:
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _B43legacy_BFL_PACTRL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _B43legacy_BFL_PACTRL@GOTPAGEOFF]
	ldr	w8, [x8, #8]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #32885
	mov	w9, #32895
	csel	w2, w9, w8, eq
	mov	x0, x19
	mov	w1, #46
	bl	_b43legacy_phy_write
	ldr	w8, [x19, #8]
	mov	x0, x19
	mov	w1, #47
	cmp	w8, #1
	b.gt	LBB0_36
; %bb.35:
	mov	w2, #257
	b	LBB0_37
LBB0_36:
	mov	w2, #514
LBB0_37:
	bl	_b43legacy_phy_write
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_39
LBB0_38:
	mov	x0, x19
	mov	w1, #0
	bl	_b43legacy_phy_lo_adjust
	mov	x0, x19
	mov	w1, #2063
	mov	w2, #32888
	bl	_b43legacy_phy_write
LBB0_39:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w8, [x8, #8]
Lloh3:
	adrp	x9, _B43legacy_BFL_RSSI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _B43legacy_BFL_RSSI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_44
; %bb.40:
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_42
; %bb.41:
	ldr	w8, [x19, #8]
	cmp	w8, #2
	b.lt	LBB0_47
LBB0_42:
	ldr	x8, [x19, #32]
	ldp	w9, w8, [x8]
	cmn	w9, #1000
	b.ne	LBB0_45
; %bb.43:
	cmn	w8, #1000
	cset	w0, ne
	bl	_B43legacy_WARN_ON
	mov	x0, x19
	bl	_b43legacy_calc_nrssi_slope
	b	LBB0_47
LBB0_44:
	mov	x0, x19
	mov	w1, #65535
	bl	_b43legacy_nrssi_hw_update
	b	LBB0_46
LBB0_45:
	cmn	w8, #1000
	cset	w0, eq
	bl	_B43legacy_WARN_ON
LBB0_46:
	mov	x0, x19
	bl	_b43legacy_calc_nrssi_threshold
LBB0_47:
	ldr	w8, [x19, #12]
	cmp	w8, #8
	b.ne	LBB0_49
; %bb.48:
	mov	x0, x19
	mov	w1, #2053
	mov	w2, #12848
	bl	_b43legacy_phy_write
LBB0_49:
	mov	x0, x19
	bl	_b43legacy_phy_init_pctl
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w9, [x8]
	mov	w10, #17158
	cmp	w9, w10
	b.ne	LBB0_52
; %bb.50:
	ldr	w8, [x8, #4]
	cmp	w8, #2
	b.ne	LBB0_52
; %bb.51:
	mov	x0, x19
	mov	w1, #1065
	bl	_b43legacy_phy_read
	mov	w8, #49151
	and	w2, w0, w8
	mov	x0, x19
	mov	w1, #1065
	bl	_b43legacy_phy_write
	mov	x0, x19
	mov	w1, #1219
	bl	_b43legacy_phy_read
	and	w2, w0, #0x7fff
	mov	x0, x19
	mov	w1, #1219
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_b43legacy_phy_write
LBB0_52:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_BFL_PACTRL,4,2       ; @B43legacy_BFL_PACTRL
	.comm	_B43legacy_BFL_RSSI,4,2         ; @B43legacy_BFL_RSSI
	.no_dead_strip	_b43legacy_phy_initg
.subsections_via_symbols
