	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp3911_read_raw
_mcp3911_read_raw:                      ## @mcp3911_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
	subq	$24, %rsp
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	callq	_iio_priv
	movq	%rax, %rdi
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%rdi, %r12
	callq	_mutex_lock
	cmpq	$128, %r14
	je	LBB0_7
## %bb.1:
	cmpq	$130, %r14
	je	LBB0_6
## %bb.2:
	cmpq	$129, %r14
	jne	LBB0_14
## %bb.3:
	movl	(%r15), %edi
	callq	_MCP3911_CHANNEL
	jmp	LBB0_4
LBB0_7:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	4(%r12), %edi
	testl	%edi, %edi
	je	LBB0_11
## %bb.8:
	callq	_regulator_get_voltage
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movl	%ebx, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	jmp	LBB0_12
LBB0_6:
	movl	(%r15), %edi
	callq	_MCP3911_OFFCAL
LBB0_4:
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	$3, %ecx
	callq	_mcp3911_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.5:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_MCP3911_INT_VREF_UV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	$24, (%r15)
	movq	_IIO_VAL_FRACTIONAL_LOG2@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %ebx
LBB0_14:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get vref voltage: %d\n"

	.comm	_MCP3911_INT_VREF_UV,4,2        ## @MCP3911_INT_VREF_UV
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ## @IIO_VAL_FRACTIONAL_LOG2
	.no_dead_strip	_mcp3911_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcp3911_read_raw
_mcp3911_read_raw:                      ; @mcp3911_read_raw
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x24, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	bl	_iio_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	bl	_mutex_lock
	cmp	x24, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	x24, #130
	b.eq	LBB0_7
; %bb.2:
	cmp	x24, #129
	b.ne	LBB0_9
; %bb.3:
	ldr	w0, [x22]
	bl	_MCP3911_CHANNEL
	b	LBB0_8
LBB0_4:
	ldr	w0, [x19, #4]
	cbz	w0, LBB0_10
; %bb.5:
	bl	_regulator_get_voltage
	mov	x22, x0
	tbnz	w0, #31, LBB0_12
; %bb.6:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w22, w8
	lsr	x8, x8, #38
	b	LBB0_11
LBB0_7:
	ldr	w0, [x22]
	bl	_MCP3911_OFFCAL
LBB0_8:
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	mov	w3, #3
	bl	_mcp3911_read
Lloh3:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w22, w8, w0, eq
	b	LBB0_13
LBB0_9:
	neg	w22, w25
	b	LBB0_13
LBB0_10:
Lloh6:
	adrp	x8, _MCP3911_INT_VREF_UV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MCP3911_INT_VREF_UV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
LBB0_11:
	str	w8, [x20]
	mov	w8, #24
	str	w8, [x21]
Lloh9:
	adrp	x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
	b	LBB0_13
LBB0_12:
	ldr	w0, [x23]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get vref voltage: %d\n"

	.comm	_MCP3911_INT_VREF_UV,4,2        ; @MCP3911_INT_VREF_UV
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ; @IIO_VAL_FRACTIONAL_LOG2
	.no_dead_strip	_mcp3911_read_raw
.subsections_via_symbols
