	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function device_gpadc_init
_device_gpadc_init:                     ## @device_gpadc_init
	.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, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	_PM800_GPADC_MISC_CONFIG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PM800_GPADC_MISC_GPFSM_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movq	_PM800_GPADC_MEAS_EN1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PM800_MEAS_EN1_VBAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movq	_PM800_GPADC_MEAS_EN2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PM800_MEAS_EN2_RFTMP@GOTPCREL(%rip), %rax
	movq	_PM800_MEAS_GP0_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_9
## %bb.5:
	movq	_PM800_GPADC_GP_BIAS_EN0@GOTPCREL(%rip), %rcx
	movq	_PM800_GPADC_GP_BIAS_EN1@GOTPCREL(%rip), %rdx
	movq	_PM800_GPADC_GP_BIAS_EN2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PM800_GPADC_GP_BIAS_EN3@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rcx), %eax
	movl	(%rdx), %edx
	orl	%eax, %edx
	orl	%esi, %edx
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	cmpq	$0, (%r15)
	movl	%edx, %ecx
	je	LBB0_8
LBB0_7:
	orl	%esi, %eax
	movl	%eax, %ecx
LBB0_8:
	movq	_PM800_GP_BIAS_ENA1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_9
## %bb.11:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_10
LBB0_1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Warning: gpadc regmap is not available!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PM800_GPADC_MISC_CONFIG2,4,2   ## @PM800_GPADC_MISC_CONFIG2
	.comm	_PM800_GPADC_MISC_GPFSM_EN,4,2  ## @PM800_GPADC_MISC_GPFSM_EN
	.comm	_PM800_GPADC_MEAS_EN1,4,2       ## @PM800_GPADC_MEAS_EN1
	.comm	_PM800_MEAS_EN1_VBAT,4,2        ## @PM800_MEAS_EN1_VBAT
	.comm	_PM800_GPADC_MEAS_EN2,4,2       ## @PM800_GPADC_MEAS_EN2
	.comm	_PM800_MEAS_EN2_RFTMP,4,2       ## @PM800_MEAS_EN2_RFTMP
	.comm	_PM800_MEAS_GP0_EN,4,2          ## @PM800_MEAS_GP0_EN
	.comm	_PM800_GPADC_GP_BIAS_EN0,4,2    ## @PM800_GPADC_GP_BIAS_EN0
	.comm	_PM800_GPADC_GP_BIAS_EN1,4,2    ## @PM800_GPADC_GP_BIAS_EN1
	.comm	_PM800_GPADC_GP_BIAS_EN2,4,2    ## @PM800_GPADC_GP_BIAS_EN2
	.comm	_PM800_GPADC_GP_BIAS_EN3,4,2    ## @PM800_GPADC_GP_BIAS_EN3
	.comm	_PM800_GP_BIAS_ENA1,4,2         ## @PM800_GP_BIAS_ENA1
L_.str.1:                               ## @.str.1
	.asciz	"pm800 device_gpadc_init: Done\n"

L_.str.2:                               ## @.str.2
	.asciz	"pm800 device_gpadc_init: Failed!\n"

	.no_dead_strip	_device_gpadc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function device_gpadc_init
_device_gpadc_init:                     ; @device_gpadc_init
	.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
	ldr	x8, [x0, #8]
	ldr	x20, [x8]
	cbz	x20, LBB0_10
; %bb.1:
	mov	x21, x1
Lloh0:
	adrp	x8, _PM800_GPADC_MISC_CONFIG2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PM800_GPADC_MISC_CONFIG2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _PM800_GPADC_MISC_GPFSM_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PM800_GPADC_MISC_GPFSM_EN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x2
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_9
; %bb.2:
Lloh6:
	adrp	x8, _PM800_GPADC_MEAS_EN1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PM800_GPADC_MEAS_EN1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _PM800_MEAS_EN1_VBAT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PM800_MEAS_EN1_VBAT@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x2
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_9
; %bb.3:
Lloh12:
	adrp	x8, _PM800_GPADC_MEAS_EN2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PM800_GPADC_MEAS_EN2@GOTPAGEOFF]
Lloh14:
	adrp	x9, _PM800_MEAS_EN2_RFTMP@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PM800_MEAS_EN2_RFTMP@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	ldr	w8, [x9]
Lloh18:
	adrp	x9, _PM800_MEAS_GP0_EN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PM800_MEAS_GP0_EN@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	mov	x3, x2
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_9
; %bb.4:
Lloh21:
	adrp	x8, _PM800_GPADC_GP_BIAS_EN0@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PM800_GPADC_GP_BIAS_EN0@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x8]
Lloh24:
	adrp	x8, _PM800_GPADC_GP_BIAS_EN1@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PM800_GPADC_GP_BIAS_EN1@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x8]
Lloh27:
	adrp	x8, _PM800_GPADC_GP_BIAS_EN2@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PM800_GPADC_GP_BIAS_EN2@GOTPAGEOFF]
Lloh29:
	ldr	w11, [x8]
Lloh30:
	adrp	x8, _PM800_GPADC_GP_BIAS_EN3@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PM800_GPADC_GP_BIAS_EN3@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	orr	w9, w11, w9
	orr	w10, w9, w10
	orr	w2, w10, w8
	cbz	x21, LBB0_6
; %bb.5:
	ldr	x10, [x21]
	mov	x3, x2
	cbz	x10, LBB0_7
LBB0_6:
	orr	w3, w9, w8
LBB0_7:
Lloh33:
	adrp	x8, _PM800_GP_BIAS_ENA1@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PM800_GP_BIAS_ENA1@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_9
; %bb.8:
	ldr	w0, [x19]
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	mov	w22, #0
	b	LBB0_11
LBB0_9:
	mov	x22, x0
	ldr	w0, [x19]
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_info
	b	LBB0_11
LBB0_10:
	ldr	w0, [x19]
Lloh40:
	adrp	x1, l_.str@PAGE
Lloh41:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh42:
	adrp	x8, _EINVAL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_11:
	mov	x0, x22
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Warning: gpadc regmap is not available!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PM800_GPADC_MISC_CONFIG2,4,2   ; @PM800_GPADC_MISC_CONFIG2
	.comm	_PM800_GPADC_MISC_GPFSM_EN,4,2  ; @PM800_GPADC_MISC_GPFSM_EN
	.comm	_PM800_GPADC_MEAS_EN1,4,2       ; @PM800_GPADC_MEAS_EN1
	.comm	_PM800_MEAS_EN1_VBAT,4,2        ; @PM800_MEAS_EN1_VBAT
	.comm	_PM800_GPADC_MEAS_EN2,4,2       ; @PM800_GPADC_MEAS_EN2
	.comm	_PM800_MEAS_EN2_RFTMP,4,2       ; @PM800_MEAS_EN2_RFTMP
	.comm	_PM800_MEAS_GP0_EN,4,2          ; @PM800_MEAS_GP0_EN
	.comm	_PM800_GPADC_GP_BIAS_EN0,4,2    ; @PM800_GPADC_GP_BIAS_EN0
	.comm	_PM800_GPADC_GP_BIAS_EN1,4,2    ; @PM800_GPADC_GP_BIAS_EN1
	.comm	_PM800_GPADC_GP_BIAS_EN2,4,2    ; @PM800_GPADC_GP_BIAS_EN2
	.comm	_PM800_GPADC_GP_BIAS_EN3,4,2    ; @PM800_GPADC_GP_BIAS_EN3
	.comm	_PM800_GP_BIAS_ENA1,4,2         ; @PM800_GP_BIAS_ENA1
l_.str.1:                               ; @.str.1
	.asciz	"pm800 device_gpadc_init: Done\n"

l_.str.2:                               ; @.str.2
	.asciz	"pm800 device_gpadc_init: Failed!\n"

	.no_dead_strip	_device_gpadc_init
.subsections_via_symbols
