	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt61pci_probe_hw_mode
_rt61pci_probe_hw_mode:                 ## @rt61pci_probe_hw_mode
	.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, %rbx
	movq	_WIPHY_FLAG_PS_ON_BY_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	(%rdi), %rdi
	movq	16(%rdi), %rcx
	andl	%eax, (%rcx)
	movq	_PS_NULLFUNC_STACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ieee80211_hw_set
	movq	(%rbx), %rdi
	movq	_SUPPORTS_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ieee80211_hw_set
	movq	(%rbx), %rdi
	movq	_HOST_BROADCAST_PS_BUFFERING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ieee80211_hw_set
	movq	(%rbx), %rdi
	movq	_SIGNAL_DBM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ieee80211_hw_set
	movq	(%rbx), %rdi
	movl	8(%rbx), %esi
	callq	_SET_IEEE80211_DEV
	movq	(%rbx), %r14
	movq	_EEPROM_MAC_ADDR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00_eeprom_addr
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_SET_IEEE80211_PERM_ADDR
	movq	(%rbx), %rax
	movabsq	$30064771073, %rcx              ## imm = 0x700000001
	movq	%rcx, (%rax)
	movl	$1, 8(%rax)
	movq	_SUPPORT_BAND_2GHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_SUPPORT_RATE_CCK@GOTPCREL(%rip), %rax
	movq	_SUPPORT_RATE_OFDM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movq	%rbx, %rdi
	callq	_rt2x00_has_cap_rf_sequence
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movq	_rf_vals_noseq@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_rf_vals_seq@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	$14, 20(%rbx)
	movl	%eax, 36(%rbx)
	movq	_RF5225@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00_rf
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movq	_RF5325@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00_rf
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	movq	_SUPPORT_BAND_5GHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 32(%rbx)
	movq	_rf_vals_seq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	movl	%eax, %edi
	movl	%eax, 20(%rbx)
LBB0_7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$16, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r12
	movq	%rax, 24(%rbx)
	movq	_EEPROM_TXPOWER_G_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rt2x00_eeprom_addr
	movq	%rax, %r15
	leaq	8(%r12), %rbx
	xorl	%r14d, %r14d
	movq	_MAX_TXPOWER@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	%rax, (%rbx)
	movsbl	(%r15,%r14), %edi
	callq	_TXPOWER_FROM_DEV
	movq	%rax, -8(%rbx)
	incq	%r14
	addq	$16, %rbx
	cmpq	$14, %r14
	jne	LBB0_10
## %bb.11:
	xorl	%eax, %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	cmpl	$15, 20(%r15)
	jl	LBB0_16
## %bb.12:
	movq	_EEPROM_TXPOWER_A_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00_eeprom_addr
	cmpl	$15, 20(%r15)
	jb	LBB0_15
## %bb.13:
	movq	%rax, %r14
	addq	$232, %r12
	movl	$14, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	%rax, (%r12)
	movsbl	-14(%r14,%rbx), %edi
	callq	_TXPOWER_FROM_DEV
	movq	%rax, -8(%r12)
	incq	%rbx
	movl	20(%r15), %eax
	addq	$16, %r12
	cmpq	%rax, %rbx
	jb	LBB0_14
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	20(%rbx), %edi
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_WIPHY_FLAG_PS_ON_BY_DEFAULT,4,2 ## @WIPHY_FLAG_PS_ON_BY_DEFAULT
	.comm	_PS_NULLFUNC_STACK,4,2          ## @PS_NULLFUNC_STACK
	.comm	_SUPPORTS_PS,4,2                ## @SUPPORTS_PS
	.comm	_HOST_BROADCAST_PS_BUFFERING,4,2 ## @HOST_BROADCAST_PS_BUFFERING
	.comm	_SIGNAL_DBM,4,2                 ## @SIGNAL_DBM
	.comm	_EEPROM_MAC_ADDR_0,4,2          ## @EEPROM_MAC_ADDR_0
	.comm	_SUPPORT_BAND_2GHZ,4,2          ## @SUPPORT_BAND_2GHZ
	.comm	_SUPPORT_RATE_CCK,4,2           ## @SUPPORT_RATE_CCK
	.comm	_SUPPORT_RATE_OFDM,4,2          ## @SUPPORT_RATE_OFDM
	.comm	_rf_vals_noseq,4,2              ## @rf_vals_noseq
	.comm	_rf_vals_seq,4,2                ## @rf_vals_seq
	.comm	_RF5225,4,2                     ## @RF5225
	.comm	_RF5325,4,2                     ## @RF5325
	.comm	_SUPPORT_BAND_5GHZ,4,2          ## @SUPPORT_BAND_5GHZ
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EEPROM_TXPOWER_G_START,4,2     ## @EEPROM_TXPOWER_G_START
	.comm	_MAX_TXPOWER,8,3                ## @MAX_TXPOWER
	.comm	_EEPROM_TXPOWER_A_START,4,2     ## @EEPROM_TXPOWER_A_START
	.no_dead_strip	_rt61pci_probe_hw_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function rt61pci_probe_hw_mode
lCPI0_0:
	.long	1                               ; 0x1
	.long	7                               ; 0x7
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_rt61pci_probe_hw_mode:                 ; @rt61pci_probe_hw_mode
	.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	x19, x0
Lloh0:
	adrp	x8, _WIPHY_FLAG_PS_ON_BY_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WIPHY_FLAG_PS_ON_BY_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x0, [x0]
	ldr	x9, [x0, #16]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
Lloh3:
	adrp	x8, _PS_NULLFUNC_STACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PS_NULLFUNC_STACK@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ieee80211_hw_set
	ldr	x0, [x19]
Lloh6:
	adrp	x8, _SUPPORTS_PS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SUPPORTS_PS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_ieee80211_hw_set
	ldr	x0, [x19]
Lloh9:
	adrp	x8, _HOST_BROADCAST_PS_BUFFERING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HOST_BROADCAST_PS_BUFFERING@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_ieee80211_hw_set
	ldr	x0, [x19]
Lloh12:
	adrp	x8, _SIGNAL_DBM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SIGNAL_DBM@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_ieee80211_hw_set
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	bl	_SET_IEEE80211_DEV
	ldr	x20, [x19]
Lloh15:
	adrp	x8, _EEPROM_MAC_ADDR_0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EEPROM_MAC_ADDR_0@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_eeprom_addr
	mov	x1, x0
	mov	x0, x20
	bl	_SET_IEEE80211_PERM_ADDR
	ldr	x8, [x19]
Lloh18:
	adrp	x9, lCPI0_0@PAGE
Lloh19:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x8]
	mov	w9, #1
	str	w9, [x8, #8]
Lloh20:
	adrp	x8, _SUPPORT_BAND_2GHZ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SUPPORT_BAND_2GHZ@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh23:
	adrp	x8, _SUPPORT_RATE_CCK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SUPPORT_RATE_CCK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _SUPPORT_RATE_OFDM@GOTPAGE
Lloh27:
	ldr	x9, [x9, _SUPPORT_RATE_OFDM@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	mov	x0, x19
	bl	_rt2x00_has_cap_rf_sequence
Lloh29:
	adrp	x8, _rf_vals_noseq@GOTPAGE
Lloh30:
	ldr	x8, [x8, _rf_vals_noseq@GOTPAGEOFF]
Lloh31:
	adrp	x20, _rf_vals_seq@GOTPAGE
Lloh32:
	ldr	x20, [x20, _rf_vals_seq@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x8, x20, eq
	ldr	w8, [x8]
	mov	w9, #14
	str	w9, [x19, #20]
	str	w8, [x19, #36]
Lloh33:
	adrp	x8, _RF5225@GOTPAGE
Lloh34:
	ldr	x8, [x8, _RF5225@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rf
	cbnz	x0, LBB0_2
; %bb.1:
Lloh36:
	adrp	x8, _RF5325@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RF5325@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_rf
	cbz	x0, LBB0_11
LBB0_2:
Lloh39:
	adrp	x8, _SUPPORT_BAND_5GHZ@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SUPPORT_BAND_5GHZ@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
	orr	w8, w9, w8
	str	w8, [x19, #32]
	ldr	w0, [x20]
	bl	_ARRAY_SIZE
	str	w0, [x19, #20]
LBB0_3:
Lloh42:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	mov	w1, #16
	bl	_kcalloc
	cbz	x0, LBB0_9
; %bb.4:
	mov	x20, x0
	str	x0, [x19, #24]
Lloh45:
	adrp	x8, _EEPROM_TXPOWER_G_START@GOTPAGE
Lloh46:
	ldr	x8, [x8, _EEPROM_TXPOWER_G_START@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_eeprom_addr
	mov	x21, x0
Lloh48:
	adrp	x22, _MAX_TXPOWER@GOTPAGE
Lloh49:
	ldr	x22, [x22, _MAX_TXPOWER@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [x20, #8]
	ldrsb	w0, [x0]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20]
	ldr	x8, [x22]
	str	x8, [x20, #24]
	ldrsb	w0, [x21, #1]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #16]
	ldr	x8, [x22]
	str	x8, [x20, #40]
	ldrsb	w0, [x21, #2]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #32]
	ldr	x8, [x22]
	str	x8, [x20, #56]
	ldrsb	w0, [x21, #3]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #48]
	ldr	x8, [x22]
	str	x8, [x20, #72]
	ldrsb	w0, [x21, #4]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #64]
	ldr	x8, [x22]
	str	x8, [x20, #88]
	ldrsb	w0, [x21, #5]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #80]
	ldr	x8, [x22]
	str	x8, [x20, #104]
	ldrsb	w0, [x21, #6]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #96]
	ldr	x8, [x22]
	str	x8, [x20, #120]
	ldrsb	w0, [x21, #7]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #112]
	ldr	x8, [x22]
	str	x8, [x20, #136]
	ldrsb	w0, [x21, #8]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #128]
	ldr	x8, [x22]
	str	x8, [x20, #152]
	ldrsb	w0, [x21, #9]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #144]
	ldr	x8, [x22]
	str	x8, [x20, #168]
	ldrsb	w0, [x21, #10]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #160]
	ldr	x8, [x22]
	str	x8, [x20, #184]
	ldrsb	w0, [x21, #11]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #176]
	ldr	x8, [x22]
	str	x8, [x20, #200]
	ldrsb	w0, [x21, #12]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #192]
	ldr	x8, [x22]
	str	x8, [x20, #216]
	ldrsb	w0, [x21, #13]
	bl	_TXPOWER_FROM_DEV
	str	x0, [x20, #208]
	ldr	w8, [x19, #20]
	cmp	w8, #15
	b.lt	LBB0_8
; %bb.5:
Lloh50:
	adrp	x8, _EEPROM_TXPOWER_A_START@GOTPAGE
Lloh51:
	ldr	x8, [x8, _EEPROM_TXPOWER_A_START@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00_eeprom_addr
	ldr	w8, [x19, #20]
	cmp	w8, #15
	b.lo	LBB0_8
; %bb.6:
	mov	x21, x0
	mov	x23, #0
	add	x20, x20, #232
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	str	x8, [x20]
	ldrsb	w0, [x21, x23]
	bl	_TXPOWER_FROM_DEV
	stur	x0, [x20, #-8]
	ldr	w8, [x19, #20]
	add	x20, x20, #16
	add	x9, x23, #15
	add	x23, x23, #1
	cmp	x9, x8
	b.lo	LBB0_7
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh53:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh54:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
LBB0_11:
	ldr	w0, [x19, #20]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdr	Lloh18, Lloh19
	.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 AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_WIPHY_FLAG_PS_ON_BY_DEFAULT,4,2 ; @WIPHY_FLAG_PS_ON_BY_DEFAULT
	.comm	_PS_NULLFUNC_STACK,4,2          ; @PS_NULLFUNC_STACK
	.comm	_SUPPORTS_PS,4,2                ; @SUPPORTS_PS
	.comm	_HOST_BROADCAST_PS_BUFFERING,4,2 ; @HOST_BROADCAST_PS_BUFFERING
	.comm	_SIGNAL_DBM,4,2                 ; @SIGNAL_DBM
	.comm	_EEPROM_MAC_ADDR_0,4,2          ; @EEPROM_MAC_ADDR_0
	.comm	_SUPPORT_BAND_2GHZ,4,2          ; @SUPPORT_BAND_2GHZ
	.comm	_SUPPORT_RATE_CCK,4,2           ; @SUPPORT_RATE_CCK
	.comm	_SUPPORT_RATE_OFDM,4,2          ; @SUPPORT_RATE_OFDM
	.comm	_rf_vals_noseq,4,2              ; @rf_vals_noseq
	.comm	_rf_vals_seq,4,2                ; @rf_vals_seq
	.comm	_RF5225,4,2                     ; @RF5225
	.comm	_RF5325,4,2                     ; @RF5325
	.comm	_SUPPORT_BAND_5GHZ,4,2          ; @SUPPORT_BAND_5GHZ
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EEPROM_TXPOWER_G_START,4,2     ; @EEPROM_TXPOWER_G_START
	.comm	_MAX_TXPOWER,8,3                ; @MAX_TXPOWER
	.comm	_EEPROM_TXPOWER_A_START,4,2     ; @EEPROM_TXPOWER_A_START
	.no_dead_strip	_rt61pci_probe_hw_mode
.subsections_via_symbols
