	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_sdio_hdpack
_brcmf_sdio_hdpack:                     ## @brcmf_sdio_hdpack
	.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
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdx), %esi
	movq	%r15, %rdi
	callq	_brcmf_sdio_update_hwhdr
	movq	_SDPCM_HWHDR_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	cmpq	$0, (%r14)
	je	LBB0_2
## %bb.1:
	movslq	%r12d, %r13
	movl	(%rbx), %eax
	movl	4(%rbx), %edi
	subl	%r13d, %eax
	shll	$24, %edi
	orl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, (%r15,%r13,4)
	movl	24(%rbx), %edi
	shll	$16, %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%r15,%r13,4)
	movq	_SDPCM_HWEXT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	addl	%r13d, %r12d
LBB0_2:
	movq	_SDPCM_CHANNEL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	12(%rbx), %eax
	shll	%cl, %eax
	movq	_SDPCM_CHANNEL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	16(%rbx), %edi
	orl	8(%rbx), %eax
	movq	_SDPCM_DOFFSET_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	movq	_SDPCM_DOFFSET_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edi
	orl	%eax, %edi
	callq	_cpu_to_le32
	movslq	%r12d, %rcx
	movq	%rax, (%r15,%rcx,4)
	movq	$0, 8(%r15,%rcx,4)
	movq	_SDPCM_TX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	cmpq	$1, (%r14)
	sbbq	$-1, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trace_brcmf_sdpcm_hdr          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDPCM_HWHDR_LEN,4,2            ## @SDPCM_HWHDR_LEN
	.comm	_SDPCM_HWEXT_LEN,4,2            ## @SDPCM_HWEXT_LEN
	.comm	_SDPCM_CHANNEL_SHIFT,4,2        ## @SDPCM_CHANNEL_SHIFT
	.comm	_SDPCM_CHANNEL_MASK,4,2         ## @SDPCM_CHANNEL_MASK
	.comm	_SDPCM_DOFFSET_SHIFT,4,2        ## @SDPCM_DOFFSET_SHIFT
	.comm	_SDPCM_DOFFSET_MASK,4,2         ## @SDPCM_DOFFSET_MASK
	.comm	_SDPCM_TX,8,3                   ## @SDPCM_TX
	.no_dead_strip	_brcmf_sdio_hdpack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_sdio_hdpack
_brcmf_sdio_hdpack:                     ; @brcmf_sdio_hdpack
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w1, [x2]
	mov	x0, x19
	bl	_brcmf_sdio_update_hwhdr
Lloh0:
	adrp	x8, _SDPCM_HWHDR_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDPCM_HWHDR_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	sxtw	x23, w22
	ldp	w8, w9, [x21]
	sub	w8, w8, w22
	orr	w0, w8, w9, lsl #24
	bl	_cpu_to_le32
	add	x23, x19, x23, lsl #2
	str	x0, [x23]
	ldr	w8, [x21, #24]
	lsl	w0, w8, #16
	bl	_cpu_to_le32
	str	x0, [x23, #8]
Lloh3:
	adrp	x8, _SDPCM_HWEXT_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDPCM_HWEXT_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w22, w8, w22
LBB0_2:
Lloh6:
	adrp	x8, _SDPCM_CHANNEL_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDPCM_CHANNEL_SHIFT@GOTPAGEOFF]
	ldp	w9, w10, [x21, #8]
Lloh8:
	ldr	w8, [x8]
	lsl	w8, w10, w8
Lloh9:
	adrp	x10, _SDPCM_CHANNEL_MASK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SDPCM_CHANNEL_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	and	w8, w8, w10
	orr	w8, w8, w9
	ldr	w9, [x21, #16]
Lloh12:
	adrp	x10, _SDPCM_DOFFSET_SHIFT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SDPCM_DOFFSET_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh15:
	adrp	x10, _SDPCM_DOFFSET_MASK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SDPCM_DOFFSET_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	and	w9, w9, w10
	orr	w0, w8, w9
	bl	_cpu_to_le32
	add	x8, x19, w22, sxtw #2
	stp	x0, xzr, [x8]
Lloh18:
	adrp	x8, _SDPCM_TX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SDPCM_TX@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldr	x9, [x20]
	cmp	x9, #0
	cinc	x0, x8, ne
	mov	x1, x19
	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
	b	_trace_brcmf_sdpcm_hdr
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SDPCM_HWHDR_LEN,4,2            ; @SDPCM_HWHDR_LEN
	.comm	_SDPCM_HWEXT_LEN,4,2            ; @SDPCM_HWEXT_LEN
	.comm	_SDPCM_CHANNEL_SHIFT,4,2        ; @SDPCM_CHANNEL_SHIFT
	.comm	_SDPCM_CHANNEL_MASK,4,2         ; @SDPCM_CHANNEL_MASK
	.comm	_SDPCM_DOFFSET_SHIFT,4,2        ; @SDPCM_DOFFSET_SHIFT
	.comm	_SDPCM_DOFFSET_MASK,4,2         ; @SDPCM_DOFFSET_MASK
	.comm	_SDPCM_TX,8,3                   ; @SDPCM_TX
	.no_dead_strip	_brcmf_sdio_hdpack
.subsections_via_symbols
