	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_alloc_error_log
_ipw_alloc_error_log:                   ## @ipw_alloc_error_log
	.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	%rdi, %r13
	callq	_ipw_get_event_log_len
	movl	%eax, %r15d
	movq	_IPW_ERROR_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ipw_read32
	movl	%eax, %r14d
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_ipw_read_reg32
	movslq	%eax, %r12
	leaq	(,%r12,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leal	(%rax,%r15,4), %edi
	addl	$48, %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movl	4(%r13), %eax
	movl	%eax, 36(%rbx)
	movl	(%r13), %eax
	movl	%eax, 32(%rbx)
	movl	%r12d, (%rbx)
	movl	%r15d, 4(%rbx)
	movq	24(%rbx), %rax
	movq	%rax, 8(%rbx)
	leaq	(%rax,%r12,4), %rdx
	movq	%rdx, 16(%rbx)
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_ipw_capture_event_log
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.3:
	addl	$4, %r14d
	movq	8(%rbx), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_ipw_read_indirect
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_IPW_ERROR
LBB0_4:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPW_ERROR_LOG,4,2              ## @IPW_ERROR_LOG
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Memory allocation for firmware error log failed.\n"

	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_ipw_alloc_error_log
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_alloc_error_log
_ipw_alloc_error_log:                   ; @ipw_alloc_error_log
	.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, x0
	bl	_ipw_get_event_log_len
	mov	x20, x0
Lloh0:
	adrp	x8, _IPW_ERROR_LOG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPW_ERROR_LOG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ipw_read32
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_ipw_read_reg32
	mov	x24, x0
	sbfiz	x23, x24, #2, #32
	add	w8, w23, w20, lsl #2
	add	w0, w8, #48
Lloh3:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	mov	x22, x0
	cbz	x0, LBB0_3
; %bb.1:
	sxtw	x8, w24
Lloh6:
	adrp	x9, _jiffies@GOTPAGE
Lloh7:
	ldr	x9, [x9, _jiffies@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x22, #40]
	ldr	d0, [x19]
	str	d0, [x22, #32]
	stp	w24, w20, [x22]
	ldr	x9, [x22, #24]
	add	x2, x9, x8, lsl #2
	stp	x9, x2, [x22, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_ipw_capture_event_log
	cbz	w24, LBB0_4
; %bb.2:
	add	w1, w21, #4
	ldr	x2, [x22, #8]
	mov	x0, x19
	mov	x3, x23
	bl	_ipw_read_indirect
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_ERROR
LBB0_4:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IPW_ERROR_LOG,4,2              ; @IPW_ERROR_LOG
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Memory allocation for firmware error log failed.\n"

	.comm	_jiffies,4,2                    ; @jiffies
	.no_dead_strip	_ipw_alloc_error_log
.subsections_via_symbols
