	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsusb_probe
_smsusb_probe:                          ## @smsusb_probe
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_interface_to_usbdev
	movq	%rax, %r15
	movl	(%r14), %esi
	movq	8(%r13), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_pr_info
	movl	(%r14), %edi
	callq	_sms_get_board
	movq	(%rax), %rsi
	movq	8(%r13), %rax
	movq	(%rax), %rbx
	cmpq	%rbx, %rsi
	jne	LBB0_1
## %bb.2:
	cmpl	$2, (%r13)
	jl	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_usb_set_interface
	testl	%eax, %eax
	js	LBB0_22
## %bb.4:
	movq	8(%r13), %rax
	movq	(%rax), %rsi
LBB0_5:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	8(%r13), %rax
	cmpl	$0, 8(%rax)
	jle	LBB0_11
## %bb.6:
	movq	_USB_DIR_IN@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	callq	_usb_sndbulkpipe
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_usb_clear_halt
	incq	%rbx
	movq	8(%r13), %rax
	movslq	8(%rax), %rcx
	addq	$12, %r12
	cmpq	%rcx, %rbx
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rax), %rax
	movl	8(%rax,%r12), %ecx
	movl	(%rax,%r12), %edx
	movl	4(%rax,%r12), %r8d
	leaq	L_.str.4(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	8(%r13), %rax
	movq	16(%rax), %rax
	movl	(%rax,%r12), %esi
	testl	%esi, (%r14)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	callq	_usb_rcvbulkpipe
	jmp	LBB0_10
LBB0_1:
	movl	(%r14), %edi
	callq	_sms_get_board
	movq	(%rax), %rdx
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_14:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_20
LBB0_11:
	movq	16(%r15), %rcx
	cmpl	$2, (%rcx)
	jne	LBB0_15
## %bb.12:
	cmpq	$0, (%rax)
	je	LBB0_13
LBB0_15:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %esi
	movq	_SMS1XXX_BOARD_SIANO_STELLAR_ROM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_19
## %bb.16:
	movq	(%r15), %r8
	movq	8(%r15), %rax
	movl	(%rax), %ecx
	leaq	L_.str.6(%rip), %rdx
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_snprintf
	leaq	L_.str.7(%rip), %rdi
	xorl	%r12d, %r12d
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_pr_info
	movq	%r14, %rdi
	callq	_smscore_registry_getmode
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_smsusb1_load_firmware
	testl	%eax, %eax
	je	LBB0_17
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.9(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movl	%ebx, %r12d
	jmp	LBB0_20
LBB0_19:
	movq	%r13, %rdi
	callq	_smsusb_init_device
	movl	%eax, %r12d
	leaq	L_.str.10(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movl	(%rbx), %edi
	callq	_sms_board_load_modules
	jmp	LBB0_20
LBB0_22:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_20
LBB0_13:
	leaq	L_.str.5(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_14
LBB0_17:
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.21:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"board id=%lu, interface number %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"interface %d won't be used. Expecting interface %d to popup\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"usb_set_interface failed, rc %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"smsusb_probe %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"endpoint %d %02x %02x %d\n"

	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
L_.str.5:                               ## @.str.5
	.asciz	"rom interface 0 is not used\n"

	.comm	_SMS1XXX_BOARD_SIANO_STELLAR_ROM,4,2 ## @SMS1XXX_BOARD_SIANO_STELLAR_ROM
L_.str.6:                               ## @.str.6
	.asciz	"usb\\%d-%s"

L_.str.7:                               ## @.str.7
	.asciz	"stellar device in cold state was found at %s.\n"

L_.str.8:                               ## @.str.8
	.asciz	"stellar device now in warm state\n"

L_.str.9:                               ## @.str.9
	.asciz	"Failed to put stellar in warm state. Error: %d\n"

L_.str.10:                              ## @.str.10
	.asciz	"Device initialized with return code %d\n"

	.no_dead_strip	_smsusb_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsusb_probe
_smsusb_probe:                          ; @smsusb_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
	bl	_interface_to_usbdev
	mov	x20, x0
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	w9, [x19]
	stp	x9, x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	ldr	w0, [x19]
	bl	_sms_get_board
	ldr	x1, [x0]
	ldr	x8, [x21, #8]
	ldr	x22, [x8]
	cmp	x1, x22
	b.ne	LBB0_10
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, #1
	b.le	LBB0_4
; %bb.2:
	mov	x0, x20
	mov	w2, #0
	bl	_usb_set_interface
	tbnz	w0, #31, LBB0_18
; %bb.3:
	ldr	x8, [x21, #8]
	ldr	x1, [x8]
LBB0_4:
	str	x1, [sp]
Lloh5:
	adrp	x0, l_.str.3@PAGE
Lloh6:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_debug
	ldr	x8, [x21, #8]
	ldr	w9, [x8, #8]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.5:
	mov	x23, #0
	mov	x24, #0
Lloh7:
	adrp	x25, _USB_DIR_IN@GOTPAGE
Lloh8:
	ldr	x25, [x25, _USB_DIR_IN@GOTPAGEOFF]
Lloh9:
	adrp	x22, l_.str.4@PAGE
Lloh10:
	add	x22, x22, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	bl	_usb_sndbulkpipe
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x1, x0
	mov	x0, x20
	bl	_usb_clear_halt
	add	x24, x24, #1
	ldr	x8, [x21, #8]
	ldrsw	x9, [x8, #8]
	add	x23, x23, #12
	cmp	x24, x9
	b.ge	LBB0_12
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #16]
	add	x8, x8, x23
	ldr	w10, [x8]
	ldp	w8, w9, [x8, #4]
	stp	x9, x8, [sp, #16]
	stp	x24, x10, [sp]
	mov	x0, x22
	bl	_pr_debug
	ldr	x8, [x21, #8]
	ldr	x8, [x8, #16]
	ldr	w1, [x8, x23]
	ldr	w8, [x25]
	mov	x0, x20
	tst	w8, w1
	b.eq	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_usb_rcvbulkpipe
	b	LBB0_7
LBB0_10:
	ldr	w0, [x19]
	bl	_sms_get_board
	ldr	x8, [x0]
	stp	x22, x8, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	bl	_pr_debug
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_22
LBB0_12:
	ldr	x9, [x20, #16]
	ldr	w9, [x9]
	cmp	w9, #2
	b.ne	LBB0_14
; %bb.13:
	ldr	x8, [x8]
	cbz	x8, LBB0_20
LBB0_14:
	ldr	w1, [x19]
Lloh16:
	adrp	x8, _SMS1XXX_BOARD_SIANO_STELLAR_ROM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SMS1XXX_BOARD_SIANO_STELLAR_ROM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ne	LBB0_17
; %bb.15:
	ldp	x4, x8, [x20]
	ldr	w3, [x8]
Lloh19:
	adrp	x2, l_.str.6@PAGE
Lloh20:
	add	x2, x2, l_.str.6@PAGEOFF
	add	x21, sp, #40
	add	x0, sp, #40
	mov	w1, #32
	bl	_snprintf
	str	x21, [sp]
Lloh21:
	adrp	x0, l_.str.7@PAGE
Lloh22:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_info
	add	x0, sp, #40
	bl	_smscore_registry_getmode
	mov	x1, x0
	ldr	w2, [x19]
	mov	x0, x20
	bl	_smsusb1_load_firmware
	mov	x22, x0
	cbz	w0, LBB0_21
; %bb.16:
Lloh23:
	adrp	x0, l_.str.9@PAGE
Lloh24:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_19
LBB0_17:
	mov	x0, x21
	bl	_smsusb_init_device
	mov	x22, x0
	str	x22, [sp]
Lloh25:
	adrp	x0, l_.str.10@PAGE
Lloh26:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_pr_info
	ldr	w0, [x19]
	bl	_sms_board_load_modules
	b	LBB0_22
LBB0_18:
	mov	x22, x0
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_19:
	mov	x1, x22
	bl	_pr_err
	b	LBB0_22
LBB0_20:
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_11
LBB0_21:
Lloh31:
	adrp	x0, l_.str.8@PAGE
Lloh32:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_pr_info
LBB0_22:
	ldr	x8, [sp, #72]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	mov	x0, x22
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"board id=%lu, interface number %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"interface %d won't be used. Expecting interface %d to popup\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"usb_set_interface failed, rc %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"smsusb_probe %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"endpoint %d %02x %02x %d\n"

	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
l_.str.5:                               ; @.str.5
	.asciz	"rom interface 0 is not used\n"

	.comm	_SMS1XXX_BOARD_SIANO_STELLAR_ROM,4,2 ; @SMS1XXX_BOARD_SIANO_STELLAR_ROM
l_.str.6:                               ; @.str.6
	.asciz	"usb\\%d-%s"

l_.str.7:                               ; @.str.7
	.asciz	"stellar device in cold state was found at %s.\n"

l_.str.8:                               ; @.str.8
	.asciz	"stellar device now in warm state\n"

l_.str.9:                               ; @.str.9
	.asciz	"Failed to put stellar in warm state. Error: %d\n"

l_.str.10:                              ; @.str.10
	.asciz	"Device initialized with return code %d\n"

	.no_dead_strip	_smsusb_probe
.subsections_via_symbols
