	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1251_tx_frag_block_num
_wl1251_tx_frag_block_num:              ## @wl1251_tx_frag_block_num
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_IEEE80211_MAX_FRAG_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le16
	movl	%eax, 8(%r14)
	movl	4(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, %ecx
	movq	_MAX_MSDU_SECURITY_LENGTH@GOTPCREL(%rip), %rax
	addl	(%rax), %ecx
	cmpl	%ebx, %ecx
	jle	LBB0_1
## %bb.2:
	movq	_MAX_MPDU_HEADER_AND_SECURITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	movq	_HW_BLOCK_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	cltd
	idivl	%r8d
	movl	%eax, %esi
	movl	%ecx, %eax
	cltd
	idivl	%ebx
	movl	%eax, %edi
	movl	%edx, %eax
	incl	%esi
	movl	%edi, %ecx
	imull	%esi, %ecx
	cltd
	idivl	%r8d
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rcx,%rax), %ebx
	incl	%ebx
	testl	%edi, %edi
	jle	LBB0_4
## %bb.3:
	incl	%edi
	callq	_min
	addl	%eax, %ebx
	jmp	LBB0_4
LBB0_1:
	movq	_HW_BLOCK_SIZE@GOTPCREL(%rip), %rsi
	movl	%ecx, %eax
	cltd
	idivl	(%rsi)
	movl	%eax, %ebx
	incl	%ebx
LBB0_4:
	movl	%ebx, (%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_MAX_FRAG_THRESHOLD,4,2 ## @IEEE80211_MAX_FRAG_THRESHOLD
	.comm	_MAX_MSDU_SECURITY_LENGTH,4,2   ## @MAX_MSDU_SECURITY_LENGTH
	.comm	_MAX_MPDU_HEADER_AND_SECURITY,4,2 ## @MAX_MPDU_HEADER_AND_SECURITY
	.comm	_HW_BLOCK_SIZE,4,2              ## @HW_BLOCK_SIZE
	.no_dead_strip	_wl1251_tx_frag_block_num
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1251_tx_frag_block_num
_wl1251_tx_frag_block_num:              ; @wl1251_tx_frag_block_num
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _IEEE80211_MAX_FRAG_THRESHOLD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_MAX_FRAG_THRESHOLD@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_cpu_to_le16
	str	w0, [x19, #8]
	ldr	w0, [x19, #4]
	bl	_le16_to_cpu
Lloh3:
	adrp	x8, _MAX_MSDU_SECURITY_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_MSDU_SECURITY_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, w0
	cmp	w8, w20
	b.le	LBB0_3
; %bb.1:
Lloh6:
	adrp	x9, _MAX_MPDU_HEADER_AND_SECURITY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX_MPDU_HEADER_AND_SECURITY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w9, w9, w20
Lloh9:
	adrp	x10, _HW_BLOCK_SIZE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _HW_BLOCK_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	sdiv	w9, w9, w10
	add	w1, w9, #1
	sdiv	w9, w8, w20
	msub	w8, w9, w20, w8
	sdiv	w8, w8, w10
	madd	w8, w9, w1, w8
	add	w20, w8, #1
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.2:
	add	w0, w9, #1
	bl	_min
	add	w20, w20, w0
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x9, _HW_BLOCK_SIZE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HW_BLOCK_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	add	w20, w8, #1
LBB0_4:
	str	w20, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_MAX_FRAG_THRESHOLD,4,2 ; @IEEE80211_MAX_FRAG_THRESHOLD
	.comm	_MAX_MSDU_SECURITY_LENGTH,4,2   ; @MAX_MSDU_SECURITY_LENGTH
	.comm	_MAX_MPDU_HEADER_AND_SECURITY,4,2 ; @MAX_MPDU_HEADER_AND_SECURITY
	.comm	_HW_BLOCK_SIZE,4,2              ; @HW_BLOCK_SIZE
	.no_dead_strip	_wl1251_tx_frag_block_num
.subsections_via_symbols
