	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function htc_parse_trailer
_htc_parse_trailer:                     ## @htc_parse_trailer
	.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
	movq	%rcx, %r15
	movq	%rdx, %r12
	movl	(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_10
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_18
## %bb.3:
	movl	4(%rsi), %edx
	cmpl	$3, %edx
	jbe	LBB0_4
## %bb.5:
	sarl	$2, %edx
	movq	%r12, %rsi
	movl	%r8d, %ecx
	callq	_htc_proc_cred_rpt
	jmp	LBB0_19
LBB0_10:
	movl	4(%rsi), %r13d
	cmpl	$4, %r13d
	jb	LBB0_4
## %bb.11:
	movl	%r13d, %ebx
	sarl	$2, %ebx
	movq	_HTC_HOST_MAX_MSG_PER_BUNDLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_4
## %bb.12:
	testq	%r15, %r15
	je	LBB0_19
## %bb.13:
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	_ATH6KL_DBG_HTC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rcx
	movl	%r13d, %r8d
	callq	_ath6kl_dbg_dump
	xorl	%r14d, %r14d
	movl	$0, %ecx
	cmpl	$4, %r13d
	jl	LBB0_17
## %bb.14:
	cmpl	$2, %ebx
	movl	$1, %eax
	cmovgel	%ebx, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,4), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%rbx), %rdi
	movl	(%r12,%rbx), %esi
	movl	$4, %edx
	callq	_memcpy
	addq	$4, %rbx
	cmpq	%rbx, %r13
	jne	LBB0_15
## %bb.16:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_17:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	jmp	LBB0_20
LBB0_6:
	movslq	4(%rsi), %rax
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	mulq	%rcx
	shrq	$3, %rdx
	testl	%edx, %edx
	je	LBB0_4
## %bb.7:
	xorl	%r14d, %r14d
	testq	%r15, %r15
	je	LBB0_20
## %bb.8:
	movl	(%r12), %edx
	movl	4(%r12), %ecx
	movl	%ecx, %eax
	notl	%eax
	movzbl	%al, %eax
	cmpl	%eax, %edx
	jne	LBB0_20
## %bb.9:
	movq	_ATH6KL_DBG_HTC@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r9, %rbx
	callq	_ath6kl_dbg
	movl	8(%r12), %esi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_memcpy
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rcx
	movl	$4, %r8d
	callq	_ath6kl_dbg_dump
	movl	$1, (%rbx)
	jmp	LBB0_20
LBB0_4:
	movl	$1, %edi
	callq	_WARN_ON
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_20
LBB0_18:
	movl	4(%rsi), %edx
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	callq	_ath6kl_err
LBB0_19:
	xorl	%r14d, %r14d
LBB0_20:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATH6KL_DBG_HTC,4,2             ## @ATH6KL_DBG_HTC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"htc rx lk_ahd found pre_valid 0x%x post_valid 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"htc rx next look ahead"

L_.str.2:                               ## @.str.2
	.space	1

	.comm	_HTC_HOST_MAX_MSG_PER_BUNDLE,4,2 ## @HTC_HOST_MAX_MSG_PER_BUNDLE
L_.str.3:                               ## @.str.3
	.asciz	"htc rx bundle lk_ahd"

L_.str.4:                               ## @.str.4
	.asciz	"unhandled record: id:%d len:%d\n"

	.no_dead_strip	_htc_parse_trailer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function htc_parse_trailer
_htc_parse_trailer:                     ; @htc_parse_trailer
	.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	x19, x5
	mov	x20, x3
	mov	x21, x2
	ldr	w8, [x1]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_15
; %bb.3:
	ldr	w8, [x1, #4]
	cmp	w8, #3
	b.ls	LBB0_14
; %bb.4:
	asr	w2, w8, #2
	mov	x1, x21
	mov	x3, x4
	bl	_htc_proc_cred_rpt
	b	LBB0_16
LBB0_5:
	ldr	w22, [x1, #4]
	asr	w23, w22, #2
Lloh0:
	adrp	x8, _HTC_HOST_MAX_MSG_PER_BUNDLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HTC_HOST_MAX_MSG_PER_BUNDLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w22, #4
	ccmp	w23, w8, #0, hs
	b.gt	LBB0_14
; %bb.6:
	cbz	x20, LBB0_16
; %bb.7:
Lloh3:
	adrp	x8, _ATH6KL_DBG_HTC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH6KL_DBG_HTC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh8:
	adrp	x2, l_.str.2@PAGE
Lloh9:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x3, x21
	mov	x4, x22
	bl	_ath6kl_dbg_dump
	cmp	w22, #4
	b.lt	LBB0_18
; %bb.8:
	cmp	w23, #1
	csinc	w22, w23, wzr, gt
	mov	x23, x22
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21], #4
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	add	x20, x20, #4
	subs	x23, x23, #1
	b.ne	LBB0_9
	b	LBB0_19
LBB0_10:
	ldrsw	x8, [x1, #4]
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	umulh	x8, x8, x9
	lsr	x8, x8, #3
	cbz	w8, LBB0_14
; %bb.11:
	mov	w0, #0
	cbz	x20, LBB0_17
; %bb.12:
	ldp	w2, w3, [x21]
	mvn	w8, w3
	and	w8, w8, #0xff
	cmp	w2, w8
	b.ne	LBB0_17
; %bb.13:
Lloh10:
	adrp	x22, _ATH6KL_DBG_HTC@GOTPAGE
Lloh11:
	ldr	x22, [x22, _ATH6KL_DBG_HTC@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
	ldr	w1, [x21, #8]
	mov	x0, x20
	mov	w2, #4
	bl	_memcpy
	ldr	w0, [x22]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x3, x20
	mov	w4, #4
	bl	_ath6kl_dbg_dump
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_17
LBB0_14:
	mov	w0, #1
	bl	_WARN_ON
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_15:
	ldr	w2, [x1, #4]
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x8
	bl	_ath6kl_err
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	ret
LBB0_18:
	mov	w22, #0
LBB0_19:
	mov	w0, #0
	str	w22, [x19]
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATH6KL_DBG_HTC,4,2             ; @ATH6KL_DBG_HTC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"htc rx lk_ahd found pre_valid 0x%x post_valid 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"htc rx next look ahead"

l_.str.2:                               ; @.str.2
	.space	1

	.comm	_HTC_HOST_MAX_MSG_PER_BUNDLE,4,2 ; @HTC_HOST_MAX_MSG_PER_BUNDLE
l_.str.3:                               ; @.str.3
	.asciz	"htc rx bundle lk_ahd"

l_.str.4:                               ; @.str.4
	.asciz	"unhandled record: id:%d len:%d\n"

	.no_dead_strip	_htc_parse_trailer
.subsections_via_symbols
