	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elants_i2c_power_on
_elants_i2c_power_on:                   ## @elants_i2c_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_IS_ERR_OR_NULL
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movl	(%r14), %edi
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	4(%r14), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_5
LBB0_3:
	movl	16(%r14), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	4(%r14), %edi
	callq	_regulator_disable
LBB0_5:
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	_ELAN_POWERON_DELAY_USEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_udelay
	movl	(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movq	_ELAN_RESET_DELAY_MSEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable vcc33 regulator: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to enable vccio regulator: %d\n"

	.comm	_ELAN_POWERON_DELAY_USEC,4,2    ## @ELAN_POWERON_DELAY_USEC
	.comm	_ELAN_RESET_DELAY_MSEC,4,2      ## @ELAN_RESET_DELAY_MSEC
	.no_dead_strip	_elants_i2c_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function elants_i2c_power_on
_elants_i2c_power_on:                   ; @elants_i2c_power_on
	.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
	ldr	w0, [x0]
	bl	_IS_ERR_OR_NULL
	cbz	x0, LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_7
LBB0_2:
	ldr	w0, [x19]
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	ldr	w0, [x19, #4]
	bl	_regulator_enable
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19, #16]
	bl	_regulator_enable
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.5:
	ldr	x0, [x19, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	ldr	w0, [x19, #4]
	bl	_regulator_disable
LBB0_6:
	ldr	w0, [x19]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh4:
	adrp	x8, _ELAN_POWERON_DELAY_USEC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ELAN_POWERON_DELAY_USEC@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_udelay
	ldr	w0, [x19]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
Lloh7:
	adrp	x8, _ELAN_RESET_DELAY_MSEC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ELAN_RESET_DELAY_MSEC@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_msleep
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable vcc33 regulator: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to enable vccio regulator: %d\n"

	.comm	_ELAN_POWERON_DELAY_USEC,4,2    ; @ELAN_POWERON_DELAY_USEC
	.comm	_ELAN_RESET_DELAY_MSEC,4,2      ; @ELAN_RESET_DELAY_MSEC
	.no_dead_strip	_elants_i2c_power_on
.subsections_via_symbols
