	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlcore_boot_upload_firmware    ## -- Begin function wlcore_boot_upload_firmware
	.p2align	4, 0x90
_wlcore_boot_upload_firmware:           ## @wlcore_boot_upload_firmware
	.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, %r14
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_be32_to_cpup
	movl	%eax, %r15d
	movq	_DEBUG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_wl1271_debug
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.1:
	addq	$16, %rbx
	decl	%r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_be32_to_cpup
	movl	%eax, %r12d
	leaq	16(%rbx), %rdi
	callq	_be32_to_cpup
	movl	%eax, %r13d
	cmpl	$300001, %eax                   ## imm = 0x493E1
	jge	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$32, %rbx
	movq	_DEBUG_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	callq	_wl1271_boot_upload_firmware_chunk
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %rax
	leaq	(%rbx,%rax,4), %rbx
	addl	$-1, %r15d
	jb	LBB0_2
## %bb.7:
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	callq	_wl1271_info
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %r12d
LBB0_8:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_BOOT,4,2                 ## @DEBUG_BOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"firmware chunks to be uploaded: %u"

L_.str.1:                               ## @.str.1
	.asciz	"firmware chunk too long: %u"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"chunk %d addr 0x%x len %u"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlcore_boot_upload_firmware    ; -- Begin function wlcore_boot_upload_firmware
	.p2align	2
_wlcore_boot_upload_firmware:           ; @wlcore_boot_upload_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	ldr	x20, [x0]
	mov	x0, x20
	bl	_be32_to_cpup
	mov	x21, x0
Lloh0:
	adrp	x25, _DEBUG_BOOT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _DEBUG_BOOT@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_wl1271_debug
	cbz	w21, LBB0_5
; %bb.1:
	add	x22, x20, #16
	sub	w20, w21, #1
	mov	w26, #37857
	movk	w26, #4, lsl #16
Lloh4:
	adrp	x21, l_.str.2@PAGE
Lloh5:
	add	x21, x21, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_be32_to_cpup
	mov	x24, x0
	add	x0, x22, #16
	bl	_be32_to_cpup
	mov	x23, x0
	cmp	w0, w26
	b.ge	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #32
	ldr	w0, [x25]
	stp	x24, x23, [sp]
	mov	x1, x21
	mov	x2, x20
	bl	_wl1271_debug
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	x3, x24
	bl	_wl1271_boot_upload_firmware_chunk
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, w23, sxtw #2
	sub	w20, w20, #1
	cmn	w20, #1
	b.ne	LBB0_2
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	bl	_wl1271_info
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_BOOT,4,2                 ; @DEBUG_BOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"firmware chunks to be uploaded: %u"

l_.str.1:                               ; @.str.1
	.asciz	"firmware chunk too long: %u"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"chunk %d addr 0x%x len %u"

.subsections_via_symbols
