	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function silead_ts_setup
_silead_ts_setup:                       ## @silead_ts_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_SILEAD_POWER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_silead_ts_set_power
	movq	_SILEAD_POWER_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_silead_ts_set_power
	movq	%rbx, %rdi
	callq	_silead_ts_get_id
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	callq	_silead_ts_init
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_silead_ts_reset
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	callq	_silead_ts_load_fw
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	callq	_silead_ts_startup
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_silead_ts_get_status
	movq	%rax, %rdx
	movq	_SILEAD_STATUS_OK@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	(%rcx), %rdx
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SILEAD_POWER_OFF,4,2           ## @SILEAD_POWER_OFF
	.comm	_SILEAD_POWER_ON,4,2            ## @SILEAD_POWER_ON
	.comm	_SILEAD_STATUS_OK,8,3           ## @SILEAD_STATUS_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Initialization error, status: 0x%X\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_silead_ts_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function silead_ts_setup
_silead_ts_setup:                       ; @silead_ts_setup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _SILEAD_POWER_OFF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SILEAD_POWER_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_silead_ts_set_power
Lloh3:
	adrp	x8, _SILEAD_POWER_ON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SILEAD_POWER_ON@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_silead_ts_set_power
	mov	x0, x19
	bl	_silead_ts_get_id
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_silead_ts_init
	cbnz	w0, LBB0_8
; %bb.2:
	mov	x0, x19
	bl	_silead_ts_reset
	cbnz	w0, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_silead_ts_load_fw
	cbnz	w0, LBB0_8
; %bb.4:
	mov	x0, x19
	bl	_silead_ts_startup
	cbnz	w0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_silead_ts_get_status
Lloh6:
	adrp	x8, _SILEAD_STATUS_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SILEAD_STATUS_OK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SILEAD_POWER_OFF,4,2           ; @SILEAD_POWER_OFF
	.comm	_SILEAD_POWER_ON,4,2            ; @SILEAD_POWER_ON
	.comm	_SILEAD_STATUS_OK,8,3           ; @SILEAD_STATUS_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Initialization error, status: 0x%X\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_silead_ts_setup
.subsections_via_symbols
