	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_init_bbp_53xx
_rt2800_init_bbp_53xx:                  ## @rt2800_init_bbp_53xx
	.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, %r12
	callq	_rt2800_bbp4_mac_if_ctrl
	movq	%r12, %rdi
	movl	$31, %esi
	movl	$8, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$65, %esi
	movl	$44, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$66, %esi
	movl	$56, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$68, %esi
	movl	$11, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$69, %esi
	movl	$18, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$73, %esi
	movl	$19, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$75, %esi
	movl	$70, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$76, %esi
	movl	$40, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$77, %esi
	movl	$89, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$70, %esi
	movl	$10, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$79, %esi
	movl	$19, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$80, %esi
	movl	$5, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$81, %esi
	movl	$51, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$82, %esi
	movl	$98, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$83, %esi
	movl	$122, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$84, %esi
	movl	$154, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$86, %esi
	movl	$56, %edx
	callq	_rt2800_bbp_write
	movq	_RT5392@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	$88, %esi
	movl	$144, %edx
	callq	_rt2800_bbp_write
LBB0_2:
	movq	%r12, %rdi
	movl	$91, %esi
	movl	$4, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$92, %esi
	movl	$2, %edx
	callq	_rt2800_bbp_write
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movl	$95, %esi
	movl	$154, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$98, %esi
	movl	$18, %edx
	callq	_rt2800_bbp_write
LBB0_4:
	movq	%r12, %rdi
	movl	$103, %esi
	movl	$192, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$104, %esi
	movl	$146, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$105, %esi
	movl	$60, %edx
	callq	_rt2800_bbp_write
	movq	_RT5390@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	movl	$106, %esi
	movl	$3, %edx
	callq	_rt2800_bbp_write
	jmp	LBB0_9
LBB0_6:
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	movl	$106, %esi
	movl	$18, %edx
	callq	_rt2800_bbp_write
	jmp	LBB0_9
LBB0_8:
	movl	$1, %edi
	callq	_WARN_ON
LBB0_9:
	movq	%r12, %rdi
	movl	$128, %esi
	movl	$18, %edx
	callq	_rt2800_bbp_write
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rt2x00_rt
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	movl	$134, %esi
	movl	$208, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$135, %esi
	movl	$246, %edx
	callq	_rt2800_bbp_write
LBB0_11:
	movq	%r12, %rdi
	callq	_rt2800_disable_unused_dac_adc
	movq	_EEPROM_NIC_CONF1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2800_eeprom_read
	movq	_EEPROM_NIC_CONF1_ANT_DIVERSITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_rt2x00_get_field16
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_rt2x00_has_cap_bt_coexist
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_GPIO_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_rt2800_register_read
	movl	%eax, -44(%rbp)
	movq	_GPIO_CTRL_DIR3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r15
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_GPIO_CTRL_DIR6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_GPIO_CTRL_VAL3@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_GPIO_CTRL_VAL6@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	cmpl	$3, %r14d
	cmoveq	%rbx, %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	movq	_RT5390@GOTPCREL(%rip), %rbx
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_GPIO_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_rt2800_register_write
LBB0_13:
	movl	(%rbx), %esi
	movq	_REV_RT5390R@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_rt2x00_rt_rev_gte
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:
	movl	(%rbx), %esi
	movq	_REV_RT5370G@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_rt2x00_rt_rev_gte
	testq	%rax, %rax
	je	LBB0_16
LBB0_15:
	movq	%r12, %rdi
	movl	$150, %esi
	xorl	%edx, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$151, %esi
	xorl	%edx, %edx
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	movl	$154, %esi
	xorl	%edx, %edx
	callq	_rt2800_bbp_write
LBB0_16:
	xorl	%ebx, %ebx
	cmpl	$3, %r14d
	setne	%bl
	movq	%r12, %rdi
	movl	$152, %esi
	callq	_rt2800_bbp_read
	movl	%eax, -48(%rbp)
	movq	_BBP152_RX_DEFAULT_ANT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdi
	movl	%ebx, %edx
	callq	_rt2x00_set_field8
	movl	-48(%rbp), %edx
	movq	%r12, %rdi
	movl	$152, %esi
	callq	_rt2800_bbp_write
	movq	%r12, %rdi
	callq	_rt2800_init_freq_calibration
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RT5392,4,2                     ## @RT5392
	.comm	_RT5390,4,2                     ## @RT5390
	.comm	_EEPROM_NIC_CONF1,4,2           ## @EEPROM_NIC_CONF1
	.comm	_EEPROM_NIC_CONF1_ANT_DIVERSITY,4,2 ## @EEPROM_NIC_CONF1_ANT_DIVERSITY
	.comm	_GPIO_CTRL,4,2                  ## @GPIO_CTRL
	.comm	_GPIO_CTRL_DIR3,4,2             ## @GPIO_CTRL_DIR3
	.comm	_GPIO_CTRL_DIR6,4,2             ## @GPIO_CTRL_DIR6
	.comm	_GPIO_CTRL_VAL3,4,2             ## @GPIO_CTRL_VAL3
	.comm	_GPIO_CTRL_VAL6,4,2             ## @GPIO_CTRL_VAL6
	.comm	_REV_RT5390R,4,2                ## @REV_RT5390R
	.comm	_REV_RT5370G,4,2                ## @REV_RT5370G
	.comm	_BBP152_RX_DEFAULT_ANT,4,2      ## @BBP152_RX_DEFAULT_ANT
	.no_dead_strip	_rt2800_init_bbp_53xx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_init_bbp_53xx
_rt2800_init_bbp_53xx:                  ; @rt2800_init_bbp_53xx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	bl	_rt2800_bbp4_mac_if_ctrl
	mov	x0, x19
	mov	w1, #31
	mov	w2, #8
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #65
	mov	w2, #44
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #66
	mov	w2, #56
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #68
	mov	w2, #11
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #69
	mov	w2, #18
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #73
	mov	w2, #19
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #75
	mov	w2, #70
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #76
	mov	w2, #40
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #77
	mov	w2, #89
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #70
	mov	w2, #10
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #79
	mov	w2, #19
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #80
	mov	w2, #5
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #81
	mov	w2, #51
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #82
	mov	w2, #98
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #83
	mov	w2, #122
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #84
	mov	w2, #154
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #86
	mov	w2, #56
	bl	_rt2800_bbp_write
Lloh0:
	adrp	x20, _RT5392@GOTPAGE
Lloh1:
	ldr	x20, [x20, _RT5392@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #88
	mov	w2, #144
	bl	_rt2800_bbp_write
LBB0_2:
	mov	x0, x19
	mov	w1, #91
	mov	w2, #4
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #92
	mov	w2, #2
	bl	_rt2800_bbp_write
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #95
	mov	w2, #154
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #98
	mov	w2, #18
	bl	_rt2800_bbp_write
LBB0_4:
	mov	x0, x19
	mov	w1, #103
	mov	w2, #192
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #104
	mov	w2, #146
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #105
	mov	w2, #60
	bl	_rt2800_bbp_write
Lloh2:
	adrp	x21, _RT5390@GOTPAGE
Lloh3:
	ldr	x21, [x21, _RT5390@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #106
	mov	w2, #3
	bl	_rt2800_bbp_write
	b	LBB0_9
LBB0_6:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #106
	mov	w2, #18
	bl	_rt2800_bbp_write
	b	LBB0_9
LBB0_8:
	mov	w0, #1
	bl	_WARN_ON
LBB0_9:
	mov	x0, x19
	mov	w1, #128
	mov	w2, #18
	bl	_rt2800_bbp_write
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rt2x00_rt
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	w1, #134
	mov	w2, #208
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #135
	mov	w2, #246
	bl	_rt2800_bbp_write
LBB0_11:
	mov	x0, x19
	bl	_rt2800_disable_unused_dac_adc
Lloh4:
	adrp	x8, _EEPROM_NIC_CONF1@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EEPROM_NIC_CONF1@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2800_eeprom_read
Lloh7:
	adrp	x8, _EEPROM_NIC_CONF1_ANT_DIVERSITY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EEPROM_NIC_CONF1_ANT_DIVERSITY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_rt2x00_get_field16
	mov	x20, x0
	mov	x0, x19
	bl	_rt2x00_has_cap_bt_coexist
	cbz	x0, LBB0_13
; %bb.12:
Lloh10:
	adrp	x22, _GPIO_CTRL@GOTPAGE
Lloh11:
	ldr	x22, [x22, _GPIO_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2800_register_read
	str	w0, [sp, #8]
Lloh12:
	adrp	x8, _GPIO_CTRL_DIR3@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GPIO_CTRL_DIR3@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh15:
	adrp	x8, _GPIO_CTRL_DIR6@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GPIO_CTRL_DIR6@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh18:
	adrp	x23, _GPIO_CTRL_VAL3@GOTPAGE
Lloh19:
	ldr	x23, [x23, _GPIO_CTRL_VAL3@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x0, sp, #8
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh20:
	adrp	x24, _GPIO_CTRL_VAL6@GOTPAGE
Lloh21:
	ldr	x24, [x24, _GPIO_CTRL_VAL6@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x0, sp, #8
	mov	w2, #0
	bl	_rt2x00_set_field32
	cmp	w20, #3
	csel	x8, x24, x23, eq
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_rt2800_register_write
LBB0_13:
	ldr	w1, [x21]
Lloh22:
	adrp	x8, _REV_RT5390R@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REV_RT5390R@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rt2x00_rt_rev_gte
	cbnz	x0, LBB0_15
; %bb.14:
	ldr	w1, [x21]
Lloh25:
	adrp	x8, _REV_RT5370G@GOTPAGE
Lloh26:
	ldr	x8, [x8, _REV_RT5370G@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rt2x00_rt_rev_gte
	cbz	x0, LBB0_16
LBB0_15:
	mov	x0, x19
	mov	w1, #150
	mov	w2, #0
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #151
	mov	w2, #0
	bl	_rt2800_bbp_write
	mov	x0, x19
	mov	w1, #154
	mov	w2, #0
	bl	_rt2800_bbp_write
LBB0_16:
	cmp	w20, #3
	cset	w20, ne
	mov	x0, x19
	mov	w1, #152
	bl	_rt2800_bbp_read
	str	w0, [sp, #12]
Lloh28:
	adrp	x8, _BBP152_RX_DEFAULT_ANT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BBP152_RX_DEFAULT_ANT@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x20
	bl	_rt2x00_set_field8
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #152
	bl	_rt2800_bbp_write
	mov	x0, x19
	bl	_rt2800_init_freq_calibration
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_RT5392,4,2                     ; @RT5392
	.comm	_RT5390,4,2                     ; @RT5390
	.comm	_EEPROM_NIC_CONF1,4,2           ; @EEPROM_NIC_CONF1
	.comm	_EEPROM_NIC_CONF1_ANT_DIVERSITY,4,2 ; @EEPROM_NIC_CONF1_ANT_DIVERSITY
	.comm	_GPIO_CTRL,4,2                  ; @GPIO_CTRL
	.comm	_GPIO_CTRL_DIR3,4,2             ; @GPIO_CTRL_DIR3
	.comm	_GPIO_CTRL_DIR6,4,2             ; @GPIO_CTRL_DIR6
	.comm	_GPIO_CTRL_VAL3,4,2             ; @GPIO_CTRL_VAL3
	.comm	_GPIO_CTRL_VAL6,4,2             ; @GPIO_CTRL_VAL6
	.comm	_REV_RT5390R,4,2                ; @REV_RT5390R
	.comm	_REV_RT5370G,4,2                ; @REV_RT5370G
	.comm	_BBP152_RX_DEFAULT_ANT,4,2      ; @BBP152_RX_DEFAULT_ANT
	.no_dead_strip	_rt2800_init_bbp_53xx
.subsections_via_symbols
