	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max2175_core_init
_max2175_core_init:                     ## @max2175_core_init
	.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	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_MAX2175_EU_XTAL_FREQ@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_max2175_load_full_fm_eu_1p0
	cmpl	$0, 8(%rbx)
	jne	LBB0_5
	jmp	LBB0_4
LBB0_2:
	movq	%rbx, %rdi
	callq	_max2175_load_full_fm_na_1p0
	cmpl	$0, 8(%rbx)
	jne	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	movl	$30, %esi
	movl	$7, %edx
	movl	$1, %ecx
	callq	_max2175_write_bit
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_mxm_dbg
	movq	%rbx, %rdi
	movl	$56, %esi
	movl	$7, %edx
	movl	$5, %ecx
	movl	%r14d, %r8d
	callq	_max2175_write_bits
	movq	%rbx, %rdi
	movl	$99, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_max2175_write_bit
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$1500, %esi                     ## imm = 0x5DC
	callq	_usleep_range
	movq	%rbx, %rdi
	movl	$99, %esi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_max2175_write_bit
	movq	%rbx, %rdi
	callq	_max2175_load_adc_presets
	movq	%rbx, %rdi
	callq	_max2175_init_power_manager
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_max2175_recalibrate_adc
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_max2175_load_from_rom
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	movq	_MAX2175_CH_MSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ch_coeff_fmna@GOTPCREL(%rip), %rax
	cmoveq	_ch_coeff_fmeu@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_eq_coeff_fmna1_ra02_m6db@GOTPCREL(%rip), %r15
	cmoveq	_eq_coeff_fmeu1_ra02_m6db@GOTPCREL(%rip), %r15
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_max2175_set_filter_coeffs
	movq	_MAX2175_EQ_MSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %ecx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_max2175_set_filter_coeffs
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_mxm_dbg
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX2175_EU_XTAL_FREQ,8,3       ## @MAX2175_EU_XTAL_FREQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"refout_bits %u\n"

	.comm	_MAX2175_CH_MSEL,4,2            ## @MAX2175_CH_MSEL
	.comm	_ch_coeff_fmeu,4,2              ## @ch_coeff_fmeu
	.comm	_MAX2175_EQ_MSEL,4,2            ## @MAX2175_EQ_MSEL
	.comm	_eq_coeff_fmeu1_ra02_m6db,4,2   ## @eq_coeff_fmeu1_ra02_m6db
	.comm	_ch_coeff_fmna,4,2              ## @ch_coeff_fmna
	.comm	_eq_coeff_fmna1_ra02_m6db,4,2   ## @eq_coeff_fmna1_ra02_m6db
L_.str.1:                               ## @.str.1
	.asciz	"core initialized\n"

	.no_dead_strip	_max2175_core_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max2175_core_init
_max2175_core_init:                     ; @max2175_core_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _MAX2175_EU_XTAL_FREQ@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX2175_EU_XTAL_FREQ@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_max2175_load_full_fm_eu_1p0
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_4
	b	LBB0_3
LBB0_2:
	bl	_max2175_load_full_fm_na_1p0
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_4
LBB0_3:
	mov	x0, x19
	mov	w1, #30
	mov	w2, #7
	mov	w3, #1
	bl	_max2175_write_bit
LBB0_4:
	str	x20, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mxm_dbg
	mov	x0, x19
	mov	w1, #56
	mov	w2, #7
	mov	w3, #5
	mov	x4, x20
	bl	_max2175_write_bits
	mov	x0, x19
	mov	w1, #99
	mov	w2, #1
	mov	w3, #0
	bl	_max2175_write_bit
	mov	w0, #1000
	mov	w1, #1500
	bl	_usleep_range
	mov	x0, x19
	mov	w1, #99
	mov	w2, #1
	mov	w3, #1
	bl	_max2175_write_bit
	mov	x0, x19
	bl	_max2175_load_adc_presets
	mov	x0, x19
	bl	_max2175_init_power_manager
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_max2175_recalibrate_adc
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_max2175_load_from_rom
	ldr	x8, [x19]
	ldr	x9, [x21]
Lloh4:
	adrp	x10, _MAX2175_CH_MSEL@GOTPAGE
Lloh5:
	ldr	x10, [x10, _MAX2175_CH_MSEL@GOTPAGEOFF]
Lloh6:
	adrp	x11, _ch_coeff_fmeu@GOTPAGE
Lloh7:
	ldr	x11, [x11, _ch_coeff_fmeu@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x10]
Lloh9:
	adrp	x10, _ch_coeff_fmna@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ch_coeff_fmna@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	w3, [x8]
Lloh11:
	adrp	x8, _eq_coeff_fmeu1_ra02_m6db@GOTPAGE
Lloh12:
	ldr	x8, [x8, _eq_coeff_fmeu1_ra02_m6db@GOTPAGEOFF]
Lloh13:
	adrp	x9, _eq_coeff_fmna1_ra02_m6db@GOTPAGE
Lloh14:
	ldr	x9, [x9, _eq_coeff_fmna1_ra02_m6db@GOTPAGEOFF]
	csel	x20, x8, x9, eq
	mov	x0, x19
	mov	w2, #0
	bl	_max2175_set_filter_coeffs
Lloh15:
	adrp	x8, _MAX2175_EQ_MSEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAX2175_EQ_MSEL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_max2175_set_filter_coeffs
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mxm_dbg
	mov	w0, #0
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX2175_EU_XTAL_FREQ,8,3       ; @MAX2175_EU_XTAL_FREQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"refout_bits %u\n"

	.comm	_MAX2175_CH_MSEL,4,2            ; @MAX2175_CH_MSEL
	.comm	_ch_coeff_fmeu,4,2              ; @ch_coeff_fmeu
	.comm	_MAX2175_EQ_MSEL,4,2            ; @MAX2175_EQ_MSEL
	.comm	_eq_coeff_fmeu1_ra02_m6db,4,2   ; @eq_coeff_fmeu1_ra02_m6db
	.comm	_ch_coeff_fmna,4,2              ; @ch_coeff_fmna
	.comm	_eq_coeff_fmna1_ra02_m6db,4,2   ; @eq_coeff_fmna1_ra02_m6db
l_.str.1:                               ; @.str.1
	.asciz	"core initialized\n"

	.no_dead_strip	_max2175_core_init
.subsections_via_symbols
