	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_generate_plcp_hdr    ## -- Begin function b43legacy_generate_plcp_hdr
	.p2align	4, 0x90
_b43legacy_generate_plcp_hdr:           ## @b43legacy_generate_plcp_hdr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movl	%edx, %edi
	callq	_b43legacy_is_ofdm_rate
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%r15d, %edi
	callq	_b43legacy_plcp_get_ratecode_ofdm
	movl	%eax, %r15d
	movl	%ebx, %edi
	andl	$61440, %edi                    ## imm = 0xF000
	callq	_B43legacy_WARN_ON
	shll	$5, %ebx
	orl	%r15d, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movl	%eax, 8(%r14)
	jmp	LBB0_7
LBB0_2:
	movl	%ebx, %eax
	shll	$4, %eax
	cltd
	idivl	%r15d
	movl	$4, %ecx
	testl	%edx, %edx
	jle	LBB0_6
## %bb.3:
	incl	%eax
	movq	_B43legacy_CCK_RATE_11MB@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	jne	LBB0_6
## %bb.4:
	shll	$3, %ebx
	movslq	%ebx, %rdx
	imulq	$780903145, %rdx, %rsi          ## imm = 0x2E8BA2E9
	movq	%rsi, %rdi
	shrq	$63, %rdi
	sarq	$33, %rsi
	addl	%edi, %esi
	leal	(%rsi,%rsi,4), %edi
	leal	(%rsi,%rdi,2), %esi
	subl	%esi, %edx
	cmpl	$4, %edx
	jge	LBB0_6
## %bb.5:
	movl	$132, %ecx
LBB0_6:
	movl	%ecx, 4(%r12)
	shll	$16, %eax
	movl	%eax, %edi
	callq	_cpu_to_le32
	orl	%eax, 8(%r14)
	movl	%r15d, %edi
	callq	_b43legacy_plcp_get_ratecode_cck
	movl	%eax, (%r12)
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_CCK_RATE_11MB,4,2    ## @B43legacy_CCK_RATE_11MB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_generate_plcp_hdr    ; -- Begin function b43legacy_generate_plcp_hdr
	.p2align	2
_b43legacy_generate_plcp_hdr:           ; @b43legacy_generate_plcp_hdr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0]
	mov	x0, x2
	bl	_b43legacy_is_ofdm_rate
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_b43legacy_plcp_get_ratecode_ofdm
	mov	x20, x0
	and	w0, w21, #0xf000
	bl	_B43legacy_WARN_ON
	orr	w0, w20, w21, lsl #5
	bl	_cpu_to_le32
	str	w0, [x19, #8]
	b	LBB0_8
LBB0_2:
	lsl	w9, w21, #4
	sdiv	w8, w9, w20
	msub	w9, w8, w20, w9
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.3:
	add	w8, w8, #1
Lloh0:
	adrp	x9, _B43legacy_CCK_RATE_11MB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _B43legacy_CCK_RATE_11MB@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w20
	b.ne	LBB0_6
; %bb.4:
	lsl	w9, w21, #3
	mov	w10, #41705
	movk	w10, #11915, lsl #16
	smull	x10, w9, w10
	lsr	x11, x10, #63
	asr	x10, x10, #33
	add	w10, w10, w11
	mov	w11, #11
	msub	w9, w10, w11, w9
	cmp	w9, #4
	b.ge	LBB0_6
; %bb.5:
	mov	w9, #132
	b	LBB0_7
LBB0_6:
	mov	w9, #4
LBB0_7:
	str	w9, [x22, #4]
	lsl	w0, w8, #16
	bl	_cpu_to_le32
	ldr	w8, [x19, #8]
	orr	w8, w8, w0
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_b43legacy_plcp_get_ratecode_cck
	str	w0, [x22]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_CCK_RATE_11MB,4,2    ; @B43legacy_CCK_RATE_11MB
.subsections_via_symbols
