	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2500usb_config_intf
_rt2500usb_config_intf:                 ## @rt2500usb_config_intf
	.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	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rdi, %r13
	movq	_CONFIG_UPDATE_TYPE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_PREAMBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_IEEE80211_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$20, %esi
	callq	_GET_DURATION
	addl	%eax, %ebx
	movq	_TXRX_CSR20@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_rt2500usb_register_read
	movl	%eax, -44(%rbp)
	movq	_TXRX_CSR20_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shrl	$6, %ebx
	leaq	-44(%rbp), %r12
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_rt2x00_set_field16
	movq	_TXRX_CSR20_BCN_EXPECT_WINDOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rax
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	setne	%dl
	addl	%edx, %edx
	movq	%r12, %rdi
	callq	_rt2x00_set_field16
	movq	_TXRX_CSR20@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	callq	_rt2500usb_register_write
	movq	_TXRX_CSR18@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_rt2500usb_register_read
	movl	%eax, -44(%rbp)
	movq	_TXRX_CSR18_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field16
	movl	(%rbx), %esi
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	callq	_rt2500usb_register_write
	movq	_TXRX_CSR19@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_rt2500usb_register_read
	movl	%eax, -44(%rbp)
	movq	_TXRX_CSR19_TSF_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%r12, %rdi
	callq	_rt2x00_set_field16
	movl	(%rbx), %esi
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	callq	_rt2500usb_register_write
LBB0_2:
	movq	_CONFIG_UPDATE_MAC@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_MAC_CSR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r14), %edx
	movq	%r13, %rdi
	movl	$12, %ecx
	callq	_rt2500usb_register_multiwrite
LBB0_4:
	movq	_CONFIG_UPDATE_BSSID@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_MAC_CSR5@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r14), %edx
	movq	%r13, %rdi
	movl	$12, %ecx
	callq	_rt2500usb_register_multiwrite
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_UPDATE_TYPE,4,2         ## @CONFIG_UPDATE_TYPE
	.comm	_PREAMBLE,4,2                   ## @PREAMBLE
	.comm	_IEEE80211_HEADER,4,2           ## @IEEE80211_HEADER
	.comm	_TXRX_CSR20,4,2                 ## @TXRX_CSR20
	.comm	_TXRX_CSR20_OFFSET,4,2          ## @TXRX_CSR20_OFFSET
	.comm	_TXRX_CSR20_BCN_EXPECT_WINDOW,4,2 ## @TXRX_CSR20_BCN_EXPECT_WINDOW
	.comm	_NL80211_IFTYPE_STATION,8,3     ## @NL80211_IFTYPE_STATION
	.comm	_TXRX_CSR18,4,2                 ## @TXRX_CSR18
	.comm	_TXRX_CSR18_OFFSET,4,2          ## @TXRX_CSR18_OFFSET
	.comm	_TXRX_CSR19,4,2                 ## @TXRX_CSR19
	.comm	_TXRX_CSR19_TSF_SYNC,4,2        ## @TXRX_CSR19_TSF_SYNC
	.comm	_CONFIG_UPDATE_MAC,4,2          ## @CONFIG_UPDATE_MAC
	.comm	_MAC_CSR2,4,2                   ## @MAC_CSR2
	.comm	_CONFIG_UPDATE_BSSID,4,2        ## @CONFIG_UPDATE_BSSID
	.comm	_MAC_CSR5,4,2                   ## @MAC_CSR5
	.no_dead_strip	_rt2500usb_config_intf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2500usb_config_intf
_rt2500usb_config_intf:                 ; @rt2500usb_config_intf
	.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	x21, x3
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _CONFIG_UPDATE_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_UPDATE_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PREAMBLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PREAMBLE@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _IEEE80211_HEADER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_HEADER@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	w1, #20
	bl	_GET_DURATION
	add	w22, w0, w22
Lloh9:
	adrp	x23, _TXRX_CSR20@GOTPAGE
Lloh10:
	ldr	x23, [x23, _TXRX_CSR20@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_rt2500usb_register_read
	str	w0, [sp, #12]
Lloh11:
	adrp	x8, _TXRX_CSR20_OFFSET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TXRX_CSR20_OFFSET@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	lsr	w2, w22, #6
	add	x0, sp, #12
	bl	_rt2x00_set_field16
Lloh14:
	adrp	x8, _TXRX_CSR20_BCN_EXPECT_WINDOW@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TXRX_CSR20_BCN_EXPECT_WINDOW@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x8, [x20]
Lloh17:
	adrp	x9, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh18:
	ldr	x9, [x9, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ne
	lsl	w2, w8, #1
	add	x0, sp, #12
	bl	_rt2x00_set_field16
	ldr	w1, [x23]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2500usb_register_write
Lloh20:
	adrp	x22, _TXRX_CSR18@GOTPAGE
Lloh21:
	ldr	x22, [x22, _TXRX_CSR18@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2500usb_register_read
	str	w0, [sp, #12]
Lloh22:
	adrp	x8, _TXRX_CSR18_OFFSET@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TXRX_CSR18_OFFSET@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field16
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2500usb_register_write
Lloh25:
	adrp	x22, _TXRX_CSR19@GOTPAGE
Lloh26:
	ldr	x22, [x22, _TXRX_CSR19@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2500usb_register_read
	str	w0, [sp, #12]
Lloh27:
	adrp	x8, _TXRX_CSR19_TSF_SYNC@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TXRX_CSR19_TSF_SYNC@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	add	x0, sp, #12
	bl	_rt2x00_set_field16
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2500usb_register_write
LBB0_2:
Lloh30:
	adrp	x8, _CONFIG_UPDATE_MAC@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CONFIG_UPDATE_MAC@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:
Lloh33:
	adrp	x8, _MAC_CSR2@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MAC_CSR2@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	ldr	w2, [x20, #16]
	mov	x0, x19
	mov	w3, #12
	bl	_rt2500usb_register_multiwrite
LBB0_4:
Lloh36:
	adrp	x8, _CONFIG_UPDATE_BSSID@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CONFIG_UPDATE_BSSID@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
Lloh39:
	adrp	x8, _MAC_CSR5@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MAC_CSR5@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	ldr	w2, [x20, #12]
	mov	x0, x19
	mov	w3, #12
	bl	_rt2500usb_register_multiwrite
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_UPDATE_TYPE,4,2         ; @CONFIG_UPDATE_TYPE
	.comm	_PREAMBLE,4,2                   ; @PREAMBLE
	.comm	_IEEE80211_HEADER,4,2           ; @IEEE80211_HEADER
	.comm	_TXRX_CSR20,4,2                 ; @TXRX_CSR20
	.comm	_TXRX_CSR20_OFFSET,4,2          ; @TXRX_CSR20_OFFSET
	.comm	_TXRX_CSR20_BCN_EXPECT_WINDOW,4,2 ; @TXRX_CSR20_BCN_EXPECT_WINDOW
	.comm	_NL80211_IFTYPE_STATION,8,3     ; @NL80211_IFTYPE_STATION
	.comm	_TXRX_CSR18,4,2                 ; @TXRX_CSR18
	.comm	_TXRX_CSR18_OFFSET,4,2          ; @TXRX_CSR18_OFFSET
	.comm	_TXRX_CSR19,4,2                 ; @TXRX_CSR19
	.comm	_TXRX_CSR19_TSF_SYNC,4,2        ; @TXRX_CSR19_TSF_SYNC
	.comm	_CONFIG_UPDATE_MAC,4,2          ; @CONFIG_UPDATE_MAC
	.comm	_MAC_CSR2,4,2                   ; @MAC_CSR2
	.comm	_CONFIG_UPDATE_BSSID,4,2        ; @CONFIG_UPDATE_BSSID
	.comm	_MAC_CSR5,4,2                   ; @MAC_CSR5
	.no_dead_strip	_rt2500usb_config_intf
.subsections_via_symbols
