	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_airtime_weights
_update_airtime_weights:                ## @update_airtime_weights
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movq	_AIRTIME_MODE_DYNAMIC@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%al
	cmpq	$0, (%rdi)
	je	LBB0_35
## %bb.1:
	movq	_TRUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movb	%al, %dl
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movq	(%r15), %r10
	cmpq	%r10, %r14
	jae	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%r14,8), %rbx
	cmpl	$0, 16(%rbx)
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_count_backlogged_sta
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r13d, %eax
	movl	%r13d, %ecx
	cmovbl	%eax, %ecx
	testl	%r13d, %r13d
	cmovel	%eax, %ecx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	imull	%eax, %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	addl	%eax, %r12d
	movq	8(%rbx), %rax
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	addl	(%rax), %edx
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	incl	-48(%rbp)                       ## 4-byte Folded Spill
	movl	%ecx, %r13d
	jmp	LBB0_2
LBB0_7:
	testl	%r13d, %r13d
	je	LBB0_20
## %bb.8:
	testq	%r10, %r10
	je	LBB0_21
## %bb.9:
	movq	8(%r15), %r11
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ebx, %ebx
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_12
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=1
	imull	-60(%rbp), %ecx                 ## 4-byte Folded Reload
	imull	%r12d, %esi
	cmpl	%esi, %ecx
	movl	$0, %r14d
	cmoval	%r8d, %r14d
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	cmpq	%rbx, %r10
	je	LBB0_22
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r11,%rbx,8), %rax
	cmpl	$0, 16(%rax)
	je	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%rax), %rdi
	movl	(%rdi), %esi
	testl	%esi, %esi
	je	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r13d
	testl	%edx, %edx
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	cmovnel	%r9d, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	testl	%r14d, %r14d
	jne	LBB0_11
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpq	$0, 8(%rdi)
	jne	LBB0_10
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_20:
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_24
LBB0_21:
	movl	-52(%rbp), %r14d                ## 4-byte Reload
LBB0_22:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_24
## %bb.23:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	xorl	%edx, %edx
	divl	%r13d
	movl	%eax, %r11d
	jmp	LBB0_25
LBB0_24:
	movl	-44(%rbp), %r11d                ## 4-byte Reload
LBB0_25:
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	testq	%r10, %r10
	je	LBB0_35
## %bb.26:
	movq	8(%r15), %r8
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_29 Depth=1
	movl	%eax, 4(%rsi)
	cmpl	%edi, %eax
	cmovgl	%eax, %edi
LBB0_28:                                ##   in Loop: Header=BB0_29 Depth=1
	incq	%rbx
	cmpq	%rbx, %r10
	je	LBB0_36
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r8,%rbx,8), %rsi
	cmpl	$0, 16(%rsi)
	je	LBB0_28
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	8(%rsi), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_28
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	$1, %eax
	testl	%r14d, %r14d
	je	LBB0_27
## %bb.32:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	(%rsi), %r9d
	testl	%r9d, %r9d
	je	LBB0_27
## %bb.33:                              ##   in Loop: Header=BB0_29 Depth=1
	cmpl	$2, %r12d
	jl	LBB0_27
## %bb.34:                              ##   in Loop: Header=BB0_29 Depth=1
	imull	%r11d, %ecx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r9d
	jmp	LBB0_27
LBB0_35:
	xorl	%edi, %edi
LBB0_36:
	callq	_get_airtime_quantum
	movl	%eax, %r14d
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_42
## %bb.37:
	xorl	%ebx, %ebx
	jmp	LBB0_39
	.p2align	4, 0x90
LBB0_38:                                ##   in Loop: Header=BB0_39 Depth=1
	incq	%rbx
	cmpq	%rax, %rbx
	jae	LBB0_42
LBB0_39:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	cmpl	$0, 16(%rdi)
	je	LBB0_38
## %bb.40:                              ##   in Loop: Header=BB0_39 Depth=1
	movq	8(%rdi), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_38
## %bb.41:                              ##   in Loop: Header=BB0_39 Depth=1
	movl	4(%rdi), %esi
	imull	%r14d, %esi
	callq	_set_sta_weights
	movq	(%r15), %rax
	jmp	LBB0_38
LBB0_42:
	leaq	-68(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	callq	_get_airtime_policy_update_timeout
	testq	%rax, %rax
	js	LBB0_44
## %bb.43:
	movl	-68(%rbp), %edi
	movl	-64(%rbp), %esi
	leaq	_update_airtime_weights(%rip), %rdx
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	callq	_eloop_register_timeout
LBB0_44:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_AIRTIME_MODE_DYNAMIC,8,3       ## @AIRTIME_MODE_DYNAMIC
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_update_airtime_weights
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_airtime_weights
_update_airtime_weights:                ; @update_airtime_weights
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AIRTIME_MODE_DYNAMIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AIRTIME_MODE_DYNAMIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w23, eq
	ldr	x8, [x0]
	cbz	x8, LBB0_19
; %bb.1:
	mov	x28, #0
	mov	w21, #0
	mov	w26, #0
	mov	w27, #0
	mov	w24, #0
	mov	w22, #1
Lloh3:
	adrp	x8, _TRUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x28, x28, #1
	ldr	x8, [x19]
	cmp	x28, x8
	b.hs	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x20, [x8, x28, lsl #3]
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_count_backlogged_sta
	ldr	w8, [x20]
	cbz	w8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, w24
	ccmp	w24, #0, #4, hs
	csel	w24, w8, w24, eq
	mul	w22, w8, w22
	add	w27, w8, w27
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	add	w26, w8, w26
	add	w21, w21, #1
	b	LBB0_2
LBB0_7:
	cbz	w24, LBB0_22
; %bb.8:
	cbz	x8, LBB0_20
; %bb.9:
	ldr	x9, [x19, #8]
Lloh6:
	adrp	x10, _FALSE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _FALSE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _TRUE@GOTPAGE
Lloh10:
	ldr	x11, [x11, _TRUE@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	mov	x12, x8
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w23, #0
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x9, x9, #8
	subs	x12, x12, #1
	b.eq	LBB0_20
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x15, [x9]
	ldr	w13, [x15, #16]
	cbz	w13, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x14, [x15, #8]
	ldr	w13, [x14]
	cbz	w13, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w15, [x15]
	cbz	w15, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	udiv	w16, w15, w24
	msub	w16, w16, w24, w15
	cmp	w16, #0
	csel	w25, w25, w10, eq
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	cbnz	w23, LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x14, [x14, #8]
	cbz	x14, LBB0_10
; %bb.18:                               ;   in Loop: Header=BB0_12 Depth=1
	mul	w14, w15, w26
	mul	w13, w13, w27
	cmp	w14, w13
	csel	w23, w11, wzr, hi
	b	LBB0_11
LBB0_19:
	mov	w0, #0
	b	LBB0_32
LBB0_20:
	cbz	w25, LBB0_22
; %bb.21:
	udiv	w22, w22, w24
LBB0_22:
	mov	w0, #0
	cbz	x8, LBB0_32
; %bb.23:
	ldr	x9, [x19, #8]
	b	LBB0_27
LBB0_24:                                ;   in Loop: Header=BB0_27 Depth=1
	mov	w11, #1
LBB0_25:                                ;   in Loop: Header=BB0_27 Depth=1
	str	w11, [x10, #4]
	cmp	w11, w0
	csel	w0, w11, w0, gt
LBB0_26:                                ;   in Loop: Header=BB0_27 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_32
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	ldr	w11, [x10, #16]
	cbz	w11, LBB0_26
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	x11, [x10, #8]
	ldr	w11, [x11]
	cbz	w11, LBB0_26
; %bb.29:                               ;   in Loop: Header=BB0_27 Depth=1
	cbz	w23, LBB0_24
; %bb.30:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	w12, [x10]
	cmp	w12, #0
	ccmp	w21, #2, #8, ne
	b.lt	LBB0_24
; %bb.31:                               ;   in Loop: Header=BB0_27 Depth=1
	mul	w11, w11, w22
	udiv	w11, w11, w12
	b	LBB0_25
LBB0_32:
	bl	_get_airtime_quantum
	ldr	x8, [x19]
	cbz	x8, LBB0_38
; %bb.33:
	mov	x20, x0
	mov	x21, #0
	b	LBB0_35
LBB0_34:                                ;   in Loop: Header=BB0_35 Depth=1
	add	x21, x21, #1
	cmp	x21, x8
	b.hs	LBB0_38
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x0, [x9, x21, lsl #3]
	ldr	w9, [x0, #16]
	cbz	w9, LBB0_34
; %bb.36:                               ;   in Loop: Header=BB0_35 Depth=1
	ldr	x9, [x0, #8]
	ldr	w9, [x9]
	cbz	w9, LBB0_34
; %bb.37:                               ;   in Loop: Header=BB0_35 Depth=1
	ldr	w8, [x0, #4]
	mul	w1, w8, w20
	bl	_set_sta_weights
	ldr	x8, [x19]
	b	LBB0_34
LBB0_38:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	bl	_get_airtime_policy_update_timeout
	tbnz	x0, #63, LBB0_40
; %bb.39:
	ldp	w1, w0, [sp, #8]
Lloh12:
	adrp	x2, _update_airtime_weights@PAGE
Lloh13:
	add	x2, x2, _update_airtime_weights@PAGEOFF
	mov	x3, x19
	mov	x4, #0
	bl	_eloop_register_timeout
LBB0_40:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_AIRTIME_MODE_DYNAMIC,8,3       ; @AIRTIME_MODE_DYNAMIC
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_update_airtime_weights
.subsections_via_symbols
