	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smscore_get_fw_filename
_smscore_get_fw_filename:               ## @smscore_get_fw_filename
	.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
	callq	_smscore_get_board_id
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_smscore_registry_gettype
	movl	%eax, %ebx
	movq	_SMS_UNKNOWN_TYPE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %ebx
	jbe	LBB0_7
## %bb.1:
	movq	_SMS_NUM_OF_DEVICE_TYPES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jae	LBB0_7
## %bb.2:
	movq	_DEVICE_MODE_NONE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	%r14d, (%rcx)
	jge	LBB0_7
## %bb.3:
	movq	_DEVICE_MODE_MAX@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jle	LBB0_7
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_pr_debug
	movl	%r15d, %edi
	callq	_sms_get_board
	movq	(%rax), %rax
	movslq	%r14d, %r14
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	(%rax,%r14,8), %rax
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_pr_debug
	movq	_smscore_fw_lkup@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax,%r14,8), %rax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMS_UNKNOWN_TYPE,4,2           ## @SMS_UNKNOWN_TYPE
	.comm	_SMS_NUM_OF_DEVICE_TYPES,4,2    ## @SMS_NUM_OF_DEVICE_TYPES
	.comm	_DEVICE_MODE_NONE,4,2           ## @DEVICE_MODE_NONE
	.comm	_DEVICE_MODE_MAX,4,2            ## @DEVICE_MODE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trying to get fw name from sms_boards board_id %d mode %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"cannot find fw name in sms_boards, getting from lookup table mode %d type %d\n"

	.comm	_smscore_fw_lkup,8,3            ## @smscore_fw_lkup
	.no_dead_strip	_smscore_get_fw_filename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smscore_get_fw_filename
_smscore_get_fw_filename:               ; @smscore_get_fw_filename
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_smscore_get_board_id
	mov	x21, x0
	ldr	w0, [x20]
	bl	_smscore_registry_gettype
Lloh0:
	adrp	x8, _SMS_UNKNOWN_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMS_UNKNOWN_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SMS_NUM_OF_DEVICE_TYPES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SMS_NUM_OF_DEVICE_TYPES@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w0, w8
	ccmp	w0, w9, #2, hi
	b.hs	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _DEVICE_MODE_NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEVICE_MODE_NONE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _DEVICE_MODE_MAX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DEVICE_MODE_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w19
	ccmp	w9, w19, #4, lt
	b.gt	LBB0_4
LBB0_2:
	mov	x0, #0
LBB0_3:
	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
LBB0_4:
	mov	x20, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	bl	_pr_debug
	mov	x0, x21
	bl	_sms_get_board
	ldr	x8, [x0]
	sxtw	x21, w19
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x0, [x8, x21, lsl #3]
	cbnz	x0, LBB0_3
LBB0_6:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_pr_debug
Lloh16:
	adrp	x8, _smscore_fw_lkup@GOTPAGE
Lloh17:
	ldr	x8, [x8, _smscore_fw_lkup@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	x8, [x8, w20, uxtw #3]
	ldr	x0, [x8, x21, lsl #3]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SMS_UNKNOWN_TYPE,4,2           ; @SMS_UNKNOWN_TYPE
	.comm	_SMS_NUM_OF_DEVICE_TYPES,4,2    ; @SMS_NUM_OF_DEVICE_TYPES
	.comm	_DEVICE_MODE_NONE,4,2           ; @DEVICE_MODE_NONE
	.comm	_DEVICE_MODE_MAX,4,2            ; @DEVICE_MODE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trying to get fw name from sms_boards board_id %d mode %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"cannot find fw name in sms_boards, getting from lookup table mode %d type %d\n"

	.comm	_smscore_fw_lkup,8,3            ; @smscore_fw_lkup
	.no_dead_strip	_smscore_get_fw_filename
.subsections_via_symbols
