	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smscore_start_device           ## -- Begin function smscore_start_device
	.p2align	4, 0x90
_smscore_start_device:                  ## @smscore_start_device
	.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
	movq	%rdi, %r14
	callq	_smscore_get_board_id
	movl	%eax, %ebx
	movl	4(%r14), %edi
	callq	_smscore_registry_getmode
	movq	_SMS_BOARD_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	je	LBB0_3
## %bb.1:
	movq	_DEVICE_MODE_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.2:
	movl	%ebx, %edi
	callq	_sms_get_board
	movl	(%rax), %eax
LBB0_3:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_smscore_set_device_mode
	testl	%eax, %eax
	js	LBB0_4
## %bb.6:
	movq	%r14, %rdi
	callq	_smscore_configure_board
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	_g_smscore_deviceslock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_kmutex_lock
	movl	(%r14), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_smscore_notify_callbacks
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_smscore_init_ir
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_pr_debug
	movq	%r15, %rdi
	callq	_kmutex_unlock
	jmp	LBB0_9
LBB0_4:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_7:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	movl	%ebx, %esi
	callq	_pr_info
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMS_BOARD_UNKNOWN,4,2          ## @SMS_BOARD_UNKNOWN
	.comm	_DEVICE_MODE_NONE,4,2           ## @DEVICE_MODE_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set device mode failed , rc %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"configure board failed , rc %d\n"

	.comm	_g_smscore_deviceslock,4,2      ## @g_smscore_deviceslock
L_.str.2:                               ## @.str.2
	.asciz	"device %p started, rc %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smscore_start_device           ; -- Begin function smscore_start_device
	.p2align	2
_smscore_start_device:                  ; @smscore_start_device
	.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, x0
	bl	_smscore_get_board_id
	mov	x20, x0
	ldr	w0, [x19, #4]
	bl	_smscore_registry_getmode
	mov	x1, x0
Lloh0:
	adrp	x8, _SMS_BOARD_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMS_BOARD_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DEVICE_MODE_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DEVICE_MODE_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w20, w8
	ccmp	w0, w9, #0, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_sms_get_board
	ldr	w1, [x0]
LBB0_2:
	mov	x0, x19
	bl	_smscore_set_device_mode
	tbnz	w0, #31, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_smscore_configure_board
	tbnz	w0, #31, LBB0_6
; %bb.4:
Lloh6:
	adrp	x21, _g_smscore_deviceslock@GOTPAGE
Lloh7:
	ldr	x21, [x21, _g_smscore_deviceslock@GOTPAGEOFF]
	mov	x0, x21
	bl	_kmutex_lock
	ldr	w1, [x19]
	mov	x0, x19
	mov	w2, #1
	bl	_smscore_notify_callbacks
	mov	x20, x0
	mov	x0, x19
	bl	_smscore_init_ir
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_pr_debug
	mov	x0, x21
	bl	_kmutex_unlock
	b	LBB0_8
LBB0_5:
	mov	x20, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x20, x0
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	mov	x1, x20
	bl	_pr_info
LBB0_8:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SMS_BOARD_UNKNOWN,4,2          ; @SMS_BOARD_UNKNOWN
	.comm	_DEVICE_MODE_NONE,4,2           ; @DEVICE_MODE_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set device mode failed , rc %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"configure board failed , rc %d\n"

	.comm	_g_smscore_deviceslock,4,2      ; @g_smscore_deviceslock
l_.str.2:                               ; @.str.2
	.asciz	"device %p started, rc %d\n"

.subsections_via_symbols
