	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlcore_event_fw_logger         ## -- Begin function wlcore_event_fw_logger
	.p2align	4, 0x90
_wlcore_event_fw_logger:                ## @wlcore_event_fw_logger
	.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, %r15
	movq	_WL18XX_DATA_RAM_BASE_ADDRESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_WL18XX_LOGGER_SDIO_BUFF_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_WL18XX_LOGGER_BUFF_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_WL18XX_LOGGER_SDIO_BUFF_MAX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	(%rbx), %ecx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	xorl	%r8d, %r8d
	callq	_wlcore_read
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%r12, %rbx
	leaq	-88(%rbp), %rdi
	movq	%r13, %rsi
	movl	$32, %edx
	callq	_memcpy
	movq	-88(%rbp), %rdi
	callq	_le32_to_cpu
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:
	movq	-88(%rbp), %rdi
	callq	_le32_to_cpu
	cltq
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rdi
	callq	_le32_to_cpu
	cltq
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	addq	%rbx, %r12
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, %r15
	subq	%r12, %r15
	movq	-64(%rbp), %rdi
	callq	_le32_to_cpu
	movslq	%eax, %rbx
	movq	-72(%rbp), %rdi
	callq	_le32_to_cpu
	cltq
	addq	%r12, %r14
	addq	%rbx, %r14
	subq	%rax, %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_min
	movq	%rax, %rbx
	leaq	(,%r15,4), %rsi
	addq	%r13, %rsi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_wl12xx_copy_fwlog
	movq	-88(%rbp), %rdi
	callq	_le32_to_cpu
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-88(%rbp), %rdi
	callq	_le32_to_cpu
	movslq	%eax, %r14
	cmpq	%r14, %rbx
	jne	LBB0_7
## %bb.6:
	movslq	-48(%rbp), %r12                 ## 4-byte Folded Reload
	addq	-96(%rbp), %r12                 ## 8-byte Folded Reload
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_wl1271_error
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movq	%rax, %rdi
	movq	%rax, -88(%rbp)
	jmp	LBB0_12
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wl1271_error
	xorl	%edi, %edi
	callq	_cpu_to_le32
	movq	%rax, -88(%rbp)
	jmp	LBB0_11
LBB0_7:
	subq	%rbx, %r14
	movq	_WL18XX_LOGGER_BUFF_OFFSET@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	leaq	(,%rax,4), %rsi
	addq	%r13, %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_wl12xx_copy_fwlog
	addq	%r14, %r12
	addq	(%rbx), %r12
LBB0_8:
	movq	-80(%rbp), %rdi
	callq	_le32_to_cpu
	cltq
	cmpq	%rax, %r12
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_10
## %bb.9:
	movq	-80(%rbp), %rdi
	callq	_le32_to_cpu
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_wl1271_error
LBB0_10:
	movq	_WL18XX_LOGGER_READ_POINT_OFFSET@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	-80(%rbp), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_wlcore_write32
LBB0_11:
	movq	%r13, %rdi
	callq	_kfree
	movq	-88(%rbp), %rdi
LBB0_12:
	callq	_le32_to_cpu
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WL18XX_DATA_RAM_BASE_ADDRESS,8,3 ## @WL18XX_DATA_RAM_BASE_ADDRESS
	.comm	_WL18XX_LOGGER_SDIO_BUFF_ADDR,8,3 ## @WL18XX_LOGGER_SDIO_BUFF_ADDR
	.comm	_WL18XX_LOGGER_BUFF_OFFSET,8,3  ## @WL18XX_LOGGER_BUFF_OFFSET
	.comm	_WL18XX_LOGGER_SDIO_BUFF_MAX,4,2 ## @WL18XX_LOGGER_SDIO_BUFF_MAX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fail to allocate fw logger memory"

L_.str.1:                               ## @.str.1
	.asciz	"Fail to read logger buffer, error_id = %d"

L_.str.2:                               ## @.str.2
	.asciz	"Calculate of clear addr Clear = %x, write = %x"

	.comm	_WL18XX_LOGGER_READ_POINT_OFFSET,8,3 ## @WL18XX_LOGGER_READ_POINT_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlcore_event_fw_logger         ; -- Begin function wlcore_event_fw_logger
	.p2align	2
_wlcore_event_fw_logger:                ; @wlcore_event_fw_logger
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
Lloh0:
	adrp	x8, _WL18XX_DATA_RAM_BASE_ADDRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WL18XX_DATA_RAM_BASE_ADDRESS@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x8, _WL18XX_LOGGER_SDIO_BUFF_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WL18XX_LOGGER_SDIO_BUFF_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	x21, [x8]
Lloh6:
	adrp	x24, _WL18XX_LOGGER_BUFF_OFFSET@GOTPAGE
Lloh7:
	ldr	x24, [x24, _WL18XX_LOGGER_BUFF_OFFSET@GOTPAGEOFF]
	ldr	x25, [x24]
Lloh8:
	adrp	x22, _WL18XX_LOGGER_SDIO_BUFF_MAX@GOTPAGE
Lloh9:
	ldr	x22, [x22, _WL18XX_LOGGER_SDIO_BUFF_MAX@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh10:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w3, [x22]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	w4, #0
	bl	_wlcore_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_6
; %bb.2:
	add	x0, sp, #16
	mov	x1, x19
	mov	w2, #32
	bl	_memcpy
	ldr	x0, [sp, #16]
	bl	_le32_to_cpu
	cbz	w0, LBB0_11
; %bb.3:
	ldr	x0, [sp, #16]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x22, w0
	ldr	x0, [sp, #32]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x27, w0
	add	x26, x21, x23
	sub	x28, x27, x26
	ldr	x0, [sp, #40]
	bl	_le32_to_cpu
	mov	x23, x0
	ldr	x0, [sp, #32]
	bl	_le32_to_cpu
	add	x8, x26, x25
	add	x8, x8, w23, sxtw
	sub	x1, x8, w0, sxtw
	mov	x0, x22
	bl	_min
	mov	x22, x0
	add	x1, x19, x28, lsl #2
	mov	x0, x20
	mov	x2, x22
	bl	_wl12xx_copy_fwlog
	ldr	x0, [sp, #16]
	bl	_le32_to_cpu
	mov	x23, x0
	ldr	x0, [sp, #16]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x22, x8
	b.ne	LBB0_7
; %bb.4:
	add	x22, x27, w23, sxtw
	b	LBB0_8
LBB0_5:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_wl1271_error
	mov	w0, #0
	bl	_cpu_to_le32
	str	x0, [sp, #16]
	b	LBB0_12
LBB0_6:
	str	x0, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_wl1271_error
	mov	w0, #0
	bl	_cpu_to_le32
	str	x0, [sp, #16]
	b	LBB0_11
LBB0_7:
	sub	x22, x8, x22
	ldr	x8, [x24]
	add	x1, x19, x8, lsl #2
	mov	x0, x20
	mov	x2, x22
	bl	_wl12xx_copy_fwlog
	ldr	x8, [x24]
	add	x9, x26, x22
	add	x22, x9, x8
LBB0_8:
	ldr	x0, [sp, #24]
	bl	_le32_to_cpu
	cmp	x22, w0, sxtw
	b.eq	LBB0_10
; %bb.9:
	ldr	x0, [sp, #24]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_wl1271_error
LBB0_10:
Lloh19:
	adrp	x8, _WL18XX_LOGGER_READ_POINT_OFFSET@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WL18XX_LOGGER_READ_POINT_OFFSET@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	add	x1, x8, x21
	ldr	x2, [sp, #24]
	mov	x0, x20
	bl	_wlcore_write32
LBB0_11:
	mov	x0, x19
	bl	_kfree
	ldr	x0, [sp, #16]
LBB0_12:
	bl	_le32_to_cpu
	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
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_WL18XX_DATA_RAM_BASE_ADDRESS,8,3 ; @WL18XX_DATA_RAM_BASE_ADDRESS
	.comm	_WL18XX_LOGGER_SDIO_BUFF_ADDR,8,3 ; @WL18XX_LOGGER_SDIO_BUFF_ADDR
	.comm	_WL18XX_LOGGER_BUFF_OFFSET,8,3  ; @WL18XX_LOGGER_BUFF_OFFSET
	.comm	_WL18XX_LOGGER_SDIO_BUFF_MAX,4,2 ; @WL18XX_LOGGER_SDIO_BUFF_MAX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fail to allocate fw logger memory"

l_.str.1:                               ; @.str.1
	.asciz	"Fail to read logger buffer, error_id = %d"

l_.str.2:                               ; @.str.2
	.asciz	"Calculate of clear addr Clear = %x, write = %x"

	.comm	_WL18XX_LOGGER_READ_POINT_OFFSET,8,3 ; @WL18XX_LOGGER_READ_POINT_OFFSET
.subsections_via_symbols
