	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_firmware
_load_firmware:                         ## @load_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpl	$0, 16(%r14)
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	cmpq	$0, 8(%r14)
	je	LBB0_8
## %bb.6:
	movq	%r14, %rdi
	callq	_check_asic_status
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_13
## %bb.7:
	movq	$0, 8(%r14)
LBB0_8:
	movl	(%r14), %esi
	leaq	-24(%rbp), %rdi
	movq	%r14, %rdx
	callq	_get_firmware
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	-24(%rbp), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_load_dsp
	movl	%eax, %ebx
	movq	-24(%rbp), %rdi
	callq	_free_firmware
	testl	%ebx, %ebx
	js	LBB0_13
## %bb.11:
	movq	%r14, %rdi
	callq	_load_asic
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_restore_dsp_rettings
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	jmp	LBB0_13
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_load_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_firmware
_load_firmware:                         ; @load_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	mov	w0, #1
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_2
LBB0_5:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_check_asic_status
	mov	x20, x0
	tbz	w0, #31, LBB0_3
; %bb.7:
	str	xzr, [x19, #8]
LBB0_8:
	ldr	w1, [x19]
	add	x0, sp, #8
	mov	x2, x19
	bl	_get_firmware
	tbnz	w0, #31, LBB0_12
; %bb.9:
	ldr	x8, [sp, #8]
	ldr	x1, [x8]
	mov	x0, x19
	bl	_load_dsp
	mov	x20, x0
	ldr	x0, [sp, #8]
	bl	_free_firmware
	tbnz	w20, #31, LBB0_3
; %bb.10:
	mov	x0, x19
	bl	_load_asic
	mov	x20, x0
	tbnz	w0, #31, LBB0_3
; %bb.11:
	mov	x0, x19
	bl	_restore_dsp_rettings
	cmp	w0, #0
	csel	w20, w0, w20, lt
	b	LBB0_3
LBB0_12:
	mov	x20, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_load_firmware
.subsections_via_symbols
