	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_phy_versioning
_b43legacy_phy_versioning:              ## @b43legacy_phy_versioning
	.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	%rdi, %r14
	movq	_B43legacy_MMIO_PHY_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_b43legacy_read16
	movl	%eax, %r12d
	movq	_B43legacy_PHYVER_ANALOG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	%r12d, %r15d
	movq	_B43legacy_PHYVER_ANALOG_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r15d
	movq	_B43legacy_PHYVER_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r12d, %ebx
	movq	_B43legacy_PHYVER_TYPE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_B43legacy_PHYVER_VERSION@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	cmpl	$128, %ebx
	je	LBB0_6
## %bb.1:
	cmpl	$129, %ebx
	jne	LBB0_7
## %bb.2:
	cmpl	$7, %r12d
	ja	LBB0_7
## %bb.3:
	movl	$212, %eax
	btl	%r12d, %eax
	jae	LBB0_7
LBB0_4:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	callq	_b43legacydbg
	movq	8(%r14), %rax
	movq	(%rax), %rax
	cmpl	$17175, (%rax)                  ## imm = 0x4317
	jne	LBB0_8
## %bb.5:
	movl	4(%rax), %eax
	xorl	%ecx, %ecx
	cmpl	$1, %eax
	setne	%cl
	shll	$28, %ecx
	orl	$1107624319, %ecx               ## imm = 0x4205017F
	testl	%eax, %eax
	movl	$839188863, %eax                ## imm = 0x3205017F
	cmovnel	%ecx, %eax
	jmp	LBB0_9
LBB0_6:
	cmpl	$9, %r12d
	jl	LBB0_4
LBB0_7:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	jmp	LBB0_14
LBB0_8:
	movq	_B43legacy_MMIO_RADIO_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_B43legacy_RADIOCTL_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_b43legacy_write16
	movq	_B43legacy_MMIO_RADIO_DATA_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_b43legacy_read16
	movl	%eax, %r13d
	shll	$16, %r13d
	movq	_B43legacy_MMIO_RADIO_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_B43legacy_RADIOCTL_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_b43legacy_write16
	movq	_B43legacy_MMIO_RADIO_DATA_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_b43legacy_read16
	orl	%r13d, %eax
LBB0_9:
	movl	%eax, %r13d
	andl	$4095, %r13d                    ## imm = 0xFFF
	movl	%eax, %ecx
	shrl	$12, %ecx
	movzwl	%cx, %ecx
	movl	%eax, %r8d
	shrl	$28, %r8d
	cmpl	$128, %ebx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_12
## %bb.10:
	cmpl	$129, %ebx
	jne	LBB0_15
## %bb.11:
	andl	$268369920, %eax                ## imm = 0xFFF0000
	cmpl	$33882112, %eax                 ## imm = 0x2050000
	jne	LBB0_13
	jmp	LBB0_16
LBB0_12:
	cmpl	$8272, %ecx                     ## imm = 0x2050
	je	LBB0_16
LBB0_13:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edx
LBB0_14:
	callq	_b43legacyerr
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_15:
	movl	$1, %edi
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movl	%r8d, %r13d
	callq	_B43legacy_BUG_ON
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	movl	-48(%rbp), %r13d                ## 4-byte Reload
LBB0_16:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r13d, %edx
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	callq	_b43legacydbg
	movl	%r13d, 16(%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 20(%r14)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 24(%r14)
	movl	%r15d, 28(%r14)
	movl	%ebx, 32(%r14)
	movl	%r12d, 36(%r14)
	xorl	%eax, %eax
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_MMIO_PHY_VER,4,2     ## @B43legacy_MMIO_PHY_VER
	.comm	_B43legacy_PHYVER_ANALOG,4,2    ## @B43legacy_PHYVER_ANALOG
	.comm	_B43legacy_PHYVER_ANALOG_SHIFT,4,2 ## @B43legacy_PHYVER_ANALOG_SHIFT
	.comm	_B43legacy_PHYVER_TYPE,4,2      ## @B43legacy_PHYVER_TYPE
	.comm	_B43legacy_PHYVER_TYPE_SHIFT,4,2 ## @B43legacy_PHYVER_TYPE_SHIFT
	.comm	_B43legacy_PHYVER_VERSION,4,2   ## @B43legacy_PHYVER_VERSION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FOUND UNSUPPORTED PHY (Analog %u, Type %u, Revision %u)\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
L_.str.1:                               ## @.str.1
	.asciz	"Found PHY: Analog %u, Type %u, Revision %u\n"

	.comm	_B43legacy_MMIO_RADIO_CONTROL,4,2 ## @B43legacy_MMIO_RADIO_CONTROL
	.comm	_B43legacy_RADIOCTL_ID,4,2      ## @B43legacy_RADIOCTL_ID
	.comm	_B43legacy_MMIO_RADIO_DATA_HIGH,4,2 ## @B43legacy_MMIO_RADIO_DATA_HIGH
	.comm	_B43legacy_MMIO_RADIO_DATA_LOW,4,2 ## @B43legacy_MMIO_RADIO_DATA_LOW
L_.str.2:                               ## @.str.2
	.asciz	"FOUND UNSUPPORTED RADIO (Manuf 0x%X, Version 0x%X, Revision %u)\n"

L_.str.3:                               ## @.str.3
	.asciz	"Found Radio: Manuf 0x%X, Version 0x%X, Revision %u\n"

	.no_dead_strip	_b43legacy_phy_versioning
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43legacy_phy_versioning
_b43legacy_phy_versioning:              ; @b43legacy_phy_versioning
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _B43legacy_MMIO_PHY_VER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B43legacy_MMIO_PHY_VER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_b43legacy_read16
Lloh3:
	adrp	x8, _B43legacy_PHYVER_ANALOG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B43legacy_PHYVER_ANALOG@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _B43legacy_PHYVER_ANALOG_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _B43legacy_PHYVER_ANALOG_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _B43legacy_PHYVER_TYPE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _B43legacy_PHYVER_TYPE@GOTPAGEOFF]
	asr	w20, w8, w9
Lloh11:
	ldr	w8, [x10]
	and	w8, w8, w0
Lloh12:
	adrp	x9, _B43legacy_PHYVER_TYPE_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _B43legacy_PHYVER_TYPE_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	asr	w21, w8, w9
Lloh15:
	adrp	x8, _B43legacy_PHYVER_VERSION@GOTPAGE
Lloh16:
	ldr	x8, [x8, _B43legacy_PHYVER_VERSION@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	and	w22, w8, w0
	cmp	w21, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #129
	ccmp	w22, #7, #2, eq
	mov	w8, #1
	lsl	w8, w8, w22
	mov	w9, #212
	and	w8, w8, w9
	ccmp	w8, #0, #4, ls
	b.ne	LBB0_4
LBB0_2:
	ldr	w0, [x19]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	mov	x4, x22
	b	LBB0_12
LBB0_3:
	cmp	w22, #9
	b.ge	LBB0_2
LBB0_4:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	mov	x4, x22
	bl	_b43legacydbg
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w9, [x8]
	mov	w10, #17175
	cmp	w9, w10
	b.ne	LBB0_6
; %bb.5:
	ldr	w8, [x8, #4]
	mov	w9, #383
	movk	w9, #20997, lsl #16
	mov	w10, #383
	movk	w10, #16901, lsl #16
	cmp	w8, #1
	csel	w9, w10, w9, eq
	mov	w10, #383
	movk	w10, #12805, lsl #16
	cmp	w8, #0
	csel	w8, w10, w9, eq
	b	LBB0_7
LBB0_6:
Lloh22:
	adrp	x24, _B43legacy_MMIO_RADIO_CONTROL@GOTPAGE
Lloh23:
	ldr	x24, [x24, _B43legacy_MMIO_RADIO_CONTROL@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh24:
	adrp	x25, _B43legacy_RADIOCTL_ID@GOTPAGE
Lloh25:
	ldr	x25, [x25, _B43legacy_RADIOCTL_ID@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_b43legacy_write16
Lloh26:
	adrp	x8, _B43legacy_MMIO_RADIO_DATA_HIGH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _B43legacy_MMIO_RADIO_DATA_HIGH@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43legacy_read16
	mov	x23, x0
	ldr	w1, [x24]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_b43legacy_write16
Lloh29:
	adrp	x8, _B43legacy_MMIO_RADIO_DATA_LOW@GOTPAGE
Lloh30:
	ldr	x8, [x8, _B43legacy_MMIO_RADIO_DATA_LOW@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43legacy_read16
	orr	w8, w0, w23, lsl #16
LBB0_7:
	and	w23, w8, #0xfff
	ubfx	w24, w8, #12, #16
	lsr	w25, w8, #28
	cmp	w21, #128
	b.eq	LBB0_10
; %bb.8:
	cmp	w21, #129
	b.ne	LBB0_13
; %bb.9:
	and	w8, w8, #0xfff0000
	mov	w9, #33882112
	cmp	w8, w9
	b.ne	LBB0_11
	b	LBB0_14
LBB0_10:
	mov	w8, #8272
	cmp	w24, w8
	b.eq	LBB0_14
LBB0_11:
	ldr	w0, [x19]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	mov	x3, x24
	mov	x4, x25
LBB0_12:
	bl	_b43legacyerr
Lloh34:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_13:
	mov	w0, #1
	bl	_B43legacy_BUG_ON
LBB0_14:
	ldr	w0, [x19]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x23
	mov	x3, x24
	mov	x4, x25
	bl	_b43legacydbg
	mov	w0, #0
	stp	w23, w24, [x19, #16]
	stp	w25, w20, [x19, #24]
	stp	w21, w22, [x19, #32]
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_MMIO_PHY_VER,4,2     ; @B43legacy_MMIO_PHY_VER
	.comm	_B43legacy_PHYVER_ANALOG,4,2    ; @B43legacy_PHYVER_ANALOG
	.comm	_B43legacy_PHYVER_ANALOG_SHIFT,4,2 ; @B43legacy_PHYVER_ANALOG_SHIFT
	.comm	_B43legacy_PHYVER_TYPE,4,2      ; @B43legacy_PHYVER_TYPE
	.comm	_B43legacy_PHYVER_TYPE_SHIFT,4,2 ; @B43legacy_PHYVER_TYPE_SHIFT
	.comm	_B43legacy_PHYVER_VERSION,4,2   ; @B43legacy_PHYVER_VERSION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FOUND UNSUPPORTED PHY (Analog %u, Type %u, Revision %u)\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
l_.str.1:                               ; @.str.1
	.asciz	"Found PHY: Analog %u, Type %u, Revision %u\n"

	.comm	_B43legacy_MMIO_RADIO_CONTROL,4,2 ; @B43legacy_MMIO_RADIO_CONTROL
	.comm	_B43legacy_RADIOCTL_ID,4,2      ; @B43legacy_RADIOCTL_ID
	.comm	_B43legacy_MMIO_RADIO_DATA_HIGH,4,2 ; @B43legacy_MMIO_RADIO_DATA_HIGH
	.comm	_B43legacy_MMIO_RADIO_DATA_LOW,4,2 ; @B43legacy_MMIO_RADIO_DATA_LOW
l_.str.2:                               ; @.str.2
	.asciz	"FOUND UNSUPPORTED RADIO (Manuf 0x%X, Version 0x%X, Revision %u)\n"

l_.str.3:                               ; @.str.3
	.asciz	"Found Radio: Manuf 0x%X, Version 0x%X, Revision %u\n"

	.no_dead_strip	_b43legacy_phy_versioning
.subsections_via_symbols
