	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function palmas_gpadc_enable
_palmas_gpadc_enable:                   ## @palmas_gpadc_enable
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testl	%edx, %edx
	je	LBB0_7
## %bb.1:
	movl	%esi, %r14d
	movq	_PALMAS_GPADC_RT_CTRL_EXTEND_DELAY_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	(%r15), %r8d
	shll	%cl, %r8d
	movl	16(%r15), %edi
	movq	_PALMAS_GPADC_BASE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_PALMAS_GPADC_RT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PALMAS_GPADC_RT_CTRL_EXTEND_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_palmas_update_bits
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_MASK@GOTPCREL(%rip), %rcx
	movq	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_PALMAS_GPADC_CTRL1_GPADC_FORCE@GOTPCREL(%rip), %rdx
	movq	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	4(%r15), %r8d
	movl	8(%r15), %esi
	shll	%cl, %r8d
	movq	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movl	(%rdx), %ecx
	orl	%ecx, %eax
	orl	%ecx, %r8d
	orl	%esi, %r8d
	movl	16(%r15), %edi
	movl	(%r12), %esi
	movq	_PALMAS_GPADC_CTRL1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %ecx
	callq	_palmas_update_bits
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_PALMAS_GPADC_SW_SELECT_SW_CONV0_SEL_MASK@GOTPCREL(%rip), %rax
	movq	_PALMAS_GPADC_SW_SELECT_SW_CONV_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %ecx
	orl	%edx, %ecx
	orl	%edx, %r14d
	movl	16(%r15), %edi
	movl	(%r12), %esi
	movq	_PALMAS_GPADC_SW_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %r8d
	callq	_palmas_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_12
## %bb.6:
	movl	12(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_11
LBB0_7:
	movl	16(%r15), %edi
	movq	_PALMAS_GPADC_BASE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_PALMAS_GPADC_SW_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_palmas_write
	testl	%eax, %eax
	jns	LBB0_9
## %bb.8:
	movl	12(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
LBB0_9:
	movl	16(%r15), %edi
	movl	(%rbx), %esi
	movq	_PALMAS_GPADC_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PALMAS_GPADC_CTRL1_GPADC_FORCE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r8d, %r8d
	callq	_palmas_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_12
## %bb.10:
	movl	12(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_11
LBB0_2:
	movl	%eax, %ebx
	movl	12(%r15), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_11
LBB0_4:
	movl	%eax, %ebx
	movl	12(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_11:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PALMAS_GPADC_RT_CTRL_EXTEND_DELAY_SHIFT,4,2 ## @PALMAS_GPADC_RT_CTRL_EXTEND_DELAY_SHIFT
	.comm	_PALMAS_GPADC_BASE,4,2          ## @PALMAS_GPADC_BASE
	.comm	_PALMAS_GPADC_RT_CTRL,4,2       ## @PALMAS_GPADC_RT_CTRL
	.comm	_PALMAS_GPADC_RT_CTRL_EXTEND_DELAY,4,2 ## @PALMAS_GPADC_RT_CTRL_EXTEND_DELAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RT_CTRL update failed: %d\n"

	.comm	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_MASK,4,2 ## @PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_MASK
	.comm	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_MASK,4,2 ## @PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_MASK
	.comm	_PALMAS_GPADC_CTRL1_GPADC_FORCE,4,2 ## @PALMAS_GPADC_CTRL1_GPADC_FORCE
	.comm	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_SHIFT,4,2 ## @PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_SHIFT
	.comm	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_SHIFT,4,2 ## @PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_SHIFT
	.comm	_PALMAS_GPADC_CTRL1,4,2         ## @PALMAS_GPADC_CTRL1
L_.str.1:                               ## @.str.1
	.asciz	"Failed to update current setting: %d\n"

	.comm	_PALMAS_GPADC_SW_SELECT_SW_CONV0_SEL_MASK,4,2 ## @PALMAS_GPADC_SW_SELECT_SW_CONV0_SEL_MASK
	.comm	_PALMAS_GPADC_SW_SELECT_SW_CONV_EN,4,2 ## @PALMAS_GPADC_SW_SELECT_SW_CONV_EN
	.comm	_PALMAS_GPADC_SW_SELECT,4,2     ## @PALMAS_GPADC_SW_SELECT
L_.str.2:                               ## @.str.2
	.asciz	"SW_SELECT update failed: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"SW_SELECT write failed: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"CTRL1 update failed: %d\n"

	.no_dead_strip	_palmas_gpadc_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function palmas_gpadc_enable
_palmas_gpadc_enable:                   ; @palmas_gpadc_enable
	.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
	mov	x19, x0
	cbz	w2, LBB0_5
; %bb.1:
	mov	x20, x1
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _PALMAS_GPADC_RT_CTRL_EXTEND_DELAY_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PALMAS_GPADC_RT_CTRL_EXTEND_DELAY_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w4, w8, w9
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x22, _PALMAS_GPADC_BASE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PALMAS_GPADC_BASE@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _PALMAS_GPADC_RT_CTRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PALMAS_GPADC_RT_CTRL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _PALMAS_GPADC_RT_CTRL_EXTEND_DELAY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PALMAS_GPADC_RT_CTRL_EXTEND_DELAY@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	bl	_palmas_update_bits
	tbnz	w0, #31, LBB0_9
; %bb.2:
Lloh11:
	adrp	x8, _PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_MASK@GOTPAGEOFF]
Lloh13:
	adrp	x9, _PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _PALMAS_GPADC_CTRL1_GPADC_FORCE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PALMAS_GPADC_CTRL1_GPADC_FORCE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w3, w8, w9
Lloh20:
	adrp	x8, _PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_SHIFT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldp	w10, w11, [x19, #4]
	lsl	w8, w10, w8
Lloh23:
	adrp	x10, _PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_SHIFT@GOTPAGE
Lloh24:
	ldr	x10, [x10, _PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_SHIFT@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	lsl	w10, w11, w10
	orr	w8, w8, w9
	orr	w4, w8, w10
	ldr	w0, [x19, #16]
	ldr	w1, [x22]
Lloh26:
	adrp	x8, _PALMAS_GPADC_CTRL1@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PALMAS_GPADC_CTRL1@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	bl	_palmas_update_bits
	tbnz	w0, #31, LBB0_10
; %bb.3:
Lloh29:
	adrp	x8, _PALMAS_GPADC_SW_SELECT_SW_CONV0_SEL_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PALMAS_GPADC_SW_SELECT_SW_CONV0_SEL_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _PALMAS_GPADC_SW_SELECT_SW_CONV_EN@GOTPAGE
Lloh33:
	ldr	x9, [x9, _PALMAS_GPADC_SW_SELECT_SW_CONV_EN@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w3, w9, w8
	orr	w4, w9, w20
	ldr	w0, [x19, #16]
	ldr	w1, [x22]
Lloh35:
	adrp	x8, _PALMAS_GPADC_SW_SELECT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PALMAS_GPADC_SW_SELECT@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	bl	_palmas_update_bits
	mov	x21, x0
	tbz	w0, #31, LBB0_12
; %bb.4:
	ldr	w0, [x19, #12]
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_5:
	ldr	w0, [x19, #16]
Lloh40:
	adrp	x20, _PALMAS_GPADC_BASE@GOTPAGE
Lloh41:
	ldr	x20, [x20, _PALMAS_GPADC_BASE@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh42:
	adrp	x8, _PALMAS_GPADC_SW_SELECT@GOTPAGE
Lloh43:
	ldr	x8, [x8, _PALMAS_GPADC_SW_SELECT@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_palmas_write
	tbz	w0, #31, LBB0_7
; %bb.6:
	mov	x2, x0
	ldr	w0, [x19, #12]
Lloh45:
	adrp	x1, l_.str.3@PAGE
Lloh46:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_7:
	ldr	w0, [x19, #16]
	ldr	w1, [x20]
Lloh47:
	adrp	x8, _PALMAS_GPADC_CTRL1@GOTPAGE
Lloh48:
	ldr	x8, [x8, _PALMAS_GPADC_CTRL1@GOTPAGEOFF]
Lloh49:
	ldr	w2, [x8]
Lloh50:
	adrp	x8, _PALMAS_GPADC_CTRL1_GPADC_FORCE@GOTPAGE
Lloh51:
	ldr	x8, [x8, _PALMAS_GPADC_CTRL1_GPADC_FORCE@GOTPAGEOFF]
Lloh52:
	ldr	w3, [x8]
	mov	w4, #0
	bl	_palmas_update_bits
	mov	x21, x0
	tbz	w0, #31, LBB0_12
; %bb.8:
	ldr	w0, [x19, #12]
Lloh53:
	adrp	x1, l_.str.4@PAGE
Lloh54:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_9:
	mov	x21, x0
	ldr	w0, [x19, #12]
Lloh55:
	adrp	x1, l_.str@PAGE
Lloh56:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
	mov	x21, x0
	ldr	w0, [x19, #12]
Lloh57:
	adrp	x1, l_.str.1@PAGE
Lloh58:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	mov	x2, x21
	bl	_dev_err
LBB0_12:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_PALMAS_GPADC_RT_CTRL_EXTEND_DELAY_SHIFT,4,2 ; @PALMAS_GPADC_RT_CTRL_EXTEND_DELAY_SHIFT
	.comm	_PALMAS_GPADC_BASE,4,2          ; @PALMAS_GPADC_BASE
	.comm	_PALMAS_GPADC_RT_CTRL,4,2       ; @PALMAS_GPADC_RT_CTRL
	.comm	_PALMAS_GPADC_RT_CTRL_EXTEND_DELAY,4,2 ; @PALMAS_GPADC_RT_CTRL_EXTEND_DELAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RT_CTRL update failed: %d\n"

	.comm	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_MASK,4,2 ; @PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_MASK
	.comm	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_MASK,4,2 ; @PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_MASK
	.comm	_PALMAS_GPADC_CTRL1_GPADC_FORCE,4,2 ; @PALMAS_GPADC_CTRL1_GPADC_FORCE
	.comm	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_SHIFT,4,2 ; @PALMAS_GPADC_CTRL1_CURRENT_SRC_CH0_SHIFT
	.comm	_PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_SHIFT,4,2 ; @PALMAS_GPADC_CTRL1_CURRENT_SRC_CH3_SHIFT
	.comm	_PALMAS_GPADC_CTRL1,4,2         ; @PALMAS_GPADC_CTRL1
l_.str.1:                               ; @.str.1
	.asciz	"Failed to update current setting: %d\n"

	.comm	_PALMAS_GPADC_SW_SELECT_SW_CONV0_SEL_MASK,4,2 ; @PALMAS_GPADC_SW_SELECT_SW_CONV0_SEL_MASK
	.comm	_PALMAS_GPADC_SW_SELECT_SW_CONV_EN,4,2 ; @PALMAS_GPADC_SW_SELECT_SW_CONV_EN
	.comm	_PALMAS_GPADC_SW_SELECT,4,2     ; @PALMAS_GPADC_SW_SELECT
l_.str.2:                               ; @.str.2
	.asciz	"SW_SELECT update failed: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"SW_SELECT write failed: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"CTRL1 update failed: %d\n"

	.no_dead_strip	_palmas_gpadc_enable
.subsections_via_symbols
