	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s6sy761_power_on
_s6sy761_power_on:                      ## @s6sy761_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_S6SY761_EVENT_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	4(%rbx), %edi
	callq	_ARRAY_SIZE
	movl	4(%rbx), %esi
	movl	%eax, %edi
	callq	_regulator_bulk_enable
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movl	$140, %edi
	callq	_msleep
	movl	(%rbx), %edi
	movq	_S6SY761_READ_ONE_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rcx
	callq	_i2c_smbus_read_i2c_block_data
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movl	(%r14), %eax
	shrl	$2, %eax
	andl	$15, %eax
	movq	_S6SY761_EVENT_INFO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.3:
	movq	_S6SY761_EVENT_VENDOR_INFO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
LBB0_4:
	movl	4(%r14), %eax
	movq	_S6SY761_INFO_BOOT_COMPLETE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.6:
	movl	(%rbx), %edi
	movq	_S6SY761_BOOT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:
	movq	_S6SY761_BS_APPLICATION@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.8:
	movl	(%rbx), %edi
	movq	_S6SY761_TOUCH_FUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_S6SY761_MASK_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_i2c_smbus_write_word_data
	jmp	LBB0_9
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_S6SY761_EVENT_SIZE,4,2         ## @S6SY761_EVENT_SIZE
	.comm	_S6SY761_READ_ONE_EVENT,4,2     ## @S6SY761_READ_ONE_EVENT
	.comm	_S6SY761_EVENT_INFO,4,2         ## @S6SY761_EVENT_INFO
	.comm	_S6SY761_EVENT_VENDOR_INFO,4,2  ## @S6SY761_EVENT_VENDOR_INFO
	.comm	_S6SY761_INFO_BOOT_COMPLETE,4,2 ## @S6SY761_INFO_BOOT_COMPLETE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_S6SY761_BOOT_STATUS,4,2        ## @S6SY761_BOOT_STATUS
	.comm	_S6SY761_BS_APPLICATION,4,2     ## @S6SY761_BS_APPLICATION
	.comm	_S6SY761_TOUCH_FUNCTION,4,2     ## @S6SY761_TOUCH_FUNCTION
	.comm	_S6SY761_MASK_TOUCH,4,2         ## @S6SY761_MASK_TOUCH
	.no_dead_strip	_s6sy761_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s6sy761_power_on
_s6sy761_power_on:                      ; @s6sy761_power_on
	.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
	sub	sp, sp, #16
	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, #-40]
Lloh3:
	adrp	x21, _S6SY761_EVENT_SIZE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _S6SY761_EVENT_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	w0, [x0, #4]
	bl	_ARRAY_SIZE
	ldr	w1, [x19, #4]
	bl	_regulator_bulk_enable
	cbnz	w0, LBB0_8
; %bb.1:
	mov	w0, #140
	bl	_msleep
	ldr	w0, [x19]
Lloh7:
	adrp	x8, _S6SY761_READ_ONE_EVENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _S6SY761_READ_ONE_EVENT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x3, x20
	bl	_i2c_smbus_read_i2c_block_data
	tbnz	w0, #31, LBB0_8
; %bb.2:
	ldr	w8, [x20]
	ubfx	w8, w8, #2, #4
Lloh10:
	adrp	x9, _S6SY761_EVENT_INFO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _S6SY761_EVENT_INFO@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _S6SY761_EVENT_VENDOR_INFO@GOTPAGE
Lloh14:
	ldr	x10, [x10, _S6SY761_EVENT_VENDOR_INFO@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x20, #4]
Lloh16:
	adrp	x9, _S6SY761_INFO_BOOT_COMPLETE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _S6SY761_INFO_BOOT_COMPLETE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.4:
	ldr	w0, [x19]
Lloh19:
	adrp	x8, _S6SY761_BOOT_STATUS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _S6SY761_BOOT_STATUS@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	tbnz	w0, #31, LBB0_8
; %bb.5:
Lloh22:
	adrp	x8, _S6SY761_BS_APPLICATION@GOTPAGE
Lloh23:
	ldr	x8, [x8, _S6SY761_BS_APPLICATION@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x19]
Lloh25:
	adrp	x8, _S6SY761_TOUCH_FUNCTION@GOTPAGE
Lloh26:
	ldr	x8, [x8, _S6SY761_TOUCH_FUNCTION@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _S6SY761_MASK_TOUCH@GOTPAGE
Lloh29:
	ldr	x8, [x8, _S6SY761_MASK_TOUCH@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	bl	_i2c_smbus_write_word_data
	b	LBB0_8
LBB0_7:
Lloh31:
	adrp	x8, _ENODEV@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	sub	sp, x29, #32
	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_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_S6SY761_EVENT_SIZE,4,2         ; @S6SY761_EVENT_SIZE
	.comm	_S6SY761_READ_ONE_EVENT,4,2     ; @S6SY761_READ_ONE_EVENT
	.comm	_S6SY761_EVENT_INFO,4,2         ; @S6SY761_EVENT_INFO
	.comm	_S6SY761_EVENT_VENDOR_INFO,4,2  ; @S6SY761_EVENT_VENDOR_INFO
	.comm	_S6SY761_INFO_BOOT_COMPLETE,4,2 ; @S6SY761_INFO_BOOT_COMPLETE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_S6SY761_BOOT_STATUS,4,2        ; @S6SY761_BOOT_STATUS
	.comm	_S6SY761_BS_APPLICATION,4,2     ; @S6SY761_BS_APPLICATION
	.comm	_S6SY761_TOUCH_FUNCTION,4,2     ; @S6SY761_TOUCH_FUNCTION
	.comm	_S6SY761_MASK_TOUCH,4,2         ; @S6SY761_MASK_TOUCH
	.no_dead_strip	_s6sy761_power_on
.subsections_via_symbols
