	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function download_microcode
_download_microcode:                    ## @download_microcode
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_dprintk
	movl	16(%r13), %r15d
	shll	$8, %r15d
	orl	20(%r13), %r15d
	jle	LBB0_1
## %bb.2:
	addq	$32, %r13
	movl	$8, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r13), %eax
	movl	20(%r13), %ebx
	shll	$10, %eax
	shll	$2, %ebx
	orl	%eax, %ebx
	addl	%ebx, %r12d
	addl	$16, %r12d
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	jg	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	64(%r13), %r14
	movl	(%r13), %eax
	movl	4(%r13), %ecx
	shll	$24, %eax
	shll	$16, %ecx
	orl	%eax, %ecx
	movl	8(%r13), %esi
	shll	$8, %esi
	orl	%ecx, %esi
	orl	12(%r13), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	movq	%r14, %rcx
	callq	_write_block
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%ebx, %rcx
	leaq	(%r14,%rcx,4), %r13
	decl	%r15d
	jne	LBB0_3
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	xorl	%eax, %eax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movl	%ebx, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

L_.str.1:                               ## @.str.1
	.asciz	"Firmware is corrupted.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Error %d while loading firmware\n"

	.comm	_block_crc,4,2                  ## @block_crc
	.comm	_drain,4,2                      ## @drain
	.comm	_flags,4,2                      ## @flags
	.no_dead_strip	_download_microcode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function download_microcode
_download_microcode:                    ; @download_microcode
	.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, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_dprintk
	ldp	w8, w9, [x21, #16]
	orr	w24, w9, w8, lsl #8
	cmp	w24, #1
	b.lt	LBB0_5
; %bb.1:
	add	x8, x21, #32
	mov	w25, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w9, w10, [x8, #16]
	lsl	w10, w10, #2
	orr	w22, w10, w9, lsl #10
	add	w9, w25, w22
	add	w25, w9, #16
	cmp	w25, w19
	b.gt	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x8, #64
	ldp	w9, w10, [x8]
	lsl	w10, w10, #16
	orr	w9, w10, w9, lsl #24
	ldp	w10, w8, [x8, #8]
	orr	w9, w9, w10, lsl #8
	orr	w1, w9, w8
	mov	x0, x20
	mov	x2, x22
	mov	x3, x23
	bl	_write_block
	mov	x21, x0
	tbnz	w0, #31, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x23, w22, sxtw #2
	subs	w24, w24, #1
	b.ne	LBB0_2
	b	LBB0_8
LBB0_5:
	mov	w21, #0
	b	LBB0_8
LBB0_6:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_7:
	str	x21, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
LBB0_8:
	mov	x0, x21
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

l_.str.1:                               ; @.str.1
	.asciz	"Firmware is corrupted.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Error %d while loading firmware\n"

	.comm	_block_crc,4,2                  ; @block_crc
	.comm	_drain,4,2                      ; @drain
	.comm	_flags,4,2                      ; @flags
	.no_dead_strip	_download_microcode
.subsections_via_symbols
