	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_asic
_load_asic:                             ## @load_asic
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$1, %ebx
	cmpq	$0, 16(%rdi)
	jne	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	movl	$10, %edi
	callq	_mdelay
	movq	(%r14), %rcx
	movq	_DEVICE_ID_56361@GOTPCREL(%rip), %rdx
	movq	_card_fw@GOTPCREL(%rip), %rax
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.3:
	movq	_FW_GINA24_361_ASIC@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_FW_GINA24_301_ASIC@GOTPCREL(%rip), %rcx
LBB0_4:
	movq	(%rcx), %r15
	shlq	$2, %r15
	addq	(%rax), %r15
	movq	_DSP_FNC_LOAD_GINA24_ASIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_load_asic_generic
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	%r15, 8(%r14)
	movl	$10, %edi
	callq	_mdelay
	movq	%r14, %rdi
	callq	_check_asic_status
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	_GML_CONVERTER_ENABLE@GOTPCREL(%rip), %rax
	movq	_GML_48KHZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_write_control_reg
	movl	%eax, %ebx
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_DE_INIT
	jmp	LBB0_9
LBB0_5:
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEVICE_ID_56361,8,3            ## @DEVICE_ID_56361
	.comm	_card_fw,8,3                    ## @card_fw
	.comm	_FW_GINA24_361_ASIC,8,3         ## @FW_GINA24_361_ASIC
	.comm	_FW_GINA24_301_ASIC,8,3         ## @FW_GINA24_301_ASIC
	.comm	_DSP_FNC_LOAD_GINA24_ASIC,4,2   ## @DSP_FNC_LOAD_GINA24_ASIC
	.comm	_GML_CONVERTER_ENABLE,4,2       ## @GML_CONVERTER_ENABLE
	.comm	_GML_48KHZ,4,2                  ## @GML_48KHZ
	.comm	_TRUE,4,2                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"load_asic() done\n"

	.no_dead_strip	_load_asic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_asic
_load_asic:                             ; @load_asic
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w20, #1
	b	LBB0_7
LBB0_2:
	mov	x19, x0
	mov	w0, #10
	bl	_mdelay
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _DEVICE_ID_56361@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DEVICE_ID_56361@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _card_fw@GOTPAGE
Lloh4:
	ldr	x10, [x10, _card_fw@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _FW_GINA24_361_ASIC@GOTPAGE
Lloh7:
	ldr	x11, [x11, _FW_GINA24_361_ASIC@GOTPAGEOFF]
Lloh8:
	adrp	x12, _FW_GINA24_301_ASIC@GOTPAGE
Lloh9:
	ldr	x12, [x12, _FW_GINA24_301_ASIC@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x11, x12, eq
	ldr	x8, [x8]
	add	x21, x10, x8, lsl #2
Lloh10:
	adrp	x8, _DSP_FNC_LOAD_GINA24_ASIC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DSP_FNC_LOAD_GINA24_ASIC@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_load_asic_generic
	tbnz	w0, #31, LBB0_6
; %bb.3:
	str	x21, [x19, #8]
	mov	w0, #10
	bl	_mdelay
	mov	x0, x19
	bl	_check_asic_status
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.4:
Lloh13:
	adrp	x8, _GML_CONVERTER_ENABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GML_CONVERTER_ENABLE@GOTPAGEOFF]
Lloh15:
	adrp	x9, _GML_48KHZ@GOTPAGE
Lloh16:
	ldr	x9, [x9, _GML_48KHZ@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh19:
	adrp	x8, _TRUE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_write_control_reg
	mov	x20, x0
LBB0_5:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DE_INIT
	b	LBB0_7
LBB0_6:
	mov	x20, x0
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DEVICE_ID_56361,8,3            ; @DEVICE_ID_56361
	.comm	_card_fw,8,3                    ; @card_fw
	.comm	_FW_GINA24_361_ASIC,8,3         ; @FW_GINA24_361_ASIC
	.comm	_FW_GINA24_301_ASIC,8,3         ; @FW_GINA24_301_ASIC
	.comm	_DSP_FNC_LOAD_GINA24_ASIC,4,2   ; @DSP_FNC_LOAD_GINA24_ASIC
	.comm	_GML_CONVERTER_ENABLE,4,2       ; @GML_CONVERTER_ENABLE
	.comm	_GML_48KHZ,4,2                  ; @GML_48KHZ
	.comm	_TRUE,4,2                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"load_asic() done\n"

	.no_dead_strip	_load_asic
.subsections_via_symbols
