	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_write_template_common
_b43_write_template_common:             ## @b43_write_template_common
	.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	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	$0, -56(%rbp)
	movslq	%edx, %r14
	movq	_FCS_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r14, %rsi
	leaq	-56(%rbp), %rdi
	movq	%r9, %rdx
	callq	_b43_generate_plcp_hdr
	movq	-56(%rbp), %rdi
	callq	_le32_to_cpu
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_b43_ram_write
	leal	4(%r12), %esi
	movl	(%r13), %eax
	movl	8(%r13), %edx
	shll	$16, %eax
	shll	$24, %edx
	orl	%eax, %edx
	movq	%r15, %rdi
	callq	_b43_ram_write
	cmpl	$3, %r14d
	jl	LBB0_9
## %bb.1:
	movl	$8, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	(%r12,%r14), %esi
	movq	%r15, %rdi
	callq	_b43_ram_write
	leal	4(%r14), %eax
	addl	$-2, %r14d
	cmpl	%ebx, %r14d
	movl	%eax, %r14d
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	-6(%r14), %eax
	cltq
	movl	(%r13,%rax,8), %edx
	leal	-5(%r14), %eax
	cmpl	%ebx, %eax
	jge	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cltq
	movl	(%r13,%rax,8), %eax
	shll	$8, %eax
	orl	%eax, %edx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	-4(%r14), %eax
	cmpl	%ebx, %eax
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cltq
	movl	(%r13,%rax,8), %eax
	shll	$16, %eax
	orl	%eax, %edx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	-3(%r14), %eax
	cmpl	%ebx, %eax
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cltq
	movl	(%r13,%rax,8), %eax
	shll	$24, %eax
	orl	%eax, %edx
	jmp	LBB0_8
LBB0_9:
	movq	_B43_SHM_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$4, %ebx
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	callq	_b43_shm_write16
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FCS_LEN,8,3                    ## @FCS_LEN
	.comm	_B43_SHM_SHARED,4,2             ## @B43_SHM_SHARED
	.no_dead_strip	_b43_write_template_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43_write_template_common
_b43_write_template_common:             ; @b43_write_template_common
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x20, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _FCS_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FCS_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x1, x8, w2, sxtw
	add	x0, sp, #8
	mov	x2, x5
	bl	_b43_generate_plcp_hdr
	ldr	x0, [sp, #8]
	bl	_le32_to_cpu
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_b43_ram_write
	add	w1, w22, #4
	ldr	w8, [x23]
	ldr	w9, [x23, #8]
	lsl	w9, w9, #24
	orr	w2, w9, w8, lsl #16
	mov	x0, x20
	bl	_b43_ram_write
	cmp	w21, #3
	b.lt	LBB0_9
; %bb.1:
	mov	w24, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w1, w22, w24
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_b43_ram_write
	sub	w8, w24, #2
	add	w24, w24, #4
	cmp	w8, w21
	b.ge	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w24, #6
	ldr	x2, [x23, w8, sxtw #3]
	sub	w8, w24, #5
	cmp	w8, w21
	b.ge	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23, w8, sxtw #3]
	orr	w2, w2, w8, lsl #8
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w8, w24, #4
	cmp	w8, w21
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23, w8, sxtw #3]
	orr	w2, w2, w8, lsl #16
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w8, w24, #3
	cmp	w8, w21
	b.ge	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23, w8, sxtw #3]
	orr	w2, w2, w8, lsl #24
	b	LBB0_2
LBB0_9:
Lloh3:
	adrp	x8, _B43_SHM_SHARED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B43_SHM_SHARED@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	w3, w21, #4
	mov	x0, x20
	mov	x2, x19
	bl	_b43_shm_write16
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FCS_LEN,8,3                    ; @FCS_LEN
	.comm	_B43_SHM_SHARED,4,2             ; @B43_SHM_SHARED
	.no_dead_strip	_b43_write_template_common
.subsections_via_symbols
