	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp288_adc_set_ts
_axp288_adc_set_ts:                     ## @axp288_adc_set_ts
	.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
	cmpl	$0, 4(%rdi)
	je	LBB0_5
## %bb.1:
	movq	_AXP288_GP_ADC_H@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jne	LBB0_5
## %bb.2:
	movl	%esi, %ebx
	movl	(%rdi), %edi
	movq	_AXP288_ADC_TS_PIN_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AXP288_ADC_TS_CURRENT_ON_OFF_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_AXP288_ADC_TS_CURRENT_ON_ONDEMAND@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_5
## %bb.4:
	movl	$6000, %edi                     ## imm = 0x1770
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AXP288_GP_ADC_H,8,3            ## @AXP288_GP_ADC_H
	.comm	_AXP288_ADC_TS_PIN_CTRL,4,2     ## @AXP288_ADC_TS_PIN_CTRL
	.comm	_AXP288_ADC_TS_CURRENT_ON_OFF_MASK,4,2 ## @AXP288_ADC_TS_CURRENT_ON_OFF_MASK
	.comm	_AXP288_ADC_TS_CURRENT_ON_ONDEMAND,4,2 ## @AXP288_ADC_TS_CURRENT_ON_ONDEMAND
	.no_dead_strip	_axp288_adc_set_ts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axp288_adc_set_ts
_axp288_adc_set_ts:                     ; @axp288_adc_set_ts
	.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
	ldr	w8, [x0, #4]
Lloh0:
	adrp	x9, _AXP288_GP_ADC_H@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AXP288_GP_ADC_H@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	w8, #0
	ccmp	x9, x2, #0, ne
	b.eq	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x19, x1
	ldr	w0, [x0]
Lloh3:
	adrp	x8, _AXP288_ADC_TS_PIN_CTRL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AXP288_ADC_TS_PIN_CTRL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _AXP288_ADC_TS_CURRENT_ON_OFF_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AXP288_ADC_TS_CURRENT_ON_OFF_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x3, x19
	bl	_regmap_update_bits
	cbz	w0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh9:
	adrp	x8, _AXP288_ADC_TS_CURRENT_ON_ONDEMAND@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AXP288_ADC_TS_CURRENT_ON_ONDEMAND@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_1
; %bb.5:
	mov	w0, #6000
	mov	w1, #10000
	bl	_usleep_range
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AXP288_GP_ADC_H,8,3            ; @AXP288_GP_ADC_H
	.comm	_AXP288_ADC_TS_PIN_CTRL,4,2     ; @AXP288_ADC_TS_PIN_CTRL
	.comm	_AXP288_ADC_TS_CURRENT_ON_OFF_MASK,4,2 ; @AXP288_ADC_TS_CURRENT_ON_OFF_MASK
	.comm	_AXP288_ADC_TS_CURRENT_ON_ONDEMAND,4,2 ; @AXP288_ADC_TS_CURRENT_ON_ONDEMAND
	.no_dead_strip	_axp288_adc_set_ts
.subsections_via_symbols
