	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movq	(%rbx), %r15
	movl	(%r15), %edi
	callq	_vzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, -184(%rbp)                ## 8-byte Spill
	cmpl	$8, (%r15)
	jb	LBB0_5
## %bb.3:
	movq	8(%r15), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,4), %edi
	callq	___le32_to_cpu
	movq	%rax, (%r14,%rbx,8)
	incq	%rbx
	movslq	(%r15), %rax
	shrq	$3, %rax
	cmpq	%rbx, %rax
	ja	LBB0_4
LBB0_5:
	movq	8(%r13), %rdi
	movq	_QLCNIC_FW_IMAGE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_QLCRDX
	movq	%rax, %rbx
	movslq	(%r15), %r12
	andq	$-16, %r12
	movl	%r12d, %ecx
	sarl	$4, %ecx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_qlcnic_ms_mem_write128
	movq	%r13, %rcx
	testl	%eax, %eax
	je	LBB0_6
LBB0_17:
	movl	%eax, %r13d
	movq	(%rcx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_18
LBB0_1:
	movq	%r15, %rdi
	callq	_release_firmware
	movq	$0, (%rbx)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_19
LBB0_6:
	movl	(%r15), %eax
	andl	$15, %eax
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rcx, %r13
	movq	%rbx, -192(%rbp)                ## 8-byte Spill
	leaq	-1(%rax), %rdx
	movl	%eax, %ecx
	andl	$3, %ecx
	cmpq	$3, %rdx
	jae	LBB0_10
## %bb.9:
	xorl	%edx, %edx
	jmp	LBB0_12
LBB0_10:
	movl	%eax, %esi
	andl	$-4, %esi
	leaq	(%r14,%r12,8), %rdi
	addq	$24, %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	-24(%rdi,%rdx,8), %rbx
	movq	%rbx, -176(%rbp,%rdx,8)
	movq	-16(%rdi,%rdx,8), %rbx
	movq	%rbx, -168(%rbp,%rdx,8)
	movq	-8(%rdi,%rdx,8), %rbx
	movq	%rbx, -160(%rbp,%rdx,8)
	movq	(%rdi,%rdx,8), %rbx
	movq	%rbx, -152(%rbp,%rdx,8)
	addq	$4, %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_11
LBB0_12:
	addq	%r12, -192(%rbp)                ## 8-byte Folded Spill
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.13:
	leaq	-176(,%rdx,8), %rsi
	addq	%rbp, %rsi
	addq	%rdx, %r12
	leaq	(%r14,%r12,8), %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rdi,8), %rbx
	movq	%rbx, (%rsi,%rdi,8)
	incq	%rdi
	cmpq	%rdi, %rcx
	jne	LBB0_14
LBB0_15:
	leaq	-176(,%rax,8), %rdi
	addq	%rbp, %rdi
	leal	(,%rax,8), %eax
	movl	$128, %esi
	subl	%eax, %esi
	callq	___bzero
	leaq	-176(%rbp), %rdx
	movq	%r13, %rdi
	movq	-192(%rbp), %rsi                ## 8-byte Reload
	movl	$1, %ecx
	callq	_qlcnic_ms_mem_write128
	testl	%eax, %eax
	je	LBB0_7
## %bb.16:
	movq	%r13, %rcx
	jmp	LBB0_17
LBB0_7:
	xorl	%r13d, %r13d
LBB0_18:
	movq	-184(%rbp), %rbx                ## 8-byte Reload
	movq	%r15, %rdi
	callq	_release_firmware
	movq	$0, (%rbx)
	movq	%r14, %rdi
	callq	_vfree
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movl	%r13d, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.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, #224
	.cfi_def_cfa_offset 224
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x8, [x0, #8]
	ldr	x24, [x8]
	ldr	x19, [x24]
	ldr	w0, [x19]
	bl	_vzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	w8, [x19]
	cmp	w8, #8
	b.lo	LBB0_4
; %bb.2:
	mov	x22, #0
	ldr	x23, [x19, #8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23, x22, lsl #2]
	bl	___le32_to_cpu
	str	x0, [x20, x22, lsl #3]
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8, lsr #3
	b.lo	LBB0_3
LBB0_4:
	ldr	x0, [x21, #8]
Lloh3:
	adrp	x8, _QLCNIC_FW_IMAGE_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QLCNIC_FW_IMAGE_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_QLCRDX
	mov	x23, x0
	ldrsw	x8, [x19]
	and	x25, x8, #0xfffffffffffffff0
	asr	w3, w25, #4
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_qlcnic_ms_mem_write128
	cbz	w0, LBB0_11
; %bb.5:
	mov	x22, x0
LBB0_6:
	ldr	x0, [x21]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_7:
	mov	x0, x19
	bl	_release_firmware
	str	xzr, [x24]
	mov	x0, x20
	bl	_vfree
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_release_firmware
	str	xzr, [x24]
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	ldur	x8, [x29, #-72]
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_16
; %bb.10:
	mov	x0, x22
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_11:
	ldr	w8, [x19]
	and	x8, x8, #0xf
	cbz	w8, LBB0_15
; %bb.12:
	add	x22, x23, x25
	add	x9, sp, #8
	mov	x10, x8
	add	x11, x20, x25, lsl #3
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11], #8
	str	x12, [x9], #8
	subs	x10, x10, #1
	b.ne	LBB0_13
; %bb.14:
	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, x21
	mov	x1, x22
	mov	w3, #1
	bl	_qlcnic_ms_mem_write128
	mov	x22, x0
	cbnz	w0, LBB0_6
	b	LBB0_7
LBB0_15:
	mov	w22, #0
	b	LBB0_7
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.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
