	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_qos_params_upload
_b43_qos_params_upload:                 ## @b43_qos_params_upload
	.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	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_B43_NR_QOSPARAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	(,%rbx,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	cmpl	$0, (%r14)
	je	LBB0_7
## %bb.1:
	movq	_B43_MMIO_RNG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_b43_read16
	movq	%rbx, %rdx
	movl	%eax, %ebx
	andl	(%r13), %ebx
	shll	$2, %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	movl	4(%r13), %eax
	shll	$5, %eax
	movq	_B43_QOSPARAM_TXOP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%r15,%rcx,4)
	movl	(%r13), %eax
	movq	_B43_QOSPARAM_CWMIN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%r15,%rcx,4)
	movl	8(%r13), %ecx
	movq	_B43_QOSPARAM_CWMAX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%r15,%rdx,4)
	movq	_B43_QOSPARAM_CWCUR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%r15,%rcx,4)
	movl	12(%r13), %eax
	movq	_B43_QOSPARAM_AIFS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%r15,%rcx,4)
	movq	_B43_QOSPARAM_BSLOTS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%ebx, (%r15,%rcx,4)
	addl	%eax, %ebx
	movq	_B43_QOSPARAM_REGGAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, (%r15,%rax,4)
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	xorl	%ebx, %ebx
	movq	_B43_SHM_SHARED@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15,%rbx,4), %ecx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_b43_shm_write16
	incq	%rbx
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	addl	$2, %r12d
	cmpq	%rax, %rbx
	jae	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_B43_QOSPARAM_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r13), %esi
	cmpq	%rax, %rbx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_b43_shm_read16
	movl	%eax, %ecx
	orl	$256, %ecx                      ## imm = 0x100
	movl	(%r13), %esi
	jmp	LBB0_6
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_B43_NR_QOSPARAMS,4,2           ## @B43_NR_QOSPARAMS
	.comm	_B43_MMIO_RNG,4,2               ## @B43_MMIO_RNG
	.comm	_B43_QOSPARAM_TXOP,8,3          ## @B43_QOSPARAM_TXOP
	.comm	_B43_QOSPARAM_CWMIN,8,3         ## @B43_QOSPARAM_CWMIN
	.comm	_B43_QOSPARAM_CWMAX,8,3         ## @B43_QOSPARAM_CWMAX
	.comm	_B43_QOSPARAM_CWCUR,8,3         ## @B43_QOSPARAM_CWCUR
	.comm	_B43_QOSPARAM_AIFS,8,3          ## @B43_QOSPARAM_AIFS
	.comm	_B43_QOSPARAM_BSLOTS,8,3        ## @B43_QOSPARAM_BSLOTS
	.comm	_B43_QOSPARAM_REGGAP,8,3        ## @B43_QOSPARAM_REGGAP
	.comm	_B43_QOSPARAM_STATUS,4,2        ## @B43_QOSPARAM_STATUS
	.comm	_B43_SHM_SHARED,4,2             ## @B43_SHM_SHARED
	.no_dead_strip	_b43_qos_params_upload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43_qos_params_upload
_b43_qos_params_upload:                 ; @b43_qos_params_upload
	.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
	sub	sp, sp, #16
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _B43_NR_QOSPARAMS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B43_NR_QOSPARAMS@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	lsl	x8, x23, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w8, [x0]
	cbz	w8, LBB0_7
; %bb.1:
Lloh8:
	adrp	x8, _B43_MMIO_RNG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _B43_MMIO_RNG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_b43_read16
	ldr	w8, [x22]
	and	w24, w8, w0
	lsl	w2, w23, #2
	mov	x0, x21
	mov	w1, #0
	bl	_memset
Lloh11:
	adrp	x8, _B43_QOSPARAM_TXOP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _B43_QOSPARAM_TXOP@GOTPAGEOFF]
	ldp	w10, w9, [x22]
	lsl	w9, w9, #5
Lloh13:
	ldr	x8, [x8]
	str	w9, [x21, x8, lsl #2]
Lloh14:
	adrp	x8, _B43_QOSPARAM_CWMIN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _B43_QOSPARAM_CWMIN@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	w10, [x21, x8, lsl #2]
Lloh17:
	adrp	x8, _B43_QOSPARAM_CWMAX@GOTPAGE
Lloh18:
	ldr	x8, [x8, _B43_QOSPARAM_CWMAX@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldp	w9, w11, [x22, #8]
	str	w9, [x21, x8, lsl #2]
Lloh20:
	adrp	x8, _B43_QOSPARAM_CWCUR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _B43_QOSPARAM_CWCUR@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	str	w10, [x21, x8, lsl #2]
Lloh23:
	adrp	x8, _B43_QOSPARAM_AIFS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _B43_QOSPARAM_AIFS@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	str	w11, [x21, x8, lsl #2]
Lloh26:
	adrp	x8, _B43_QOSPARAM_BSLOTS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _B43_QOSPARAM_BSLOTS@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	str	w24, [x21, x8, lsl #2]
	add	w8, w11, w24
Lloh29:
	adrp	x9, _B43_QOSPARAM_REGGAP@GOTPAGE
Lloh30:
	ldr	x9, [x9, _B43_QOSPARAM_REGGAP@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	str	w8, [x21, x9, lsl #2]
	mov	x0, x21
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_7
; %bb.2:
	mov	x22, #0
Lloh32:
	adrp	x23, _B43_QOSPARAM_STATUS@GOTPAGE
Lloh33:
	ldr	x23, [x23, _B43_QOSPARAM_STATUS@GOTPAGEOFF]
Lloh34:
	adrp	x24, _B43_SHM_SHARED@GOTPAGE
Lloh35:
	ldr	x24, [x24, _B43_SHM_SHARED@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w3, [x21, x22, lsl #2]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x2, x19
	bl	_b43_shm_write16
	add	x22, x22, #1
	mov	x0, x21
	bl	_ARRAY_SIZE
	add	w19, w19, #2
	cmp	x22, w0, uxtw
	b.hs	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	ldr	w1, [x24]
	cmp	x22, x8
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x2, x19
	bl	_b43_shm_read16
	orr	w3, w0, #0x100
	ldr	w1, [x24]
	b	LBB0_4
LBB0_7:
	ldur	x8, [x29, #-56]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	sub	sp, x29, #48
	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
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_B43_NR_QOSPARAMS,4,2           ; @B43_NR_QOSPARAMS
	.comm	_B43_MMIO_RNG,4,2               ; @B43_MMIO_RNG
	.comm	_B43_QOSPARAM_TXOP,8,3          ; @B43_QOSPARAM_TXOP
	.comm	_B43_QOSPARAM_CWMIN,8,3         ; @B43_QOSPARAM_CWMIN
	.comm	_B43_QOSPARAM_CWMAX,8,3         ; @B43_QOSPARAM_CWMAX
	.comm	_B43_QOSPARAM_CWCUR,8,3         ; @B43_QOSPARAM_CWCUR
	.comm	_B43_QOSPARAM_AIFS,8,3          ; @B43_QOSPARAM_AIFS
	.comm	_B43_QOSPARAM_BSLOTS,8,3        ; @B43_QOSPARAM_BSLOTS
	.comm	_B43_QOSPARAM_REGGAP,8,3        ; @B43_QOSPARAM_REGGAP
	.comm	_B43_QOSPARAM_STATUS,4,2        ; @B43_QOSPARAM_STATUS
	.comm	_B43_SHM_SHARED,4,2             ; @B43_SHM_SHARED
	.no_dead_strip	_b43_qos_params_upload
.subsections_via_symbols
