	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_read_fwlogs             ## -- Begin function ath6kl_read_fwlogs
	.p2align	4, 0x90
_ath6kl_read_fwlogs:                    ## @ath6kl_read_fwlogs
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_ATH6KL_FWLOG_PAYLOAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r14
	movl	(%r13), %ebx
	movq	_hi_dbglog_hdr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HI_ITEM
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_ath6kl_get_hi_item_addr
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_TARG_VTOP
	leaq	-88(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_ath6kl_diag_read32
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_2:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	-88(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.6:
	movl	(%r13), %edi
	callq	_TARG_VTOP
	leaq	-112(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	$20, %ecx
	callq	_ath6kl_diag_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.7:
	movl	(%r13), %ebx
	movl	-96(%rbp), %edi
	callq	_le32_to_cpu
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_TARG_VTOP
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movl	$20, %ecx
	callq	_ath6kl_diag_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.8:
	movl	$-99, %r15d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %ebx
	movl	-52(%rbp), %edi
	callq	_le32_to_cpu
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_TARG_VTOP
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	-56(%rbp), %edi
	callq	_le32_to_cpu
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rbx
	movl	-56(%rbp), %edi
	callq	_le32_to_cpu
	movq	%rax, %r12
	movl	-60(%rbp), %edi
	callq	_le32_to_cpu
	cmpq	%rax, %r12
	jg	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_ALIGN
	movq	%rax, %r12
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	movl	%r12d, %ecx
	callq	_ath6kl_diag_read
	testl	%eax, %eax
	jne	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_ath6kl_debug_fwlog_event
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r13), %ebx
	movl	-64(%rbp), %edi
	callq	_le32_to_cpu
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_TARG_VTOP
	movq	%rax, %r12
	movq	%r13, %rdi
	movq	%rax, %rsi
	leaq	-64(%rbp), %rdx
	movl	$20, %ecx
	callq	_ath6kl_diag_read
	testl	%eax, %eax
	jne	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%edi, %edi
	testl	%r15d, %r15d
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	%r15d
	xorl	%ebx, %ebx
	cmpq	-72(%rbp), %r12                 ## 8-byte Folded Reload
	jne	LBB0_9
	jmp	LBB0_2
LBB0_16:
	leaq	L_.str(%rip), %rdi
	callq	_ath6kl_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_17:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_2
LBB0_20:
	movl	%eax, %ebx
	jmp	LBB0_2
LBB0_19:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_FWLOG_PAYLOAD_SIZE,4,2  ## @ATH6KL_FWLOG_PAYLOAD_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_hi_dbglog_hdr,4,2              ## @hi_dbglog_hdr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid address for debug_hdr_addr\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_read_fwlogs             ; -- Begin function ath6kl_read_fwlogs
	.p2align	2
_ath6kl_read_fwlogs:                    ; @ath6kl_read_fwlogs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _ATH6KL_FWLOG_PAYLOAD_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH6KL_FWLOG_PAYLOAD_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w21, [x20]
Lloh6:
	adrp	x8, _hi_dbglog_hdr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _hi_dbglog_hdr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_HI_ITEM
	mov	x1, x0
	mov	x0, x20
	bl	_ath6kl_get_hi_item_addr
	mov	x1, x0
	mov	x0, x21
	bl	_TARG_VTOP
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x20
	bl	_ath6kl_diag_read32
	mov	x22, x0
	cbz	w0, LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_kfree
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_4:
	mov	x0, x22
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_5:
	ldr	x1, [sp, #8]
	cbz	x1, LBB0_16
; %bb.6:
	ldr	w0, [x20]
	bl	_TARG_VTOP
	mov	x1, x0
	add	x2, sp, #40
	mov	x0, x20
	mov	w3, #20
	bl	_ath6kl_diag_read
	mov	x22, x0
	cbnz	w0, LBB0_2
; %bb.7:
	ldr	w21, [x20]
	ldr	w0, [sp, #56]
	bl	_le32_to_cpu
	mov	x1, x0
	mov	x0, x21
	bl	_TARG_VTOP
	mov	x21, x0
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x21
	mov	w3, #20
	bl	_ath6kl_diag_read
	mov	x22, x0
	cbnz	w0, LBB0_2
; %bb.8:
	mov	w25, #-99
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x20]
	ldr	w0, [sp, #28]
	bl	_le32_to_cpu
	mov	x1, x0
	mov	x0, x22
	bl	_TARG_VTOP
	mov	x22, x0
	ldr	w0, [sp, #24]
	bl	_le32_to_cpu
	cbz	x0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, x0
	ldr	w0, [sp, #24]
	bl	_le32_to_cpu
	mov	x24, x0
	ldr	w0, [sp, #20]
	bl	_le32_to_cpu
	cmp	x24, x0
	b.gt	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x23
	mov	w1, #4
	bl	_ALIGN
	mov	x23, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	mov	x3, x23
	bl	_ath6kl_diag_read
	cbnz	w0, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_ath6kl_debug_fwlog_event
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w22, [x20]
	ldr	w0, [sp, #16]
	bl	_le32_to_cpu
	mov	x1, x0
	mov	x0, x22
	bl	_TARG_VTOP
	mov	x23, x0
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x23
	mov	w3, #20
	bl	_ath6kl_diag_read
	cbnz	w0, LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w25, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w22, #0
	add	w25, w25, #1
	cmp	x23, x21
	b.ne	LBB0_9
	b	LBB0_2
LBB0_16:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_warn
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_2
LBB0_18:
	mov	x22, x0
	b	LBB0_2
LBB0_19:
Lloh16:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_FWLOG_PAYLOAD_SIZE,4,2  ; @ATH6KL_FWLOG_PAYLOAD_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_hi_dbglog_hdr,4,2              ; @hi_dbglog_hdr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid address for debug_hdr_addr\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
