	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_fw_cmd_get_minidump_temp ## -- Begin function qlcnic_fw_cmd_get_minidump_temp
	.p2align	4, 0x90
_qlcnic_fw_cmd_get_minidump_temp:       ## @qlcnic_fw_cmd_get_minidump_temp
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	8(%rdi), %r14
	leaq	-48(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	callq	_qlcnic_fw_get_minidump_temp_size
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_2:
	movq	-32(%rbp), %rdi
	callq	_vzalloc
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r15
	cmpq	$0, -40(%rbp)
	jne	LBB0_5
## %bb.4:
	movq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	___qlcnic_fw_cmd_get_minidump_temp
	testl	%eax, %eax
	je	LBB0_8
LBB0_5:
	movq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_qlcnic_fw_flash_get_minidump_temp
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movq	(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_8:
	movq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	_qlcnic_temp_checksum
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movq	(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_10:
	movq	24(%r14), %rdi
	callq	_vfree
	movq	$0, 24(%r14)
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_qlcnic_cache_tmpl_hdr_values
	cmpl	$0, (%r14)
	je	LBB0_18
## %bb.15:
	movq	$0, 8(%r14)
	movq	(%rbx), %rdi
	movq	_QLC_PEX_DMA_READ_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	16(%r14), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	%rax, 8(%r14)
	jmp	LBB0_18
LBB0_17:
	movl	$0, (%r14)
LBB0_18:
	movq	(%rbx), %rdi
	movl	4(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_info
	movq	%rbx, %rdi
	callq	_qlcnic_enable_fw_dump_state
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't get template size %d\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Failed to get minidump template header %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Template header checksum validation failed\n"

	.comm	_QLC_PEX_DMA_READ_SIZE,4,2      ## @QLC_PEX_DMA_READ_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.3:                               ## @.str.3
	.asciz	"Default minidump capture mask 0x%x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_fw_cmd_get_minidump_temp ; -- Begin function qlcnic_fw_cmd_get_minidump_temp
	.p2align	2
_qlcnic_fw_cmd_get_minidump_temp:       ; @qlcnic_fw_cmd_get_minidump_temp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x0
	stp	xzr, xzr, [sp, #8]
	ldr	x19, [x0, #8]
	add	x1, sp, #24
	add	x2, sp, #8
	add	x3, sp, #16
	bl	_qlcnic_fw_get_minidump_temp_size
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x20]
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_dev_err
	b	LBB0_11
LBB0_2:
	ldr	x0, [sp, #8]
	bl	_vzalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
	ldr	x8, [sp, #16]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	x2, [sp, #8]
	mov	x0, x20
	mov	x1, x21
	bl	___qlcnic_fw_cmd_get_minidump_temp
	cbz	w0, LBB0_8
LBB0_5:
	ldr	x2, [sp, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_qlcnic_fw_flash_get_minidump_temp
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.6:
	ldr	x8, [x20]
	str	x0, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	b	LBB0_10
LBB0_7:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
	ldr	x1, [sp, #8]
	mov	x0, x21
	bl	_qlcnic_temp_checksum
	cbz	x0, LBB0_14
; %bb.9:
	ldr	x0, [x20]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	bl	_dev_err
	ldr	x0, [x19, #24]
	bl	_vfree
	str	xzr, [x19, #24]
LBB0_11:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	add	sp, sp, #80
	ret
LBB0_14:
	mov	x0, x20
	mov	x1, x19
	bl	_qlcnic_cache_tmpl_hdr_values
	ldr	w8, [x19]
	cbz	w8, LBB0_18
; %bb.15:
	str	xzr, [x19, #8]
Lloh10:
	adrp	x8, _QLC_PEX_DMA_READ_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _QLC_PEX_DMA_READ_SIZE@GOTPAGEOFF]
	ldr	x0, [x20]
Lloh12:
	ldr	w1, [x8]
	add	x2, x19, #16
Lloh13:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_17
; %bb.16:
	str	x0, [x19, #8]
	b	LBB0_18
LBB0_17:
	str	wzr, [x19]
LBB0_18:
	ldr	x0, [x20]
	ldr	w2, [x19, #4]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
	mov	x0, x20
	bl	_qlcnic_enable_fw_dump_state
	mov	w0, #0
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't get template size %d\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Failed to get minidump template header %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Template header checksum validation failed\n"

	.comm	_QLC_PEX_DMA_READ_SIZE,4,2      ; @QLC_PEX_DMA_READ_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.3:                               ; @.str.3
	.asciz	"Default minidump capture mask 0x%x\n"

.subsections_via_symbols
