	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_83xx_copy_fw_file
_qlcnic_83xx_copy_fw_file:              ## @qlcnic_83xx_copy_fw_file
	.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	$136, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rdi), %rdi
	movq	_QLCNIC_FW_IMAGE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_QLCRDX
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	(%rax), %rax
	movslq	(%rax), %rbx
	andq	$-16, %rbx
	movq	8(%rax), %rdx
	movl	%ebx, %ecx
	sarl	$4, %ecx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_qlcnic_83xx_ms_mem_write128
	testl	%eax, %eax
	je	LBB0_2
LBB0_1:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	(%r15), %rax
	movq	(%rax), %rdi
	callq	_release_firmware
	movq	(%r15), %rax
	movq	$0, (%rax)
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_2:
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movl	(%rdi), %r9d
	andl	$15, %r9d
	testq	%r9, %r9
	je	LBB0_12
## %bb.3:
	movq	8(%rdi), %r8
	leaq	-1(%r9), %rdx
	movl	%r9d, %ecx
	andl	$3, %ecx
	cmpq	$3, %rdx
	jae	LBB0_5
## %bb.4:
	xorl	%esi, %esi
	jmp	LBB0_7
LBB0_5:
	movl	%r9d, %edi
	andl	$-4, %edi
	leaq	(%r8,%rbx,8), %rdx
	addq	$24, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-24(%rdx,%rsi,8), %rax
	movq	%rax, -160(%rbp,%rsi,8)
	movq	-16(%rdx,%rsi,8), %rax
	movq	%rax, -152(%rbp,%rsi,8)
	movq	-8(%rdx,%rsi,8), %rax
	movq	%rax, -144(%rbp,%rsi,8)
	movq	(%rdx,%rsi,8), %rax
	movq	%rax, -136(%rbp,%rsi,8)
	addq	$4, %rsi
	cmpq	%rsi, %rdi
	jne	LBB0_6
LBB0_7:
	addq	%rbx, %r14
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.8:
	leaq	-160(,%rsi,8), %rdx
	addq	%rbp, %rdx
	addq	%rsi, %rbx
	leaq	(%r8,%rbx,8), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi,%rdi,8), %rax
	movq	%rax, (%rdx,%rdi,8)
	incq	%rdi
	cmpq	%rdi, %rcx
	jne	LBB0_9
LBB0_10:
	leaq	-160(,%r9,8), %rdi
	addq	%rbp, %rdi
	leal	(,%r9,8), %eax
	movl	$128, %esi
	subl	%eax, %esi
	callq	___bzero
	leaq	-160(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	_qlcnic_83xx_ms_mem_write128
	testl	%eax, %eax
	jne	LBB0_1
## %bb.11:
	movq	(%r15), %rax
	movq	(%rax), %rdi
LBB0_12:
	callq	_release_firmware
	movq	(%r15), %rax
	movq	$0, (%rax)
	xorl	%eax, %eax
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_15
## %bb.14:
	addq	$136, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_QLCNIC_FW_IMAGE_ADDR,4,2       ## @QLCNIC_FW_IMAGE_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MS memory write failed\n"

	.no_dead_strip	_qlcnic_83xx_copy_fw_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_83xx_copy_fw_file
_qlcnic_83xx_copy_fw_file:              ; @qlcnic_83xx_copy_fw_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x0, [x0]
Lloh3:
	adrp	x8, _QLCNIC_FW_IMAGE_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QLCNIC_FW_IMAGE_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_QLCRDX
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldrsw	x9, [x8]
	and	x21, x9, #0xfffffffffffffff0
	ldr	x2, [x8, #8]
	asr	w3, w21, #4
	mov	x0, x19
	mov	x1, x20
	bl	_qlcnic_83xx_ms_mem_write128
	cbz	w0, LBB0_2
LBB0_1:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_release_firmware
	ldr	x8, [x19]
	str	xzr, [x8]
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_2:
	ldr	x8, [x19]
	ldr	x0, [x8]
	ldr	w8, [x0]
	and	x8, x8, #0xf
	cbz	w8, LBB0_7
; %bb.3:
	add	x20, x20, x21
	ldr	x9, [x0, #8]
	add	x9, x9, x21, lsl #3
	add	x10, sp, #8
	mov	x11, x8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9], #8
	str	x12, [x10], #8
	subs	x11, x11, #1
	b.ne	LBB0_4
; %bb.5:
	add	x9, sp, #8
	add	x0, x9, x8, lsl #3
	mov	w9, #128
	sub	w1, w9, w8, lsl #3
	bl	_bzero
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_qlcnic_83xx_ms_mem_write128
	cbnz	w0, LBB0_1
; %bb.6:
	ldr	x8, [x19]
	ldr	x0, [x8]
LBB0_7:
	bl	_release_firmware
	mov	w0, #0
	ldr	x8, [x19]
	str	xzr, [x8]
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_QLCNIC_FW_IMAGE_ADDR,4,2       ; @QLCNIC_FW_IMAGE_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MS memory write failed\n"

	.no_dead_strip	_qlcnic_83xx_copy_fw_file
.subsections_via_symbols
