	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stmfts_power_on
_stmfts_power_on:                       ## @stmfts_power_on
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	48(%rdi), %edi
	callq	_ARRAY_SIZE
	movl	48(%rbx), %esi
	movl	%eax, %edi
	callq	_regulator_bulk_enable
	testl	%eax, %eax
	je	LBB0_1
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movl	$20, %edi
	callq	_msleep
	movq	(%rbx), %rdi
	movq	_STMFTS_READ_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rcx
	movl	$64, %edx
	callq	_i2c_smbus_read_i2c_block_data
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	cmpl	$64, %eax
	jne	LBB0_3
## %bb.4:
	leaq	-32(%rbp), %rdi
	callq	_be16_to_cpup
	movq	%rax, 40(%rbx)
	movq	-80(%rbp), %rax
	movq	%rax, 32(%rbx)
	leaq	-64(%rbp), %rdi
	callq	_be16_to_cpup
	movq	%rax, 24(%rbx)
	pshufd	$78, -48(%rbp), %xmm0           ## xmm0 = mem[2,3,0,1]
	movdqu	%xmm0, 8(%rbx)
	movq	(%rbx), %rax
	movl	4(%rax), %edi
	callq	_enable_irq
	movl	$50, %edi
	callq	_msleep
	movq	_STMFTS_SYSTEM_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stmfts_command
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movq	_STMFTS_SLEEP_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stmfts_command
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movq	_STMFTS_MS_CX_TUNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stmfts_command
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_8:
	movq	_STMFTS_SS_CX_TUNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stmfts_command
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_10:
	movq	_STMFTS_FULL_FORCE_CALIBRATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stmfts_command
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	(%rbx), %rdi
	movq	_STMFTS_SLEEP_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_write_byte
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_STMFTS_READ_INFO,4,2           ## @STMFTS_READ_INFO
	.comm	_EIO,4,2                        ## @EIO
	.comm	_STMFTS_SYSTEM_RESET,4,2        ## @STMFTS_SYSTEM_RESET
	.comm	_STMFTS_SLEEP_OUT,4,2           ## @STMFTS_SLEEP_OUT
	.comm	_STMFTS_MS_CX_TUNING,4,2        ## @STMFTS_MS_CX_TUNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to perform mutual auto tune: %d\n"

	.comm	_STMFTS_SS_CX_TUNING,4,2        ## @STMFTS_SS_CX_TUNING
L_.str.1:                               ## @.str.1
	.asciz	"failed to perform self auto tune: %d\n"

	.comm	_STMFTS_FULL_FORCE_CALIBRATION,4,2 ## @STMFTS_FULL_FORCE_CALIBRATION
	.comm	_STMFTS_SLEEP_IN,4,2            ## @STMFTS_SLEEP_IN
	.no_dead_strip	_stmfts_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stmfts_power_on
_stmfts_power_on:                       ; @stmfts_power_on
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	w0, [x0, #48]
	bl	_ARRAY_SIZE
	ldr	w1, [x19, #48]
	bl	_regulator_bulk_enable
	cbz	w0, LBB0_3
LBB0_1:
	ldur	x8, [x29, #-24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.2:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	mov	w0, #20
	bl	_msleep
	ldr	x0, [x19]
Lloh6:
	adrp	x8, _STMFTS_READ_INFO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STMFTS_READ_INFO@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	w2, #64
	bl	_i2c_smbus_read_i2c_block_data
	tbnz	w0, #31, LBB0_1
; %bb.4:
	cmp	w0, #64
	b.ne	LBB0_13
; %bb.5:
	add	x20, sp, #8
	add	x0, x20, #48
	bl	_be16_to_cpup
	ldr	x8, [sp, #8]
	stp	x8, x0, [x19, #32]
	add	x0, x20, #16
	bl	_be16_to_cpup
	ldp	x8, x9, [sp, #40]
	stp	x8, x0, [x19, #16]
	str	x9, [x19, #8]
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	bl	_enable_irq
	mov	w0, #50
	bl	_msleep
Lloh9:
	adrp	x8, _STMFTS_SYSTEM_RESET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STMFTS_SYSTEM_RESET@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stmfts_command
	cbnz	w0, LBB0_1
; %bb.6:
Lloh12:
	adrp	x8, _STMFTS_SLEEP_OUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STMFTS_SLEEP_OUT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stmfts_command
	cbnz	w0, LBB0_1
; %bb.7:
Lloh15:
	adrp	x8, _STMFTS_MS_CX_TUNING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STMFTS_MS_CX_TUNING@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stmfts_command
	cbz	w0, LBB0_9
; %bb.8:
	mov	x2, x0
	ldr	x0, [x19]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_9:
Lloh20:
	adrp	x8, _STMFTS_SS_CX_TUNING@GOTPAGE
Lloh21:
	ldr	x8, [x8, _STMFTS_SS_CX_TUNING@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stmfts_command
	cbz	w0, LBB0_11
; %bb.10:
	mov	x2, x0
	ldr	x0, [x19]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_11:
Lloh25:
	adrp	x8, _STMFTS_FULL_FORCE_CALIBRATION@GOTPAGE
Lloh26:
	ldr	x8, [x8, _STMFTS_FULL_FORCE_CALIBRATION@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stmfts_command
	cbnz	w0, LBB0_1
; %bb.12:
	ldr	x0, [x19]
Lloh28:
	adrp	x8, _STMFTS_SLEEP_IN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _STMFTS_SLEEP_IN@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_i2c_smbus_write_byte
	mov	w0, #0
	b	LBB0_1
LBB0_13:
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_STMFTS_READ_INFO,4,2           ; @STMFTS_READ_INFO
	.comm	_EIO,4,2                        ; @EIO
	.comm	_STMFTS_SYSTEM_RESET,4,2        ; @STMFTS_SYSTEM_RESET
	.comm	_STMFTS_SLEEP_OUT,4,2           ; @STMFTS_SLEEP_OUT
	.comm	_STMFTS_MS_CX_TUNING,4,2        ; @STMFTS_MS_CX_TUNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to perform mutual auto tune: %d\n"

	.comm	_STMFTS_SS_CX_TUNING,4,2        ; @STMFTS_SS_CX_TUNING
l_.str.1:                               ; @.str.1
	.asciz	"failed to perform self auto tune: %d\n"

	.comm	_STMFTS_FULL_FORCE_CALIBRATION,4,2 ; @STMFTS_FULL_FORCE_CALIBRATION
	.comm	_STMFTS_SLEEP_IN,4,2            ; @STMFTS_SLEEP_IN
	.no_dead_strip	_stmfts_power_on
.subsections_via_symbols
