	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib9000_firmware_download
_dib9000_firmware_download:             ## @dib9000_firmware_download
	.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	%r8d, %r15d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %rbx
	xorl	%r12d, %r12d
	cmpl	$1, %esi
	sete	%r12b
	shll	$4, %r12d
	leal	1024(%r12), %esi
	movl	$15, %edx
	callq	_dib9000_write_word
	leal	1025(%r12), %esi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_dib9000_write_word
	leal	1031(%r12), %esi
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dib9000_write_word
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_dprintk
	orl	$1026, %r12d                    ## imm = 0x402
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r15d, %ecx
	callq	_dib9000_write16_noinc
	addb	$65, %r13b
	movsbl	%r13b, %esi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_dprintk
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.2(%rip), %rdi
	callq	_dprintk
LBB0_3:
	movl	%r14d, %eax
	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	"going to download %dB of microcode\n"

L_.str.1:                               ## @.str.1
	.asciz	"error while downloading microcode for RISC %c\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"Microcode for RISC %c loaded\n"

	.no_dead_strip	_dib9000_firmware_download
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib9000_firmware_download
_dib9000_firmware_download:             ; @dib9000_firmware_download
	.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, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	cmp	w1, #1
	cset	w24, eq
	mov	w1, #1024
	bfi	w1, w24, #4, #1
	mov	w2, #15
	bl	_dib9000_write_word
	mov	w1, #1025
	bfi	w1, w24, #4, #1
	mov	x0, x23
	mov	w2, #0
	bl	_dib9000_write_word
	mov	w1, #1031
	bfi	w1, w24, #4, #1
	mov	x0, x23
	mov	x2, x21
	bl	_dib9000_write_word
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_dprintk
	mov	w1, #1026
	bfi	w1, w24, #4, #1
	mov	x0, x23
	mov	x2, x20
	mov	x3, x19
	bl	_dib9000_write16_noinc
	add	w8, w22, #65
	sxtb	w1, w8
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dprintk
	mov	w0, #0
LBB0_3:
	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 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	"going to download %dB of microcode\n"

l_.str.1:                               ; @.str.1
	.asciz	"error while downloading microcode for RISC %c\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"Microcode for RISC %c loaded\n"

	.no_dead_strip	_dib9000_firmware_download
.subsections_via_symbols
