	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function npcm_adc_read_raw
_npcm_adc_read_raw:                     ## @npcm_adc_read_raw
	.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
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_iio_priv
	movq	%rax, %r12
	cmpq	$128, %r14
	je	LBB0_5
## %bb.1:
	cmpq	$129, %r14
	je	LBB0_7
## %bb.2:
	cmpq	$130, %r14
	jne	LBB0_9
## %bb.3:
	movq	%r13, %rdi
	callq	_mutex_lock
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_npcm_adc_read
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.4:
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_13
LBB0_5:
	movl	4(%r12), %edi
	callq	_IS_ERR
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movq	_NPCM_INT_VREF_MV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_7:
	movl	(%r12), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_8:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_10:
	movl	4(%r12), %edi
	callq	_regulator_get_voltage
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
LBB0_11:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_NPCM_RESOLUTION_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	_IIO_VAL_FRACTIONAL_LOG2@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NPCM ADC read failed\n"

	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_NPCM_INT_VREF_MV,4,2           ## @NPCM_INT_VREF_MV
	.comm	_NPCM_RESOLUTION_BITS,4,2       ## @NPCM_RESOLUTION_BITS
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ## @IIO_VAL_FRACTIONAL_LOG2
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_npcm_adc_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function npcm_adc_read_raw
_npcm_adc_read_raw:                     ; @npcm_adc_read_raw
	.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	x24, x4
	mov	x20, x3
	mov	x19, x2
	mov	x23, x1
	mov	x22, x0
	bl	_iio_priv
	mov	x21, x0
	cmp	x24, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	x24, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	x24, #130
	b.ne	LBB0_9
; %bb.3:
	mov	x0, x22
	bl	_mutex_lock
	ldr	w2, [x23]
	mov	x0, x21
	mov	x1, x19
	bl	_npcm_adc_read
	mov	x19, x0
	mov	x0, x22
	bl	_mutex_unlock
	cbz	w19, LBB0_8
; %bb.4:
	ldr	w0, [x21, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_5:
	ldr	w0, [x21, #4]
	bl	_IS_ERR
	cbz	w0, LBB0_10
; %bb.6:
Lloh2:
	adrp	x8, _NPCM_INT_VREF_MV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NPCM_INT_VREF_MV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	b	LBB0_11
LBB0_7:
	ldr	w8, [x21]
	str	w8, [x19]
LBB0_8:
Lloh5:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_13
LBB0_10:
	ldr	w0, [x21, #4]
	bl	_regulator_get_voltage
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
LBB0_11:
Lloh10:
	adrp	x9, _NPCM_RESOLUTION_BITS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _NPCM_RESOLUTION_BITS@GOTPAGEOFF]
	str	w8, [x19]
Lloh12:
	ldr	w8, [x9]
	str	w8, [x20]
Lloh13:
	adrp	x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGEOFF]
LBB0_12:
	ldr	w19, [x8]
LBB0_13:
	mov	x0, x19
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NPCM ADC read failed\n"

	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_NPCM_INT_VREF_MV,4,2           ; @NPCM_INT_VREF_MV
	.comm	_NPCM_RESOLUTION_BITS,4,2       ; @NPCM_RESOLUTION_BITS
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ; @IIO_VAL_FRACTIONAL_LOG2
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_npcm_adc_read_raw
.subsections_via_symbols
