	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_hif_dump_fw_crash
_ath6kl_hif_dump_fw_crash:              ## @ath6kl_hif_dump_fw_crash
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_REGISTER_DUMP_LEN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	$0, -52(%rbp)
	movq	_hi_failure_state@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HI_ITEM
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ath6kl_get_hi_item_addr
	movl	8(%r14), %edi
	movl	%eax, %esi
	callq	_TARG_VTOP
	leaq	-52(%rbp), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ath6kl_diag_read32
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	-52(%rbp), %edx
	testl	%edx, %edx
	je	LBB0_2
## %bb.4:
	movq	_ATH6KL_DBG_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_ath6kl_dbg
	movl	8(%r14), %edi
	movl	-52(%rbp), %esi
	callq	_TARG_VTOP
	movl	%eax, -52(%rbp)
	movq	_REGISTER_DUMP_COUNT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	shll	$2, %ecx
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_ath6kl_diag_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
LBB0_3:
	movl	%eax, %esi
	callq	_ath6kl_warn
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_ath6kl_info
	movq	(%r14), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_ath6kl_info
	movl	(%rbx), %edi
	leal	3(%rdi), %eax
	testl	%edi, %edi
	cmovnsl	%edi, %eax
	andl	$-4, %eax
	subl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_BUILD_BUG_ON
	cmpl	$0, (%rbx)
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,4), %edi
	callq	_le32_to_cpu
	movl	%eax, %r12d
	movl	4(%r15,%rbx,4), %edi
	callq	_le32_to_cpu
	movl	%eax, %r13d
	movl	8(%r15,%rbx,4), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	movl	12(%r15,%rbx,4), %edi
	callq	_le32_to_cpu
	leaq	L_.str.5(%rip), %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movq	_REGISTER_DUMP_COUNT@GOTPCREL(%rip), %r12
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_ath6kl_info
	addq	$4, %rbx
	cmpl	%ebx, (%r12)
	jg	LBB0_8
	jmp	LBB0_9
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_REGISTER_DUMP_LEN_MAX,4,2      ## @REGISTER_DUMP_LEN_MAX
	.comm	_hi_failure_state,4,2           ## @hi_failure_state
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get ptr to register dump area: %d\n"

	.comm	_ATH6KL_DBG_IRQ,4,2             ## @ATH6KL_DBG_IRQ
L_.str.1:                               ## @.str.1
	.asciz	"register dump data address 0x%x\n"

	.comm	_REGISTER_DUMP_COUNT,4,2        ## @REGISTER_DUMP_COUNT
L_.str.2:                               ## @.str.2
	.asciz	"failed to get register dump: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"crash dump:\n"

L_.str.4:                               ## @.str.4
	.asciz	"hw 0x%x fw %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"%d: 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x\n"

	.no_dead_strip	_ath6kl_hif_dump_fw_crash
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_hif_dump_fw_crash
_ath6kl_hif_dump_fw_crash:              ; @ath6kl_hif_dump_fw_crash
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _REGISTER_DUMP_LEN_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REGISTER_DUMP_LEN_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	stur	wzr, [x29, #-76]
Lloh8:
	adrp	x8, _hi_failure_state@GOTPAGE
Lloh9:
	ldr	x8, [x8, _hi_failure_state@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_HI_ITEM
	mov	x1, x0
	mov	x0, x20
	bl	_ath6kl_get_hi_item_addr
	mov	x1, x0
	ldr	w0, [x20, #8]
	bl	_TARG_VTOP
	mov	x1, x0
	sub	x2, x29, #76
	mov	x0, x20
	bl	_ath6kl_diag_read32
	ldur	w2, [x29, #-76]
	cmp	w0, #0
	ccmp	w2, #0, #4, eq
	b.ne	LBB0_2
; %bb.1:
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_warn
	b	LBB0_7
LBB0_2:
Lloh13:
	adrp	x8, _ATH6KL_DBG_IRQ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATH6KL_DBG_IRQ@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ath6kl_dbg
	ldr	w0, [x20, #8]
	ldur	w1, [x29, #-76]
	bl	_TARG_VTOP
	mov	x1, x0
	stur	w0, [x29, #-76]
Lloh18:
	adrp	x24, _REGISTER_DUMP_COUNT@GOTPAGE
Lloh19:
	ldr	x24, [x24, _REGISTER_DUMP_COUNT@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w3, w8, #2
	mov	x0, x20
	mov	x2, x19
	bl	_ath6kl_diag_read
	cbz	w0, LBB0_4
; %bb.3:
	mov	x1, x0
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ath6kl_warn
	b	LBB0_7
LBB0_4:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ath6kl_info
	ldr	x8, [x20]
	ldp	w8, w9, [x8]
	stp	x9, x8, [sp, #-16]!
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_ath6kl_info
	add	sp, sp, #16
	ldr	w8, [x24]
	negs	w9, w8
	and	w9, w9, #0x3
	and	w8, w8, #0x3
	csneg	w0, w8, w9, mi
	bl	_BUILD_BUG_ON
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x25, #0
Lloh26:
	adrp	x20, l_.str.5@PAGE
Lloh27:
	add	x20, x20, l_.str.5@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x26, x19, x25, lsl #2
	ldr	w0, [x26]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	w0, [x26, #4]
	bl	_le32_to_cpu
	mov	x22, x0
	ldr	w0, [x26, #8]
	bl	_le32_to_cpu
	mov	x23, x0
	ldr	w0, [x26, #12]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	sub	sp, sp, #48
	stp	x23, x0, [sp, #24]
	stp	x21, x22, [sp, #8]
	str	x25, [sp]
	mov	x0, x20
	bl	_ath6kl_info
	add	sp, sp, #48
	add	x25, x25, #4
	ldr	w8, [x24]
	cmp	w8, w25
	b.gt	LBB0_6
LBB0_7:
	ldur	x8, [x29, #-72]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_REGISTER_DUMP_LEN_MAX,4,2      ; @REGISTER_DUMP_LEN_MAX
	.comm	_hi_failure_state,4,2           ; @hi_failure_state
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get ptr to register dump area: %d\n"

	.comm	_ATH6KL_DBG_IRQ,4,2             ; @ATH6KL_DBG_IRQ
l_.str.1:                               ; @.str.1
	.asciz	"register dump data address 0x%x\n"

	.comm	_REGISTER_DUMP_COUNT,4,2        ; @REGISTER_DUMP_COUNT
l_.str.2:                               ; @.str.2
	.asciz	"failed to get register dump: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"crash dump:\n"

l_.str.4:                               ; @.str.4
	.asciz	"hw 0x%x fw %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"%d: 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x\n"

	.no_dead_strip	_ath6kl_hif_dump_fw_crash
.subsections_via_symbols
