	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlc_phy_radio2057_rccal
_wlc_phy_radio2057_rccal:               ## @wlc_phy_radio2057_rccal
	.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, %r15
	movl	(%rdi), %eax
	cmpl	$6, %eax
	ja	LBB0_3
## %bb.1:
	movl	$88, %ecx
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.2:
	movb	$1, %r12b
	movl	$192, %ebx
	movq	_RADIO_2057_RCCAL_MASTER@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movl	$233, %ebx
	movq	_RADIO_2057v7_RCCAL_MASTER@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_4:
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$97, %edx
	callq	_write_radio_reg
	movq	_RADIO_2057_RCCAL_TRC0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_write_radio_reg
	movq	_RADIO_2057_RCCAL_X1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$110, %edx
	callq	_write_radio_reg
	movq	_RADIO_2057_RCCAL_START_R1_Q1_P1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$85, %edx
	callq	_write_radio_reg
	movq	_MAX_205x_RCAL_WAITLOOPS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.5:
	xorl	%ebx, %ebx
	movq	_RADIO_2057_RCCAL_DONE_OSCCAP@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_read_radio_reg
	testb	$2, %al
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_6
LBB0_8:
	movq	_RADIO_2057_RCCAL_START_R1_Q1_P1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$21, %edx
	callq	_write_radio_reg
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	testb	%r12b, %r12b
	movl	$176, %eax
	movl	$213, %ebx
	cmovnel	%eax, %ebx
	movq	_RADIO_2057v7_RCCAL_MASTER@GOTPCREL(%rip), %r12
	movq	_RADIO_2057_RCCAL_MASTER@GOTPCREL(%rip), %rax
	cmoveq	%r12, %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$105, %edx
	callq	_write_radio_reg
	movq	_RADIO_2057_RCCAL_TRC0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_write_radio_reg
	movq	_RADIO_2057_RCCAL_X1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$110, %edx
	callq	_write_radio_reg
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$85, %edx
	callq	_write_radio_reg
	cmpl	$0, (%r13)
	jle	LBB0_12
## %bb.9:
	xorl	%ebx, %ebx
	movq	_RADIO_2057_RCCAL_DONE_OSCCAP@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_read_radio_reg
	testb	$2, %al
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_10
LBB0_12:
	movq	_RADIO_2057_RCCAL_START_R1_Q1_P1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$21, %edx
	callq	_write_radio_reg
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	movl	$40, %eax
	movl	$110, %r14d
	cmovnel	%eax, %r14d
	movl	$153, %ebx
	movl	$176, %eax
	cmovnel	%eax, %ebx
	cmovneq	_RADIO_2057_RCCAL_MASTER@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$115, %edx
	callq	_write_radio_reg
	movq	_RADIO_2057_RCCAL_X1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_write_radio_reg
	movq	_RADIO_2057_RCCAL_TRC0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_write_radio_reg
	movq	_RADIO_2057_RCCAL_START_R1_Q1_P1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$85, %edx
	callq	_write_radio_reg
	cmpl	$0, (%r13)
	movl	$0, %r12d
	jle	LBB0_16
## %bb.13:
	xorl	%ebx, %ebx
	movq	_RADIO_2057_RCCAL_DONE_OSCCAP@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_read_radio_reg
	movl	%eax, %r12d
	testb	$2, %r12b
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_14
LBB0_16:
	xorl	%edi, %edi
	testb	$2, %r12b
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN
	testq	%rax, %rax
	movl	$0, %eax
	jne	LBB0_18
## %bb.17:
	movq	_RADIO_2057_RCCAL_START_R1_Q1_P1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$21, %edx
	callq	_write_radio_reg
	movl	%r12d, %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADIO_2057_RCCAL_MASTER,4,2    ## @RADIO_2057_RCCAL_MASTER
	.comm	_RADIO_2057_RCCAL_TRC0,4,2      ## @RADIO_2057_RCCAL_TRC0
	.comm	_RADIO_2057v7_RCCAL_MASTER,4,2  ## @RADIO_2057v7_RCCAL_MASTER
	.comm	_RADIO_2057_RCCAL_X1,4,2        ## @RADIO_2057_RCCAL_X1
	.comm	_RADIO_2057_RCCAL_START_R1_Q1_P1,4,2 ## @RADIO_2057_RCCAL_START_R1_Q1_P1
	.comm	_MAX_205x_RCAL_WAITLOOPS,4,2    ## @MAX_205x_RCAL_WAITLOOPS
	.comm	_RADIO_2057_RCCAL_DONE_OSCCAP,4,2 ## @RADIO_2057_RCCAL_DONE_OSCCAP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HW error: radio calib4"

	.no_dead_strip	_wlc_phy_radio2057_rccal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wlc_phy_radio2057_rccal
_wlc_phy_radio2057_rccal:               ; @wlc_phy_radio2057_rccal
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w8, [x0]
	mov	w9, #1
	mov	w10, #192
Lloh0:
	adrp	x26, _RADIO_2057_RCCAL_MASTER@GOTPAGE
Lloh1:
	ldr	x26, [x26, _RADIO_2057_RCCAL_MASTER@GOTPAGEOFF]
	cmp	w8, #6
	lsl	w8, w9, w8
	mov	w11, #88
	and	w8, w8, w11
	ccmp	w8, #0, #4, ls
	mov	w8, #233
Lloh2:
	adrp	x27, _RADIO_2057v7_RCCAL_MASTER@GOTPAGE
Lloh3:
	ldr	x27, [x27, _RADIO_2057v7_RCCAL_MASTER@GOTPAGEOFF]
	csel	x11, x26, x27, ne
	csel	w20, w10, w8, ne
	csel	w21, w9, wzr, ne
	ldr	w1, [x11]
	mov	w2, #97
	bl	_write_radio_reg
Lloh4:
	adrp	x8, _RADIO_2057_RCCAL_TRC0@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RADIO_2057_RCCAL_TRC0@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_write_radio_reg
Lloh7:
	adrp	x28, _RADIO_2057_RCCAL_X1@GOTPAGE
Lloh8:
	ldr	x28, [x28, _RADIO_2057_RCCAL_X1@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	x0, x19
	mov	w2, #110
	bl	_write_radio_reg
Lloh9:
	adrp	x22, _RADIO_2057_RCCAL_START_R1_Q1_P1@GOTPAGE
Lloh10:
	ldr	x22, [x22, _RADIO_2057_RCCAL_START_R1_Q1_P1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #85
	bl	_write_radio_reg
Lloh11:
	adrp	x23, _MAX_205x_RCAL_WAITLOOPS@GOTPAGE
Lloh12:
	ldr	x23, [x23, _MAX_205x_RCAL_WAITLOOPS@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh13:
	adrp	x24, _RADIO_2057_RCCAL_DONE_OSCCAP@GOTPAGE
Lloh14:
	ldr	x24, [x24, _RADIO_2057_RCCAL_DONE_OSCCAP@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_read_radio_reg
	tbnz	w0, #1, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #500
	bl	_udelay
	add	w20, w20, #1
	ldr	w8, [x23]
	cmp	w20, w8
	b.lt	LBB0_2
LBB0_4:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #21
	bl	_write_radio_reg
	mov	w8, #213
	mov	w25, #176
	cmp	w21, #0
	csel	w20, w25, w8, ne
	csel	x8, x26, x27, ne
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #105
	bl	_write_radio_reg
Lloh15:
	adrp	x8, _RADIO_2057_RCCAL_TRC0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RADIO_2057_RCCAL_TRC0@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_write_radio_reg
	ldr	w1, [x28]
	mov	w20, #110
	mov	x0, x19
	mov	w2, #110
	bl	_write_radio_reg
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #85
	bl	_write_radio_reg
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	w26, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_read_radio_reg
	tbnz	w0, #1, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #500
	bl	_udelay
	add	w26, w26, #1
	ldr	w8, [x23]
	cmp	w26, w8
	b.lt	LBB0_6
LBB0_8:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #21
	bl	_write_radio_reg
	mov	w8, #40
	cmp	w21, #0
	csel	w20, w8, w20, ne
	mov	w8, #153
	csel	w21, w25, w8, ne
Lloh18:
	adrp	x8, _RADIO_2057_RCCAL_MASTER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RADIO_2057_RCCAL_MASTER@GOTPAGEOFF]
	csel	x8, x8, x27, ne
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #115
	bl	_write_radio_reg
	ldr	w1, [x28]
	mov	x0, x19
	mov	x2, x20
	bl	_write_radio_reg
Lloh20:
	adrp	x8, _RADIO_2057_RCCAL_TRC0@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RADIO_2057_RCCAL_TRC0@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_write_radio_reg
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #85
	bl	_write_radio_reg
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.9:
	mov	w21, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_read_radio_reg
	mov	x20, x0
	tbnz	w0, #1, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #500
	bl	_udelay
	add	w21, w21, #1
	ldr	w8, [x23]
	cmp	w21, w8
	b.lt	LBB0_10
	b	LBB0_13
LBB0_12:
	mov	w20, #0
LBB0_13:
	mov	w8, #1
	bic	w0, w8, w20, lsr #1
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
	cbz	x0, LBB0_15
; %bb.14:
	mov	w20, #0
	b	LBB0_16
LBB0_15:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #21
	bl	_write_radio_reg
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_RADIO_2057_RCCAL_MASTER,4,2    ; @RADIO_2057_RCCAL_MASTER
	.comm	_RADIO_2057_RCCAL_TRC0,4,2      ; @RADIO_2057_RCCAL_TRC0
	.comm	_RADIO_2057v7_RCCAL_MASTER,4,2  ; @RADIO_2057v7_RCCAL_MASTER
	.comm	_RADIO_2057_RCCAL_X1,4,2        ; @RADIO_2057_RCCAL_X1
	.comm	_RADIO_2057_RCCAL_START_R1_Q1_P1,4,2 ; @RADIO_2057_RCCAL_START_R1_Q1_P1
	.comm	_MAX_205x_RCAL_WAITLOOPS,4,2    ; @MAX_205x_RCAL_WAITLOOPS
	.comm	_RADIO_2057_RCCAL_DONE_OSCCAP,4,2 ; @RADIO_2057_RCCAL_DONE_OSCCAP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HW error: radio calib4"

	.no_dead_strip	_wlc_phy_radio2057_rccal
.subsections_via_symbols
