	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minstrel_calc_retransmit
_minstrel_calc_retransmit:              ## @minstrel_calc_retransmit
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	8(%rsi), %edi
	callq	_MINSTREL_TRUNC
	movl	%eax, %r13d
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_minstrel_get_ratestats
	movq	%rax, %r14
	movq	(%rax), %r12
	movl	$1, %edi
	movl	$10, %esi
	callq	_MINSTREL_FRAC
	cmpq	%rax, %r12
	jge	LBB0_2
## %bb.1:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%r14)
	jmp	LBB0_9
LBB0_2:
	movabsq	$8589934594, %rax               ## imm = 0x200000002
	movq	%rax, 8(%r14)
	movl	$1, 16(%r14)
	movq	_minstrel_mcs_groups@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_MCS_GROUP_RATES@GOTPCREL(%rip), %rsi
	movl	%r15d, %eax
	cltd
	idivl	(%rsi)
	cltq
	movq	(%rcx,%rax,8), %rax
	movslq	%edx, %rcx
	imull	(%rax,%rcx,4), %r13d
	imulq	$274877907, %r13, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rax,8), %r13d
	shrl	%r13d
	leal	(%rax,%rax), %edi
	incl	%edi
	movl	12(%rbx), %esi
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax,8), %r12d
	shrl	%r12d
	addl	%r13d, %r12d
	leal	(%rax,%rax), %edi
	incl	%edi
	movl	12(%rbx), %esi
	callq	_min
	movl	%eax, %ecx
	movl	%r15d, %eax
	cltd
	movq	_MCS_GROUP_RATES@GOTPCREL(%rip), %rsi
	idivl	(%rsi)
	movq	_MINSTREL_CCK_GROUP@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	movl	$0, %edi
	cmpl	(%rdx), %eax
	je	LBB0_4
## %bb.3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	4(%rax), %edi
LBB0_4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%eax, %esi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	leal	(%r12,%rsi,2), %r15d
	addl	%eax, %edi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leal	(%r12,%rdi,2), %r12d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%rcx,%rcx,8), %r13d
	shrl	%r13d
	leal	(%rcx,%rcx), %edi
	incl	%edi
	movl	12(%rbx), %esi
	callq	_min
	movl	%eax, %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addl	%r13d, %eax
	addl	%eax, %r15d
	addl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	addl	%r13d, %r12d
	movl	4(%rbx), %eax
	cmpl	%eax, %r12d
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	12(%r14)
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%eax, %r15d
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r14), %eax
	incl	%eax
	movl	%eax, 8(%r14)
	cmpl	8(%rbx), %eax
	jl	LBB0_5
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_minstrel_mcs_groups,8,3        ## @minstrel_mcs_groups
	.comm	_MCS_GROUP_RATES,4,2            ## @MCS_GROUP_RATES
	.comm	_MINSTREL_CCK_GROUP,4,2         ## @MINSTREL_CCK_GROUP
	.no_dead_strip	_minstrel_calc_retransmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minstrel_calc_retransmit
_minstrel_calc_retransmit:              ; @minstrel_calc_retransmit
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w25, [x0]
	ldr	w0, [x1, #8]
	bl	_MINSTREL_TRUNC
	mov	x24, x0
	mov	x0, x21
	mov	x1, x22
	bl	_minstrel_get_ratestats
	mov	x20, x0
	ldr	x26, [x0]
	mov	w23, #1
	mov	w0, #1
	mov	w1, #10
	bl	_MINSTREL_FRAC
	cmp	x26, x0
	b.ge	LBB0_2
; %bb.1:
	movi.2s	v0, #1
	str	d0, [x20, #8]
	b	LBB0_10
LBB0_2:
	movi.2s	v0, #2
	str	d0, [x20, #8]
Lloh0:
	adrp	x8, _minstrel_mcs_groups@GOTPAGE
Lloh1:
	ldr	x8, [x8, _minstrel_mcs_groups@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x26, _MCS_GROUP_RATES@GOTPAGE
Lloh4:
	ldr	x26, [x26, _MCS_GROUP_RATES@GOTPAGEOFF]
	ldr	w9, [x26]
	sdiv	w10, w22, w9
	ldr	x8, [x8, w10, sxtw #3]
	str	w23, [x20, #16]
	msub	w9, w10, w9, w22
	ldr	w8, [x8, w9, sxtw #2]
	mul	w8, w8, w24
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	umull	x8, w8, w9
	lsr	x24, x8, #38
	add	w27, w25, w25, lsl #3
	mov	w0, #1
	bfi	w0, w25, #1, #31
	ldr	w1, [x19, #12]
	bl	_min
	add	w8, w0, w0, lsl #3
	lsr	w8, w8, #1
	add	w25, w8, w27, lsr #1
	bfi	w23, w0, #1, #31
	ldr	w1, [x19, #12]
	mov	x0, x23
	bl	_min
	ldr	w8, [x26]
	sdiv	w8, w22, w8
Lloh5:
	adrp	x9, _MINSTREL_CCK_GROUP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MINSTREL_CCK_GROUP@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #0
	mov	w9, #0
	b	LBB0_5
LBB0_4:
	ldp	w8, w9, [x21]
LBB0_5:
	add	w21, w8, w24
	add	w22, w25, w21, lsl #1
	add	w23, w9, w24
	add	w24, w25, w23, lsl #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w0, w0, lsl #3
	lsr	w25, w8, #1
	mov	w8, #1
	bfi	w8, w0, #1, #31
	ldr	w1, [x19, #12]
	mov	x0, x8
	bl	_min
	add	w8, w23, w24
	add	w24, w8, w25
	ldr	w8, [x19, #4]
	cmp	w24, w8
	b.hs	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x20, #12]
	add	w9, w9, #1
	str	w9, [x20, #12]
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w9, w21, w25
	add	w22, w9, w22
	cmp	w22, w8
	b.hs	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	ldr	w9, [x19, #8]
	cmp	w8, w9
	b.lt	LBB0_6
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_minstrel_mcs_groups,8,3        ; @minstrel_mcs_groups
	.comm	_MCS_GROUP_RATES,4,2            ; @MCS_GROUP_RATES
	.comm	_MINSTREL_CCK_GROUP,4,2         ; @MINSTREL_CCK_GROUP
	.no_dead_strip	_minstrel_calc_retransmit
.subsections_via_symbols
