	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsi_core_determine_hal_queue
_rsi_core_determine_hal_queue:          ## @rsi_core_determine_hal_queue
	.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
	movq	%rdi, %r15
	movq	_INVALID_QUEUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_MGMT_BEACON_Q@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	shlq	$2, %rdi
	addq	24(%r15), %rdi
	callq	_skb_queue_len
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	(%rbx), %r14
LBB0_2:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_MGMT_SOFT_Q@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	shlq	$2, %rdi
	addq	24(%r15), %rdi
	callq	_skb_queue_len
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	cmpl	$0, 48(%r15)
	je	LBB0_1
	jmp	LBB0_2
LBB0_6:
	cmpq	$0, 40(%r15)
	jne	LBB0_2
## %bb.7:
	movl	(%r15), %eax
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	decl	%eax
	movl	%eax, (%r15)
	movq	8(%r15), %r14
	jmp	LBB0_2
LBB0_9:
	movq	_NUM_EDCA_QUEUES@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	%r15, %rdi
	callq	_rsi_determine_min_weight_queue
	movq	%rax, %r12
	movq	(%r13), %rax
	cmpq	%rax, %r12
	jae	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rbx
	shlq	$2, %rbx
	movq	%r12, %r14
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=2
	incq	%r12
	movq	(%r13), %rax
	addq	$4, %rbx
	cmpq	%rax, %r12
	jae	LBB0_18
LBB0_13:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%r15), %rdi
	addq	%rbx, %rdi
	callq	_skb_queue_len
	movq	32(%r15), %rcx
	cmpq	$0, 8(%rcx,%rbx,4)
	je	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	(%rcx,%rbx,4), %rcx
	cmpq	16(%r15), %rcx
	jge	LBB0_12
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=2
	testq	%rax, %rax
	je	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=2
	movq	%rcx, 16(%r15)
	movq	%r12, %r14
	jmp	LBB0_12
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %r14
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%rax, %r14
	jae	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	32(%r15), %rax
	movq	%r14, %rcx
	shlq	$4, %rcx
	movq	$0, 8(%rax,%rcx)
LBB0_20:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r15, %rdi
	callq	_rsi_recalculate_weights
	movl	%eax, %ebx
	leaq	(,%r14,4), %r12
	movq	24(%r15), %rdi
	addq	%r12, %rdi
	callq	_skb_queue_len
	testq	%rax, %rax
	jne	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_10 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_10
## %bb.22:
	movq	_INVALID_QUEUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_2
LBB0_23:
	movq	%r14, 8(%r15)
	addq	24(%r15), %r12
	movq	%r12, %rdi
	callq	_skb_queue_len
	movq	_VO_Q@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_25
## %bb.24:
	movq	_VI_Q@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_2
LBB0_25:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_rsi_get_num_pkts_dequeue
	decl	%eax
	movl	%eax, (%r15)
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_QUEUE,8,3              ## @INVALID_QUEUE
	.comm	_MGMT_BEACON_Q,8,3              ## @MGMT_BEACON_Q
	.comm	_MGMT_SOFT_Q,8,3                ## @MGMT_SOFT_Q
	.comm	_NUM_EDCA_QUEUES,8,3            ## @NUM_EDCA_QUEUES
	.comm	_VO_Q,8,3                       ## @VO_Q
	.comm	_VI_Q,8,3                       ## @VI_Q
	.no_dead_strip	_rsi_core_determine_hal_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsi_core_determine_hal_queue
_rsi_core_determine_hal_queue:          ; @rsi_core_determine_hal_queue
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x22, _INVALID_QUEUE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _INVALID_QUEUE@GOTPAGEOFF]
	ldr	x20, [x22]
	ldr	x8, [x0, #24]
Lloh2:
	adrp	x21, _MGMT_BEACON_Q@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MGMT_BEACON_Q@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x8, x9, lsl #2
	bl	_skb_queue_len
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x20, [x21]
	b	LBB0_22
LBB0_2:
	ldr	x8, [x19, #24]
Lloh4:
	adrp	x21, _MGMT_SOFT_Q@GOTPAGE
Lloh5:
	ldr	x21, [x21, _MGMT_SOFT_Q@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x8, x9, lsl #2
	bl	_skb_queue_len
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w8, [x19, #48]
	ldr	x9, [x21]
	cmp	w8, #0
	csel	x20, x9, x20, eq
	b	LBB0_22
LBB0_4:
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_22
; %bb.5:
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.6:
	sub	w8, w8, #1
	str	w8, [x19]
	ldr	x20, [x19, #8]
	b	LBB0_22
LBB0_7:
Lloh6:
	adrp	x23, _NUM_EDCA_QUEUES@GOTPAGE
Lloh7:
	ldr	x23, [x23, _NUM_EDCA_QUEUES@GOTPAGEOFF]
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	mov	x0, x19
	bl	_rsi_determine_min_weight_queue
	mov	x21, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.hs	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	lsl	x24, x21, #2
	lsl	x25, x21, #4
	mov	x20, x21
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	x21, x21, #1
	ldr	x8, [x23]
	add	x24, x24, #4
	add	x25, x25, #16
	cmp	x21, x8
	b.hs	LBB0_15
LBB0_11:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #24]
	add	x0, x8, x24
	bl	_skb_queue_len
	ldr	x8, [x19, #32]
	add	x9, x8, x25
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [x8, x25]
	ldr	x9, [x19, #16]
	cmp	x8, x9
	ccmp	x0, #0, #4, lt
	b.eq	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
	str	x8, [x19, #16]
	mov	x20, x21
	b	LBB0_10
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x20, x21
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	x20, x8
	b.hs	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19, #32]
	add	x8, x8, x20, lsl #4
	str	xzr, [x8, #8]
LBB0_17:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	bl	_rsi_recalculate_weights
	mov	x21, x0
	ldr	x8, [x19, #24]
	add	x0, x8, x20, lsl #2
	bl	_skb_queue_len
	cbnz	x0, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_8 Depth=1
	cbnz	w21, LBB0_8
; %bb.19:
	ldr	x20, [x22]
	b	LBB0_22
LBB0_20:
	str	x20, [x19, #8]
	ldr	x8, [x19, #24]
	add	x0, x8, x20, lsl #2
	bl	_skb_queue_len
Lloh8:
	adrp	x8, _VO_Q@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VO_Q@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _VI_Q@GOTPAGE
Lloh12:
	ldr	x9, [x9, _VI_Q@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x20, x8
	ccmp	x20, x9, #4, ne
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x19
	mov	x1, x20
	bl	_rsi_get_num_pkts_dequeue
	sub	w8, w0, #1
	str	w8, [x19]
LBB0_22:
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_QUEUE,8,3              ; @INVALID_QUEUE
	.comm	_MGMT_BEACON_Q,8,3              ; @MGMT_BEACON_Q
	.comm	_MGMT_SOFT_Q,8,3                ; @MGMT_SOFT_Q
	.comm	_NUM_EDCA_QUEUES,8,3            ; @NUM_EDCA_QUEUES
	.comm	_VO_Q,8,3                       ; @VO_Q
	.comm	_VI_Q,8,3                       ; @VI_Q
	.no_dead_strip	_rsi_core_determine_hal_queue
.subsections_via_symbols
