	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netxen_setup_minidump          ## -- Begin function netxen_setup_minidump
	.p2align	4, 0x90
_netxen_setup_minidump:                 ## @netxen_setup_minidump
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netxen_get_minidump_template_size
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	%eax, %ebx
	movl	$0, (%r14)
	movq	_NX_RCODE_CMD_INVALID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_3
## %bb.2:
	movq	_NX_RCODE_CMD_NOT_IMPL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_19
LBB0_3:
	movq	40(%r14), %rdi
	movq	_NX_MD_SUPPORT_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_NX_MD_SUPPORT_MINOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NX_MD_SUPPORT_SUBVERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_19
LBB0_4:
	movl	4(%r14), %edi
	testl	%edi, %edi
	je	LBB0_5
## %bb.6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%r14, %rdi
	callq	_netxen_get_minidump_template
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	movl	%eax, %ebx
	movq	_NX_RCODE_CMD_NOT_IMPL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_12
## %bb.11:
	movl	$0, (%r14)
	jmp	LBB0_12
LBB0_5:
	movq	40(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_13:
	movq	%r14, %rdi
	callq	_netxen_check_template_checksum
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	40(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movq	8(%r14), %rdi
	callq	_kfree
	movq	$0, 8(%r14)
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_NX_DUMP_MASK_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	cmpl	$4, 4(%r14)
	jb	LBB0_18
## %bb.16:
	movq	8(%r14), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,4), %edi
	callq	___le32_to_cpu
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	movslq	4(%r14), %rax
	shrq	$2, %rax
	cmpq	%rbx, %rax
	ja	LBB0_17
LBB0_18:
	movl	$1, (%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_NX_RCODE_CMD_INVALID,4,2       ## @NX_RCODE_CMD_INVALID
	.comm	_NX_RCODE_CMD_NOT_IMPL,4,2      ## @NX_RCODE_CMD_NOT_IMPL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Flashed firmware version does not support minidump, minimum version required is [ %u.%u.%u ]\n"

	.comm	_NX_MD_SUPPORT_MAJOR,4,2        ## @NX_MD_SUPPORT_MAJOR
	.comm	_NX_MD_SUPPORT_MINOR,4,2        ## @NX_MD_SUPPORT_MINOR
	.comm	_NX_MD_SUPPORT_SUBVERSION,4,2   ## @NX_MD_SUPPORT_SUBVERSION
L_.str.1:                               ## @.str.1
	.asciz	"Error : Invalid template size ,should be non-zero.\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"Minidump template checksum Error\n"

	.comm	_NX_DUMP_MASK_DEF,4,2           ## @NX_DUMP_MASK_DEF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netxen_setup_minidump          ; -- Begin function netxen_setup_minidump
	.p2align	2
_netxen_setup_minidump:                 ; @netxen_setup_minidump
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	bl	_netxen_get_minidump_template_size
	cbz	w0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	wzr, [x19]
Lloh0:
	adrp	x8, _NX_RCODE_CMD_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NX_RCODE_CMD_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _NX_RCODE_CMD_NOT_IMPL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NX_RCODE_CMD_NOT_IMPL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	b.ne	LBB0_14
; %bb.2:
	ldr	x0, [x19, #40]
Lloh6:
	adrp	x8, _NX_MD_SUPPORT_MAJOR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NX_MD_SUPPORT_MAJOR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _NX_MD_SUPPORT_MINOR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NX_MD_SUPPORT_MINOR@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x8, _NX_MD_SUPPORT_SUBVERSION@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NX_MD_SUPPORT_SUBVERSION@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	b	LBB0_14
LBB0_3:
	ldr	w0, [x19, #4]
	cbz	w0, LBB0_8
; %bb.4:
Lloh17:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_9
; %bb.5:
	mov	x0, x19
	bl	_netxen_get_minidump_template
	cbz	w0, LBB0_11
; %bb.6:
	mov	x20, x0
Lloh20:
	adrp	x8, _NX_RCODE_CMD_NOT_IMPL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NX_RCODE_CMD_NOT_IMPL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.7:
	str	wzr, [x19]
	b	LBB0_13
LBB0_8:
	ldr	x0, [x19, #40]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _EIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_14
LBB0_11:
	mov	x0, x19
	bl	_netxen_check_template_checksum
	cbz	x0, LBB0_15
; %bb.12:
	ldr	x0, [x19, #40]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_13:
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh34:
	adrp	x8, _NX_DUMP_MASK_DEF@GOTPAGE
Lloh35:
	ldr	x8, [x8, _NX_DUMP_MASK_DEF@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	ldr	w8, [x19, #4]
	cmp	w8, #4
	b.lo	LBB0_18
; %bb.16:
	mov	x20, #0
	ldr	x21, [x19, #8]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	lsl	x22, x20, #2
	ldr	w0, [x21, x22]
	bl	___le32_to_cpu
	str	w0, [x21, x22]
	add	x20, x20, #1
	ldrsw	x8, [x19, #4]
	cmp	x20, x8, lsr #2
	b.lo	LBB0_17
LBB0_18:
	mov	w20, #0
	mov	w8, #1
	str	w8, [x19]
	stp	xzr, xzr, [x19, #16]
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_NX_RCODE_CMD_INVALID,4,2       ; @NX_RCODE_CMD_INVALID
	.comm	_NX_RCODE_CMD_NOT_IMPL,4,2      ; @NX_RCODE_CMD_NOT_IMPL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Flashed firmware version does not support minidump, minimum version required is [ %u.%u.%u ]\n"

	.comm	_NX_MD_SUPPORT_MAJOR,4,2        ; @NX_MD_SUPPORT_MAJOR
	.comm	_NX_MD_SUPPORT_MINOR,4,2        ; @NX_MD_SUPPORT_MINOR
	.comm	_NX_MD_SUPPORT_SUBVERSION,4,2   ; @NX_MD_SUPPORT_SUBVERSION
l_.str.1:                               ; @.str.1
	.asciz	"Error : Invalid template size ,should be non-zero.\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"Minidump template checksum Error\n"

	.comm	_NX_DUMP_MASK_DEF,4,2           ; @NX_DUMP_MASK_DEF
.subsections_via_symbols
