	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_radio_reg                 ## -- Begin function read_radio_reg
	.p2align	4, 0x90
_read_radio_reg:                        ## @read_radio_reg
	.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	_RADIO_IDCODE@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_1
## %bb.15:
	movl	$65535, %eax                    ## imm = 0xFFFF
	jmp	LBB0_16
LBB0_1:
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	12(%rdi), %eax
	cmpl	$129, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_10
## %bb.3:
	movq	_PHYTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$128, %esi
	callq	_CONF_HAS
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movl	16(%r15), %edi
	movl	$7, %esi
	callq	_NREV_GE
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	_RADIO_2057_READ_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_PHYTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$129, %esi
	callq	_CONF_HAS
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movq	_RADIO_2064_READ_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	_RADIO_2055_READ_OFF@GOTPCREL(%rip), %rax
LBB0_9:
	orq	(%rax), %r14
LBB0_10:
	movq	24(%r15), %rax
	movl	(%rax), %edi
	movl	$24, %esi
	callq	_D11REV_GE
	movq	_radioregdata@GOTPCREL(%rip), %r12
	movq	_radioregaddr@GOTPCREL(%rip), %r13
	testq	%rax, %rax
	jne	LBB0_14
## %bb.11:
	movq	24(%r15), %rax
	movl	(%rax), %edi
	movl	$22, %esi
	callq	_D11REV_IS
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	12(%r15), %eax
	movq	_PHY_TYPE_SSN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
LBB0_13:
	movq	_phy4wdatalo@GOTPCREL(%rip), %r12
	movq	_phy4waddr@GOTPCREL(%rip), %r13
LBB0_14:
	movl	8(%r15), %ebx
	movl	(%r13), %edi
	callq	_D11REGOFFS
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_bcma_wflush16
	movl	8(%r15), %ebx
	movl	(%r12), %edi
	callq	_D11REGOFFS
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_bcma_read16
	movq	$0, (%r15)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADIO_IDCODE,8,3               ## @RADIO_IDCODE
	.comm	_PHYTYPE,4,2                    ## @PHYTYPE
	.comm	_RADIO_2057_READ_OFF,8,3        ## @RADIO_2057_READ_OFF
	.comm	_RADIO_2055_READ_OFF,8,3        ## @RADIO_2055_READ_OFF
	.comm	_RADIO_2064_READ_OFF,8,3        ## @RADIO_2064_READ_OFF
	.comm	_PHY_TYPE_SSN,4,2               ## @PHY_TYPE_SSN
	.comm	_radioregaddr,4,2               ## @radioregaddr
	.comm	_radioregdata,4,2               ## @radioregdata
	.comm	_phy4waddr,4,2                  ## @phy4waddr
	.comm	_phy4wdatalo,4,2                ## @phy4wdatalo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_radio_reg                 ; -- Begin function read_radio_reg
	.p2align	2
_read_radio_reg:                        ; @read_radio_reg
	.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
Lloh0:
	adrp	x8, _RADIO_IDCODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADIO_IDCODE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #65535
	b	LBB0_17
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0, #12]
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #128
	b.ne	LBB0_11
; %bb.4:
Lloh3:
	adrp	x8, _PHYTYPE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHYTYPE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #128
	bl	_CONF_HAS
	cbz	w0, LBB0_11
; %bb.5:
	ldr	w0, [x19, #16]
	mov	w1, #7
	bl	_NREV_GE
	cbz	w0, LBB0_9
; %bb.6:
Lloh6:
	adrp	x8, _RADIO_2057_READ_OFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RADIO_2057_READ_OFF@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x8, _PHYTYPE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PHYTYPE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #129
	bl	_CONF_HAS
	cbz	w0, LBB0_11
; %bb.8:
Lloh11:
	adrp	x8, _RADIO_2064_READ_OFF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RADIO_2064_READ_OFF@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x8, _RADIO_2055_READ_OFF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RADIO_2055_READ_OFF@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	orr	x20, x8, x20
LBB0_11:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	mov	w1, #24
	bl	_D11REV_GE
	cbz	x0, LBB0_13
LBB0_12:
Lloh15:
	adrp	x22, _radioregdata@GOTPAGE
Lloh16:
	ldr	x22, [x22, _radioregdata@GOTPAGEOFF]
Lloh17:
	adrp	x8, _radioregaddr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _radioregaddr@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	mov	w1, #22
	bl	_D11REV_IS
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w8, [x19, #12]
Lloh19:
	adrp	x9, _PHY_TYPE_SSN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PHY_TYPE_SSN@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
LBB0_15:
Lloh22:
	adrp	x22, _phy4wdatalo@GOTPAGE
Lloh23:
	ldr	x22, [x22, _phy4wdatalo@GOTPAGEOFF]
Lloh24:
	adrp	x8, _phy4waddr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _phy4waddr@GOTPAGEOFF]
LBB0_16:
	ldr	w21, [x19, #8]
	ldr	w0, [x8]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_bcma_wflush16
	ldr	w20, [x19, #8]
	ldr	w0, [x22]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x20
	bl	_bcma_read16
	str	xzr, [x19]
LBB0_17:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_RADIO_IDCODE,8,3               ; @RADIO_IDCODE
	.comm	_PHYTYPE,4,2                    ; @PHYTYPE
	.comm	_RADIO_2057_READ_OFF,8,3        ; @RADIO_2057_READ_OFF
	.comm	_RADIO_2055_READ_OFF,8,3        ; @RADIO_2055_READ_OFF
	.comm	_RADIO_2064_READ_OFF,8,3        ; @RADIO_2064_READ_OFF
	.comm	_PHY_TYPE_SSN,4,2               ; @PHY_TYPE_SSN
	.comm	_radioregaddr,4,2               ; @radioregaddr
	.comm	_radioregdata,4,2               ; @radioregdata
	.comm	_phy4waddr,4,2                  ; @phy4waddr
	.comm	_phy4wdatalo,4,2                ; @phy4wdatalo
.subsections_via_symbols
