	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_c_update_beacon_hw
_brcms_c_update_beacon_hw:              ## @brcms_c_update_beacon_hw
	.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, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %r13
	movq	_MCMD_BCN0VLD@GOTPCREL(%rip), %rax
	movq	_MCMD_BCN1VLD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	_maccommand@GOTPCREL(%rip), %rax
	movq	%rax, %r15
	movl	(%rax), %edi
	callq	_D11REGOFFS
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_bcma_read32
	notl	%eax
	testl	%eax, %r14d
	jne	LBB0_2
## %bb.1:
	movq	_macintstatus@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_D11REGOFFS
	movq	_MI_BCNTPL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_bcma_write32
LBB0_2:
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	movl	$0, (%rbx)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_brcms_c_beacon_write
	movl	(%r15), %edi
	callq	_D11REGOFFS
	movq	_MCMD_BCN0VLD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_11:
	movq	%r13, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bcma_set32                     ## TAILCALL
LBB0_4:
	movl	(%r15), %edi
	callq	_D11REGOFFS
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_bcma_read32
	notl	%eax
	testl	%eax, %r14d
	jne	LBB0_7
## %bb.5:
	movq	_MI_BCNTPL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	jmp	LBB0_6
LBB0_7:
	movl	(%r15), %edi
	callq	_D11REGOFFS
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_bcma_read32
	movq	_MCMD_BCN0VLD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movq	%r15, %r14
	je	LBB0_8
## %bb.9:
	movl	(%r14), %edi
	callq	_D11REGOFFS
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_bcma_read32
	movq	_MCMD_BCN1VLD@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_10
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rcx, %rax
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	$1, %r8d
	xorl	%r9d, %r9d
	movq	%rax, %rbx
	callq	_brcms_c_beacon_write
	movl	(%r14), %edi
	callq	_D11REGOFFS
	movl	(%rbx), %edx
	jmp	LBB0_11
LBB0_10:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_brcms_c_beacon_write
	movl	(%r14), %edi
	callq	_D11REGOFFS
	movl	(%r15), %edx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MCMD_BCN0VLD,4,2               ## @MCMD_BCN0VLD
	.comm	_MCMD_BCN1VLD,4,2               ## @MCMD_BCN1VLD
	.comm	_maccommand,4,2                 ## @maccommand
	.comm	_macintstatus,4,2               ## @macintstatus
	.comm	_MI_BCNTPL,4,2                  ## @MI_BCNTPL
	.no_dead_strip	_brcms_c_update_beacon_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_c_update_beacon_hw
_brcms_c_update_beacon_hw:              ; @brcms_c_update_beacon_hw
	.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	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
Lloh0:
	adrp	x25, _MCMD_BCN0VLD@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MCMD_BCN0VLD@GOTPAGEOFF]
Lloh2:
	adrp	x26, _MCMD_BCN1VLD@GOTPAGE
Lloh3:
	ldr	x26, [x26, _MCMD_BCN1VLD@GOTPAGEOFF]
	ldr	w8, [x25]
	ldr	w9, [x26]
	orr	w27, w9, w8
Lloh4:
	adrp	x24, _maccommand@GOTPAGE
Lloh5:
	ldr	x24, [x24, _maccommand@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x19
	bl	_bcma_read32
	bics	wzr, w27, w0
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _macintstatus@GOTPAGE
Lloh7:
	ldr	x8, [x8, _macintstatus@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_D11REGOFFS
	mov	x1, x0
Lloh9:
	adrp	x8, _MI_BCNTPL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MI_BCNTPL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_bcma_write32
LBB0_2:
	ldr	w8, [x22]
	cbz	w8, LBB0_6
; %bb.3:
	str	wzr, [x22]
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	mov	x3, x20
	mov	w4, #1
	mov	w5, #1
LBB0_4:
	bl	_brcms_c_beacon_write
	ldr	w0, [x24]
	bl	_D11REGOFFS
	mov	x1, x0
	ldr	w2, [x25]
LBB0_5:
	mov	x0, x19
	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
	b	_bcma_set32
LBB0_6:
	ldr	w0, [x24]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x19
	bl	_bcma_read32
	bics	wzr, w27, w0
	b.ne	LBB0_8
; %bb.7:
Lloh12:
	adrp	x8, _MI_BCNTPL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MI_BCNTPL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x22, #4]
	orr	w8, w9, w8
	str	w8, [x22, #4]
	b	LBB0_10
LBB0_8:
	ldr	w0, [x24]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x19
	bl	_bcma_read32
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.9:
	ldr	w0, [x24]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x19
	bl	_bcma_read32
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_12
LBB0_10:
	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
LBB0_11:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	mov	x3, x20
	mov	w4, #1
	mov	w5, #0
	b	LBB0_4
LBB0_12:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	mov	x3, x20
	mov	w4, #0
	mov	w5, #1
	bl	_brcms_c_beacon_write
	ldr	w0, [x24]
	bl	_D11REGOFFS
	mov	x1, x0
	ldr	w2, [x26]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MCMD_BCN0VLD,4,2               ; @MCMD_BCN0VLD
	.comm	_MCMD_BCN1VLD,4,2               ; @MCMD_BCN1VLD
	.comm	_maccommand,4,2                 ; @maccommand
	.comm	_macintstatus,4,2               ; @macintstatus
	.comm	_MI_BCNTPL,4,2                  ; @MI_BCNTPL
	.no_dead_strip	_brcms_c_update_beacon_hw
.subsections_via_symbols
