	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_update_beacons_setup
_rt2800_update_beacons_setup:           ## @rt2800_update_beacons_setup
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rbx
	cmpl	$0, (%rbx)
	movl	$0, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jle	LBB0_5
## %bb.1:
	xorl	%r14d, %r14d
	movl	$4, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movslq	(%rbx), %rax
	addq	$8, %r15
	cmpq	%rax, %r14
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %r12
	movq	_ENTRY_BCN_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	(%r12,%r15), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-4(%r12,%r15), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_rt2800_get_beacon_offset
	leal	(,%r13,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	orl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
	incl	%r13d
	jmp	LBB0_4
LBB0_5:
	movq	_BCN_OFFSET0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_rt2800_register_write
	movq	_BCN_OFFSET1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_write
	movq	_MAC_BSSID_DW1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -48(%rbp)
	movq	_MAC_BSSID_DW1_BSS_BCN_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	-1(%r13), %eax
	testl	%r13d, %r13d
	movl	$0, %edx
	cmovgl	%eax, %edx
	leaq	-48(%rbp), %rdi
	callq	_rt2x00_set_field32
	movl	(%r14), %esi
	movl	-48(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENTRY_BCN_ENABLED,4,2          ## @ENTRY_BCN_ENABLED
	.comm	_BCN_OFFSET0,4,2                ## @BCN_OFFSET0
	.comm	_BCN_OFFSET1,4,2                ## @BCN_OFFSET1
	.comm	_MAC_BSSID_DW1,4,2              ## @MAC_BSSID_DW1
	.comm	_MAC_BSSID_DW1_BSS_BCN_NUM,4,2  ## @MAC_BSSID_DW1_BSS_BCN_NUM
	.no_dead_strip	_rt2800_update_beacons_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_update_beacons_setup
_rt2800_update_beacons_setup:           ; @rt2800_update_beacons_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	ldr	x22, [x0]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x23, #0
	mov	x24, #0
	mov	w20, #0
	mov	w21, #0
Lloh0:
	adrp	x25, _ENTRY_BCN_ENABLED@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ENTRY_BCN_ENABLED@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x22]
	add	x23, x23, #8
	cmp	x24, x8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x22, #8]
	ldr	w0, [x25]
	add	x8, x26, x23
	add	x1, x8, #4
	bl	_test_bit
	cbz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26, x23]
	mov	x0, x19
	bl	_rt2800_get_beacon_offset
	lsl	w8, w21, #3
	lsl	w8, w0, w8
	orr	w20, w8, w20
	add	w21, w21, #1
	b	LBB0_2
LBB0_5:
	mov	w21, #0
	mov	w20, #0
LBB0_6:
Lloh2:
	adrp	x8, _BCN_OFFSET0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BCN_OFFSET0@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_rt2800_register_write
Lloh5:
	adrp	x8, _BCN_OFFSET1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BCN_OFFSET1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2800_register_write
Lloh8:
	adrp	x20, _MAC_BSSID_DW1@GOTPAGE
Lloh9:
	ldr	x20, [x20, _MAC_BSSID_DW1@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh10:
	adrp	x8, _MAC_BSSID_DW1_BSS_BCN_NUM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MAC_BSSID_DW1_BSS_BCN_NUM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	sub	w8, w21, #1
	cmp	w21, #0
	csel	w2, w8, wzr, gt
	add	x0, sp, #12
	bl	_rt2x00_set_field32
	ldr	w1, [x20]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2800_register_write
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENTRY_BCN_ENABLED,4,2          ; @ENTRY_BCN_ENABLED
	.comm	_BCN_OFFSET0,4,2                ; @BCN_OFFSET0
	.comm	_BCN_OFFSET1,4,2                ; @BCN_OFFSET1
	.comm	_MAC_BSSID_DW1,4,2              ; @MAC_BSSID_DW1
	.comm	_MAC_BSSID_DW1_BSS_BCN_NUM,4,2  ; @MAC_BSSID_DW1_BSS_BCN_NUM
	.no_dead_strip	_rt2800_update_beacons_setup
.subsections_via_symbols
