	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function powr1220_read_adc
_powr1220_read_adc:                     ## @powr1220_read_adc
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	callq	_dev_get_drvdata
	movq	%rax, %r15
	leaq	24(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	32(%r15), %rax
	movslq	%ebx, %r13
	movq	_HZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rax,%r13,8), %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_1
LBB0_2:
	movq	8(%r15), %rax
	movl	(%rax,%r13,4), %eax
	movq	_ADC_MAX_LOW_MEASUREMENT_MV@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setg	%cl
	testl	%eax, %eax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %eax
	shll	$4, %eax
	movl	40(%r15), %edi
	movq	_ADC_MUX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%r13d, %edx
	orl	%eax, %edx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movl	$200, %edi
	callq	_udelay
	movl	40(%r15), %edi
	movq	_ADC_VALUE_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	40(%r15), %edi
	movq	_ADC_VALUE_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	shrl	$4, %r12d
	shll	$4, %ebx
	orl	%r12d, %ebx
	movq	_ADC_STEP_MV@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	movq	16(%r15), %rax
	movl	%ebx, (%rax,%r13,4)
	movq	(%r15), %rax
	movl	$1, (%rax,%r13,4)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	32(%r15), %rcx
	movq	%rax, (%rcx,%r13,8)
	movq	8(%r15), %rax
	cmpl	(%rax,%r13,4), %ebx
	jle	LBB0_9
## %bb.7:
	movl	%ebx, (%rax,%r13,4)
	jmp	LBB0_9
LBB0_1:
	movq	(%r15), %rax
	cmpl	$0, (%rax,%r13,4)
	je	LBB0_2
## %bb.8:
	movq	16(%r15), %rax
	movl	(%rax,%r13,4), %ebx
	jmp	LBB0_9
LBB0_4:
	movl	%r12d, %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.comm	_ADC_MAX_LOW_MEASUREMENT_MV,4,2 ## @ADC_MAX_LOW_MEASUREMENT_MV
	.comm	_ADC_MUX,4,2                    ## @ADC_MUX
	.comm	_ADC_VALUE_LOW,4,2              ## @ADC_VALUE_LOW
	.comm	_ADC_VALUE_HIGH,4,2             ## @ADC_VALUE_HIGH
	.comm	_ADC_STEP_MV,4,2                ## @ADC_STEP_MV
	.no_dead_strip	_powr1220_read_adc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function powr1220_read_adc
_powr1220_read_adc:                     ; @powr1220_read_adc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	bl	_dev_get_drvdata
	mov	x20, x0
	add	x19, x0, #24
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x0, [x23]
	ldr	x8, [x20, #32]
	sxtw	x22, w21
	ldr	x8, [x8, w21, sxtw #3]
Lloh2:
	adrp	x9, _HZ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_time_after
	cbz	x0, LBB0_6
LBB0_1:
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x22, lsl #2]
Lloh5:
	adrp	x9, _ADC_MAX_LOW_MEASUREMENT_MV@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ADC_MAX_LOW_MEASUREMENT_MV@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	ccmp	w8, #0, #4, le
	mov	w8, #16
	csel	w8, w8, wzr, eq
	ldr	w0, [x20, #40]
Lloh8:
	adrp	x9, _ADC_MUX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ADC_MUX@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x9]
	orr	w2, w8, w21
	bl	_i2c_smbus_write_byte_data
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.2:
	mov	w0, #200
	bl	_udelay
	ldr	w0, [x20, #40]
Lloh11:
	adrp	x8, _ADC_VALUE_LOW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ADC_VALUE_LOW@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	tbnz	w0, #31, LBB0_9
; %bb.3:
	ldr	w0, [x20, #40]
Lloh14:
	adrp	x8, _ADC_VALUE_HIGH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ADC_VALUE_HIGH@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	tbnz	w0, #31, LBB0_8
; %bb.4:
	lsl	w8, w0, #4
	orr	w8, w8, w21, lsr #4
Lloh17:
	adrp	x9, _ADC_STEP_MV@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ADC_STEP_MV@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	mul	w21, w9, w8
	ldr	x8, [x20, #16]
	lsl	x9, x22, #2
	str	w21, [x8, x9]
	mov	w10, #1
	ldp	x11, x8, [x20]
	str	w10, [x11, x9]
	ldr	x10, [x23]
	ldr	x11, [x20, #32]
	str	x10, [x11, x22, lsl #3]
	ldr	w9, [x8, x9]
	cmp	w21, w9
	b.le	LBB0_9
; %bb.5:
	str	w21, [x8, x22, lsl #2]
	b	LBB0_9
LBB0_6:
	ldr	x8, [x20]
	ldr	w8, [x8, x22, lsl #2]
	cbz	w8, LBB0_1
; %bb.7:
	ldr	x8, [x20, #16]
	ldr	w21, [x8, x22, lsl #2]
	b	LBB0_9
LBB0_8:
	mov	x21, x0
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.comm	_ADC_MAX_LOW_MEASUREMENT_MV,4,2 ; @ADC_MAX_LOW_MEASUREMENT_MV
	.comm	_ADC_MUX,4,2                    ; @ADC_MUX
	.comm	_ADC_VALUE_LOW,4,2              ; @ADC_VALUE_LOW
	.comm	_ADC_VALUE_HIGH,4,2             ; @ADC_VALUE_HIGH
	.comm	_ADC_STEP_MV,4,2                ; @ADC_STEP_MV
	.no_dead_strip	_powr1220_read_adc
.subsections_via_symbols
