	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function twl6030_calibration
LCPI0_0:
	.quad	56                              ## 0x38
	.quad	60                              ## 0x3c
LCPI0_1:
	.quad	40                              ## 0x28
	.quad	44                              ## 0x2c
LCPI0_2:
	.quad	32                              ## 0x20
	.quad	36                              ## 0x24
LCPI0_3:
	.quad	8                               ## 0x8
	.quad	12                              ## 0xc
LCPI0_4:
	.quad	24                              ## 0x18
	.quad	28                              ## 0x1c
LCPI0_5:
	.quad	48                              ## 0x30
	.quad	52                              ## 0x34
LCPI0_6:
	.quad	16                              ## 0x10
	.quad	20                              ## 0x14
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_twl6030_calibration:                   ## @twl6030_calibration
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_TWL6030_GPADC_NUM_TRIM_REGS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_TWL6030_MODULE_ID2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TWL6030_GPADC_TRIM1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	movl	%ebx, %ecx
	callq	_twl_i2c_read
	testl	%eax, %eax
	js	LBB0_17
## %bb.1:
	movq	_TWL6030_GPADC_MAX_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.2:
	movq	%r15, %xmm0
	pshufd	$68, %xmm0, %xmm1               ## xmm1 = xmm0[0,1,0,1]
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [56,60]
	paddq	%xmm1, %xmm2
	movdqa	%xmm2, -144(%rbp)               ## 16-byte Spill
	movdqa	LCPI0_1(%rip), %xmm2            ## xmm2 = [40,44]
	paddq	%xmm1, %xmm2
	movdqa	%xmm2, -128(%rbp)               ## 16-byte Spill
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = [32,36]
	paddq	%xmm1, %xmm2
	movdqa	%xmm2, -112(%rbp)               ## 16-byte Spill
	movdqa	LCPI0_3(%rip), %xmm2            ## xmm2 = [8,12]
	paddq	%xmm1, %xmm2
	movdqa	%xmm2, -96(%rbp)                ## 16-byte Spill
	movdqa	LCPI0_4(%rip), %xmm2            ## xmm2 = [24,28]
	paddq	%xmm1, %xmm2
	movdqa	%xmm2, -80(%rbp)                ## 16-byte Spill
	movdqa	LCPI0_5(%rip), %xmm2            ## xmm2 = [48,52]
	paddq	%xmm1, %xmm2
	movdqa	%xmm2, -64(%rbp)                ## 16-byte Spill
	paddq	LCPI0_6(%rip), %xmm1
	movdqa	%xmm1, -160(%rbp)               ## 16-byte Spill
	addq	$4, %r15
	pinsrq	$1, %r15, %xmm0
	movdqa	%xmm0, -176(%rbp)               ## 16-byte Spill
	xorl	%ebx, %ebx
	leaq	LJTI0_0(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$14, %ebx
	ja	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %ecx
	movslq	(%r13,%rcx,4), %rcx
	addq	%r13, %rcx
	movdqa	-176(%rbp), %xmm0               ## 16-byte Reload
	jmpq	*%rcx
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movdqa	-160(%rbp), %xmm0               ## 16-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	pextrq	$1, %xmm0, %rax
	movl	(%rax), %r15d
	movq	%xmm0, %rax
	movl	(%rax), %edi
	callq	_twl6030_gpadc_get_trim_offset
	movl	%eax, %r12d
	movl	%r15d, %edi
	callq	_twl6030_gpadc_get_trim_offset
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_twl6030_calibrate_channel
	movq	_TWL6030_GPADC_MAX_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jl	LBB0_3
	jmp	LBB0_14
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movdqa	-64(%rbp), %xmm0                ## 16-byte Reload
	jmp	LBB0_12
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movdqa	-80(%rbp), %xmm0                ## 16-byte Reload
	jmp	LBB0_12
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movdqa	-96(%rbp), %xmm0                ## 16-byte Reload
	jmp	LBB0_12
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movdqa	-112(%rbp), %xmm0               ## 16-byte Reload
	jmp	LBB0_12
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movdqa	-128(%rbp), %xmm0               ## 16-byte Reload
	jmp	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movdqa	-144(%rbp), %xmm0               ## 16-byte Reload
	jmp	LBB0_12
LBB0_14:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_17:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.16:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_TWL6030_GPADC_NUM_TRIM_REGS,4,2 ## @TWL6030_GPADC_NUM_TRIM_REGS
	.comm	_TWL6030_MODULE_ID2,4,2         ## @TWL6030_MODULE_ID2
	.comm	_TWL6030_GPADC_TRIM1,4,2        ## @TWL6030_GPADC_TRIM1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"calibration failed\n"

	.comm	_TWL6030_GPADC_MAX_CHANNELS,4,2 ## @TWL6030_GPADC_MAX_CHANNELS
	.no_dead_strip	_twl6030_calibration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl6030_calibration
_twl6030_calibration:                   ; @twl6030_calibration
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #112
	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, #-88]
Lloh3:
	adrp	x8, _TWL6030_GPADC_NUM_TRIM_REGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TWL6030_GPADC_NUM_TRIM_REGS@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	lsl	x8, x3, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	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
Lloh8:
	adrp	x8, _TWL6030_MODULE_ID2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TWL6030_MODULE_ID2@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _TWL6030_GPADC_TRIM1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TWL6030_GPADC_TRIM1@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x1, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_twl_i2c_read
	tbnz	w0, #31, LBB0_15
; %bb.1:
Lloh14:
	adrp	x24, _TWL6030_GPADC_MAX_CHANNELS@GOTPAGE
Lloh15:
	ldr	x24, [x24, _TWL6030_GPADC_MAX_CHANNELS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.2:
	mov	w21, #0
	add	x10, x20, #56
	add	x9, x20, #60
	stp	x9, x10, [x29, #-104]           ; 16-byte Folded Spill
	add	x10, x20, #40
	add	x9, x20, #44
	stp	x9, x10, [x29, #-120]           ; 16-byte Folded Spill
	add	x10, x20, #32
	add	x9, x20, #36
	stp	x9, x10, [x29, #-136]           ; 16-byte Folded Spill
	add	x10, x20, #8
	add	x9, x20, #12
	stp	x9, x10, [x29, #-152]           ; 16-byte Folded Spill
	add	x10, x20, #24
	add	x9, x20, #28
	stp	x9, x10, [x29, #-168]           ; 16-byte Folded Spill
	add	x10, x20, #48
	add	x9, x20, #52
	stp	x9, x10, [x29, #-184]           ; 16-byte Folded Spill
	add	x25, x20, #16
	add	x26, x20, #20
	add	x27, x20, #4
Lloh16:
	adrp	x28, lJTI0_0@PAGE
Lloh17:
	add	x28, x28, lJTI0_0@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w21, #14
	b.hi	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w9, w21
	adr	x11, LBB0_5
	ldrb	w10, [x28, x9]
	add	x11, x11, x10, lsl #2
	mov	x9, x20
	mov	x10, x27
	br	x11
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x9, x25
	mov	x10, x26
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w22, [x10]
	ldr	w0, [x9]
	bl	_twl6030_gpadc_get_trim_offset
	mov	x23, x0
	mov	x0, x22
	bl	_twl6030_gpadc_get_trim_offset
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_twl6030_calibrate_channel
	ldr	w8, [x24]
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w21, #1
	cmp	w21, w8
	b.lt	LBB0_3
	b	LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	x10, x9, [x29, #-184]           ; 16-byte Folded Reload
	b	LBB0_6
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	x10, x9, [x29, #-168]           ; 16-byte Folded Reload
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x10, x9, [x29, #-152]           ; 16-byte Folded Reload
	b	LBB0_6
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x10, x9, [x29, #-136]           ; 16-byte Folded Reload
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x10, x9, [x29, #-120]           ; 16-byte Folded Reload
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x10, x9, [x29, #-104]           ; 16-byte Folded Reload
	b	LBB0_6
LBB0_14:
	mov	w21, #0
	b	LBB0_16
LBB0_15:
	mov	x21, x0
	ldr	w0, [x19]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_16:
	ldur	x8, [x29, #-88]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x21
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_9-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_11-LBB0_5)>>2
	.byte	(LBB0_12-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_13-LBB0_5)>>2
                                        ; -- End function
	.comm	_TWL6030_GPADC_NUM_TRIM_REGS,4,2 ; @TWL6030_GPADC_NUM_TRIM_REGS
	.comm	_TWL6030_MODULE_ID2,4,2         ; @TWL6030_MODULE_ID2
	.comm	_TWL6030_GPADC_TRIM1,4,2        ; @TWL6030_GPADC_TRIM1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"calibration failed\n"

	.comm	_TWL6030_GPADC_MAX_CHANNELS,4,2 ; @TWL6030_GPADC_MAX_CHANNELS
	.no_dead_strip	_twl6030_calibration
.subsections_via_symbols
