	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_set_rate_limit         ## -- Begin function brcms_c_set_rate_limit
	.p2align	4, 0x90
_brcms_c_set_rate_limit:                ## @brcms_c_set_rate_limit
	.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
	testl	%esi, %esi
	jle	LBB0_4
## %bb.1:
	movq	_RETRY_SHORT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%edx, %eax
	jl	LBB0_4
## %bb.2:
	testl	%edx, %edx
	jle	LBB0_4
## %bb.3:
	cmpl	%esi, %eax
	jl	LBB0_4
## %bb.5:
	movq	%rdi, %r15
	movl	%esi, (%rdi)
	movl	%edx, 4(%rdi)
	movl	16(%rdi), %edi
	callq	_brcms_b_retrylimit_upd
	movq	_IEEE80211_NUM_ACS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	movq	_EDCF_SHORT@GOTPCREL(%rip), %r12
	movq	_EDCF_LONG@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	(%r12), %esi
	movl	(%r15), %edx
	callq	_SFIELD
	movq	8(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	(%r13), %esi
	movl	4(%r15), %edx
	callq	_SFIELD
	movq	8(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	%r15, %rdi
	callq	_brcms_c_wme_retries_write
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RETRY_SHORT_MAX,4,2            ## @RETRY_SHORT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IEEE80211_NUM_ACS,4,2          ## @IEEE80211_NUM_ACS
	.comm	_EDCF_SHORT,4,2                 ## @EDCF_SHORT
	.comm	_EDCF_LONG,4,2                  ## @EDCF_LONG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_set_rate_limit         ; -- Begin function brcms_c_set_rate_limit
	.p2align	2
_brcms_c_set_rate_limit:                ; @brcms_c_set_rate_limit
	.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
	cmp	w1, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _RETRY_SHORT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RETRY_SHORT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	ccmp	w2, #1, #8, ge
	ccmp	w8, w1, #8, ge
	b.ge	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_3:
	mov	x19, x0
	stp	w1, w2, [x0]
	ldr	w0, [x0, #16]
	bl	_brcms_b_retrylimit_upd
Lloh6:
	adrp	x20, _IEEE80211_NUM_ACS@GOTPAGE
Lloh7:
	ldr	x20, [x20, _IEEE80211_NUM_ACS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x21, #0
Lloh8:
	adrp	x22, _EDCF_SHORT@GOTPAGE
Lloh9:
	ldr	x22, [x22, _EDCF_SHORT@GOTPAGEOFF]
Lloh10:
	adrp	x23, _EDCF_LONG@GOTPAGE
Lloh11:
	ldr	x23, [x23, _EDCF_LONG@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	lsl	x24, x21, #3
	ldr	x0, [x8, x24]
	ldr	w1, [x22]
	ldr	w2, [x19]
	bl	_SFIELD
	ldr	x8, [x19, #8]
	str	x0, [x8, x24]
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x24]
	ldr	w1, [x23]
	ldr	w2, [x19, #4]
	bl	_SFIELD
	ldr	x8, [x19, #8]
	str	x0, [x8, x24]
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_5
LBB0_6:
	mov	x0, x19
	bl	_brcms_c_wme_retries_write
	mov	w0, #0
LBB0_7:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_RETRY_SHORT_MAX,4,2            ; @RETRY_SHORT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IEEE80211_NUM_ACS,4,2          ; @IEEE80211_NUM_ACS
	.comm	_EDCF_SHORT,4,2                 ; @EDCF_SHORT
	.comm	_EDCF_LONG,4,2                  ; @EDCF_LONG
.subsections_via_symbols
