	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_radio_reg                ## -- Begin function write_radio_reg
	.p2align	4, 0x90
_write_radio_reg:                       ## @write_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
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	32(%rdi), %rax
	movl	(%rax), %edi
	movl	$24, %esi
	callq	_D11REV_GE
	movq	_radioregdata@GOTPCREL(%rip), %r13
	movq	_radioregaddr@GOTPCREL(%rip), %r14
	testq	%rax, %rax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_4
## %bb.1:
	movq	32(%r12), %rax
	movl	(%rax), %edi
	movl	$22, %esi
	callq	_D11REV_IS
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	24(%r12), %rax
	movq	_PHY_TYPE_SSN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_3:
	movq	_phy4wdatalo@GOTPCREL(%rip), %r13
	movq	_phy4waddr@GOTPCREL(%rip), %r14
LBB0_4:
	movq	16(%r12), %rbx
	movl	(%r14), %edi
	callq	_D11REGOFFS
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_bcma_wflush16
	movq	16(%r12), %rbx
	movl	(%r13), %edi
	callq	_D11REGOFFS
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_bcma_write16
	movq	16(%r12), %r14
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_BCMA_HOSTTYPE_PCI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	(%r12), %rax
	incq	%rax
	movq	%rax, (%r12)
	cmpq	8(%r12), %rax
	jl	LBB0_7
## %bb.6:
	movq	_maccontrol@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_D11REGOFFS
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_bcma_read32
	movq	$0, (%r12)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_TYPE_SSN,8,3               ## @PHY_TYPE_SSN
	.comm	_radioregaddr,4,2               ## @radioregaddr
	.comm	_radioregdata,4,2               ## @radioregdata
	.comm	_phy4waddr,4,2                  ## @phy4waddr
	.comm	_phy4wdatalo,4,2                ## @phy4wdatalo
	.comm	_BCMA_HOSTTYPE_PCI,8,3          ## @BCMA_HOSTTYPE_PCI
	.comm	_maccontrol,4,2                 ## @maccontrol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_write_radio_reg                ; -- Begin function write_radio_reg
	.p2align	2
_write_radio_reg:                       ; @write_radio_reg
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	w0, [x8]
	mov	w1, #24
	bl	_D11REV_GE
	cbz	x0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x23, _radioregdata@GOTPAGE
Lloh1:
	ldr	x23, [x23, _radioregdata@GOTPAGEOFF]
Lloh2:
	adrp	x8, _radioregaddr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _radioregaddr@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
	mov	w1, #22
	bl	_D11REV_IS
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19, #24]
Lloh4:
	adrp	x9, _PHY_TYPE_SSN@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PHY_TYPE_SSN@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
LBB0_4:
Lloh7:
	adrp	x23, _phy4wdatalo@GOTPAGE
Lloh8:
	ldr	x23, [x23, _phy4wdatalo@GOTPAGEOFF]
Lloh9:
	adrp	x8, _phy4waddr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _phy4waddr@GOTPAGEOFF]
LBB0_5:
	ldr	x22, [x19, #16]
	ldr	w0, [x8]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x22
	mov	x2, x21
	bl	_bcma_wflush16
	ldr	x21, [x19, #16]
	ldr	w0, [x23]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_bcma_write16
	ldr	x20, [x19, #16]
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _BCMA_HOSTTYPE_PCI@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BCMA_HOSTTYPE_PCI@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	ldp	x8, x9, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	cmp	x8, x9
	b.lt	LBB0_8
; %bb.7:
Lloh14:
	adrp	x8, _maccontrol@GOTPAGE
Lloh15:
	ldr	x8, [x8, _maccontrol@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x20
	bl	_bcma_read32
	str	xzr, [x19]
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_TYPE_SSN,8,3               ; @PHY_TYPE_SSN
	.comm	_radioregaddr,4,2               ; @radioregaddr
	.comm	_radioregdata,4,2               ; @radioregdata
	.comm	_phy4waddr,4,2                  ; @phy4waddr
	.comm	_phy4wdatalo,4,2                ; @phy4wdatalo
	.comm	_BCMA_HOSTTYPE_PCI,8,3          ; @BCMA_HOSTTYPE_PCI
	.comm	_maccontrol,4,2                 ; @maccontrol
.subsections_via_symbols
