	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwl8k_load_fw_image
_mwl8k_load_fw_image:                   ## @mwl8k_load_fw_image
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$304, %edi                      ## imm = 0x130
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	_MWL8K_CMD_CODE_DNLD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, 40(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r15)
	movq	$0, 32(%r15)
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r13, %r13
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$256, %r13                      ## imm = 0x100
	movl	$256, %ebx                      ## imm = 0x100
	cmovbq	%r13, %rbx
	movl	8(%r15), %edi
	movl	%r12d, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movl	%ebx, %edi
	callq	_cpu_to_le16
	movq	%rax, (%r15)
	leal	48(%rbx), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_mwl8k_send_fw_load_cmd
	addl	%ebx, %r12d
	subq	%rbx, %r13
	testl	%eax, %eax
	je	LBB0_3
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_7
LBB0_5:
	movq	$0, (%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	$48, %edx
	callq	_mwl8k_send_fw_load_cmd
LBB0_6:
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_kfree
LBB0_7:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MWL8K_CMD_CODE_DNLD,4,2        ## @MWL8K_CMD_CODE_DNLD
	.no_dead_strip	_mwl8k_load_fw_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwl8k_load_fw_image
_mwl8k_load_fw_image:                   ; @mwl8k_load_fw_image
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #304
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _MWL8K_CMD_CODE_DNLD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MWL8K_CMD_CODE_DNLD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	mov	w25, #0
	stp	xzr, x0, [x19, #32]
	stp	xzr, xzr, [x19, #16]
	mov	w26, #256
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x21, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x21, #256
	csel	x24, x21, x26, lo
	ldr	w0, [x19, #8]
	add	x1, x22, w25, uxtw #2
	mov	x2, x24
	bl	_memcpy
	mov	x0, x24
	bl	_cpu_to_le16
	str	x0, [x19]
	add	w2, w24, #48
	mov	x0, x20
	mov	x1, x19
	bl	_mwl8k_send_fw_load_cmd
	add	w25, w25, w24
	sub	x21, x21, x24
	cbz	w0, LBB0_2
	b	LBB0_6
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_7
LBB0_5:
	str	xzr, [x19]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #48
	bl	_mwl8k_send_fw_load_cmd
LBB0_6:
	mov	x23, x0
	mov	x0, x19
	bl	_kfree
LBB0_7:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MWL8K_CMD_CODE_DNLD,4,2        ; @MWL8K_CMD_CODE_DNLD
	.no_dead_strip	_mwl8k_load_fw_image
.subsections_via_symbols
