	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_set_tim
_ieee80211_set_tim:                     ## @ieee80211_set_tim
	.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	%esi, %r15d
	movq	%rdi, %rbx
	movq	16(%rdi), %r13
	movq	(%r13), %rsi
	movq	_IEEE80211_M_HOSTAP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	sete	%al
	movq	_IEEE80211_M_IBSS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	movq	8(%rdi), %r14
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_KASSERT
	movl	(%rbx), %edi
	callq	_IEEE80211_AID
	movq	%rax, %r12
	movq	8(%r13), %rsi
	xorl	%edi, %edi
	cmpq	%rsi, %rax
	setl	%dil
	callq	_KASSERT
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_IEEE80211_LOCK
	movl	28(%r13), %edi
	movq	%r12, %rsi
	callq	_isset
	xorl	%r14d, %r14d
	testq	%rax, %rax
	setne	%r14b
	cmpl	%r15d, %r14d
	je	LBB0_5
## %bb.1:
	movl	28(%r13), %edi
	movq	%r12, %rsi
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.2:
	callq	_setbit
	movl	$1, %eax
	jmp	LBB0_4
LBB0_3:
	callq	_clrbit
	movl	$-1, %eax
LBB0_4:
	addl	%eax, 24(%r13)
	movq	_IEEE80211_BEACON_TIM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	*16(%r13)
LBB0_5:
	xorl	%ebx, %ebx
	cmpl	%r15d, %r14d
	setne	%bl
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_IEEE80211_UNLOCK
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_M_HOSTAP,8,3         ## @IEEE80211_M_HOSTAP
	.comm	_IEEE80211_M_IBSS,8,3           ## @IEEE80211_M_IBSS
	.comm	_IEEE80211_BEACON_TIM,4,2       ## @IEEE80211_BEACON_TIM
	.no_dead_strip	_ieee80211_set_tim
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_set_tim
_ieee80211_set_tim:                     ; @ieee80211_set_tim
	.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	x20, x1
	mov	x22, x0
	ldp	x19, x21, [x0, #8]
	ldr	x1, [x21]
Lloh0:
	adrp	x8, _IEEE80211_M_HOSTAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_M_HOSTAP@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
Lloh3:
	adrp	x8, _IEEE80211_M_IBSS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_M_IBSS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ccmp	x1, x8, #4, ne
	cset	w0, eq
	bl	_KASSERT
	ldr	w0, [x22]
	bl	_IEEE80211_AID
	mov	x22, x0
	ldr	x1, [x21, #8]
	cmp	x0, x1
	cset	w0, lt
	bl	_KASSERT
	mov	x0, x19
	bl	_IEEE80211_LOCK
	ldr	w0, [x21, #28]
	mov	x1, x22
	bl	_isset
	cmp	x0, #0
	cset	w23, ne
	cmp	w23, w20
	b.eq	LBB0_5
; %bb.1:
	ldr	w0, [x21, #28]
	mov	x1, x22
	cbz	w20, LBB0_3
; %bb.2:
	bl	_setbit
	mov	w8, #1
	b	LBB0_4
LBB0_3:
	bl	_clrbit
	mov	w8, #-1
LBB0_4:
	ldr	w9, [x21, #24]
	add	w8, w9, w8
	str	w8, [x21, #24]
	ldr	x8, [x21, #16]
Lloh6:
	adrp	x9, _IEEE80211_BEACON_TIM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IEEE80211_BEACON_TIM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	mov	x0, x21
	blr	x8
LBB0_5:
	cmp	w23, w20
	cset	w20, ne
	mov	x0, x19
	bl	_IEEE80211_UNLOCK
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_M_HOSTAP,8,3         ; @IEEE80211_M_HOSTAP
	.comm	_IEEE80211_M_IBSS,8,3           ; @IEEE80211_M_IBSS
	.comm	_IEEE80211_BEACON_TIM,4,2       ; @IEEE80211_BEACON_TIM
	.no_dead_strip	_ieee80211_set_tim
.subsections_via_symbols
