	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_83xx_copy_bootloader
_qlcnic_83xx_copy_bootloader:           ## @qlcnic_83xx_copy_bootloader
	.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, %r12
	movq	_QLC_83XX_BOOTLOADER_FLASH_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rdi), %edi
	movq	_QLCNIC_BOOTLOADER_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_QLCRDX
	movq	%rax, %r14
	movl	8(%r12), %edi
	movq	_QLCNIC_BOOTLOADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_QLCRDX
	leal	16(%rax), %ebx
	andl	$-16, %ebx
	testb	$15, %al
	cmovel	%eax, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	%ebx, %ecx
	sarl	$2, %ecx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%rax, %rdx
	callq	_qlcnic_83xx_lockless_flash_read32
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_4
LBB0_1:
	movq	(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	jmp	LBB0_5
LBB0_6:
	leal	15(%rbx), %ecx
	testl	%ebx, %ebx
	cmovnsl	%ebx, %ecx
	sarl	$4, %ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_qlcnic_83xx_ms_mem_write128
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_kfree
	movl	%ebx, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_QLC_83XX_BOOTLOADER_FLASH_ADDR,4,2 ## @QLC_83XX_BOOTLOADER_FLASH_ADDR
	.comm	_QLCNIC_BOOTLOADER_ADDR,4,2     ## @QLCNIC_BOOTLOADER_ADDR
	.comm	_QLCNIC_BOOTLOADER_SIZE,4,2     ## @QLCNIC_BOOTLOADER_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate memory for boot loader cache\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_qlcnic_83xx_copy_bootloader
.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_bootloader
_qlcnic_83xx_copy_bootloader:           ; @qlcnic_83xx_copy_bootloader
	.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
Lloh0:
	adrp	x8, _QLC_83XX_BOOTLOADER_FLASH_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QLC_83XX_BOOTLOADER_FLASH_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	w0, [x0, #8]
Lloh3:
	adrp	x8, _QLCNIC_BOOTLOADER_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QLCNIC_BOOTLOADER_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_QLCRDX
	mov	x20, x0
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x8, _QLCNIC_BOOTLOADER_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QLCNIC_BOOTLOADER_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_QLCRDX
	add	w8, w0, #16
	and	w8, w8, #0xfffffff0
	tst	w0, #0xf
	csel	w23, w0, w8, eq
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	asr	w3, w23, #2
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_qlcnic_83xx_lockless_flash_read32
	cbz	w0, LBB0_5
; %bb.2:
	mov	x21, x0
	mov	x0, x22
	bl	_kfree
	b	LBB0_4
LBB0_3:
	ldr	x0, [x19]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	x0, x21
	b	LBB0_6
LBB0_5:
	add	w8, w23, #15
	cmp	w23, #0
	csel	w8, w8, w23, lt
	asr	w3, w8, #4
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_qlcnic_83xx_ms_mem_write128
	mov	x19, x0
	mov	x0, x22
	bl	_kfree
	mov	x0, x19
LBB0_6:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_QLC_83XX_BOOTLOADER_FLASH_ADDR,4,2 ; @QLC_83XX_BOOTLOADER_FLASH_ADDR
	.comm	_QLCNIC_BOOTLOADER_ADDR,4,2     ; @QLCNIC_BOOTLOADER_ADDR
	.comm	_QLCNIC_BOOTLOADER_SIZE,4,2     ; @QLCNIC_BOOTLOADER_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate memory for boot loader cache\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_qlcnic_83xx_copy_bootloader
.subsections_via_symbols
