	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad7291_read_raw
_ad7291_read_raw:                       ## @ad7291_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, %r13
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	callq	_iio_priv
	movq	%rax, %r12
	cmpq	$130, %r14
	je	LBB0_7
## %bb.1:
	cmpq	$132, %r14
	je	LBB0_14
## %bb.2:
	cmpq	$131, %r14
	jne	LBB0_12
## %bb.3:
	movq	%rax, %r15
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_15
## %bb.4:
	cmpl	$128, %eax
	jne	LBB0_12
## %bb.5:
	addq	$12, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	(%r12), %r13d
	movq	_AD7291_AUTOCYCLE@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_22
## %bb.6:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_7:
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_18
## %bb.8:
	cmpl	$128, %eax
	jne	LBB0_12
## %bb.9:
	movl	4(%r12), %edi
	testl	%edi, %edi
	je	LBB0_25
## %bb.10:
	callq	_regulator_get_voltage
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_21
## %bb.11:
	movl	%ebx, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	jmp	LBB0_26
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_14:
	movl	8(%r12), %edi
	movq	_AD7291_T_AVERAGE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_15:
	movl	8(%r12), %edi
	movq	_AD7291_T_SENSE@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %esi
	callq	_i2c_smbus_read_word_swapped
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_21
## %bb.17:
	movl	%ebx, %edi
	movl	$11, %esi
	callq	_sign_extend32
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_19
LBB0_18:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$250, (%rax)
LBB0_19:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	_AD7291_VOLTAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r13d
	movl	$15, %edi
	subl	4(%rbx), %edi
	callq	_BIT
	orl	%eax, %r13d
	movq	_AD7291_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_ad7291_i2c_write
	testl	%eax, %eax
	js	LBB0_27
## %bb.23:
	movl	8(%r12), %edi
	movq	_AD7291_VOLTAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_word_swapped
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_28
## %bb.24:
	movq	_AD7291_VALUE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_19
LBB0_25:
	movl	$2500, %eax                     ## imm = 0x9C4
LBB0_26:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_AD7291_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movq	_IIO_VAL_FRACTIONAL_LOG2@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_27:
	movl	%eax, %ebx
LBB0_28:
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7291_AUTOCYCLE,4,2           ## @AD7291_AUTOCYCLE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_AD7291_VOLTAGE_MASK,4,2        ## @AD7291_VOLTAGE_MASK
	.comm	_AD7291_COMMAND,4,2             ## @AD7291_COMMAND
	.comm	_AD7291_VOLTAGE,4,2             ## @AD7291_VOLTAGE
	.comm	_AD7291_VALUE_MASK,4,2          ## @AD7291_VALUE_MASK
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_AD7291_T_SENSE,4,2             ## @AD7291_T_SENSE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AD7291_T_AVERAGE,4,2           ## @AD7291_T_AVERAGE
	.comm	_AD7291_BITS,4,2                ## @AD7291_BITS
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ## @IIO_VAL_FRACTIONAL_LOG2
	.no_dead_strip	_ad7291_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad7291_read_raw
_ad7291_read_raw:                       ; @ad7291_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	x23, x4
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	bl	_iio_priv
	mov	x21, x0
	cmp	x23, #130
	b.eq	LBB0_7
; %bb.1:
	cmp	x23, #132
	b.eq	LBB0_14
; %bb.2:
	cmp	x23, #131
	b.ne	LBB0_12
; %bb.3:
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_15
; %bb.4:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.5:
	add	x22, x21, #12
	mov	x0, x22
	bl	_mutex_lock
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _AD7291_AUTOCYCLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AD7291_AUTOCYCLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.6:
	mov	x0, x22
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_13
LBB0_7:
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_18
; %bb.8:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.9:
	ldr	w0, [x21, #4]
	cbz	w0, LBB0_25
; %bb.10:
	bl	_regulator_get_voltage
	mov	x20, x0
	tbnz	w0, #31, LBB0_21
; %bb.11:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w20, w8
	lsr	x8, x8, #38
	b	LBB0_26
LBB0_12:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_21
LBB0_14:
	ldr	w0, [x21, #8]
Lloh7:
	adrp	x8, _AD7291_T_AVERAGE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AD7291_T_AVERAGE@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
	ldr	w0, [x21, #8]
Lloh9:
	adrp	x8, _AD7291_T_SENSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AD7291_T_SENSE@GOTPAGEOFF]
LBB0_16:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_word_swapped
	mov	x20, x0
	tbnz	w0, #31, LBB0_21
; %bb.17:
	mov	x0, x20
	mov	w1, #11
	bl	_sign_extend32
	str	w0, [x19]
	b	LBB0_19
LBB0_18:
	mov	w8, #250
	str	w8, [x19]
LBB0_19:
Lloh11:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
LBB0_20:
	ldr	w20, [x8]
LBB0_21:
	mov	x0, x20
	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
LBB0_22:
Lloh13:
	adrp	x9, _AD7291_VOLTAGE_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AD7291_VOLTAGE_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	bic	w23, w8, w9
	ldr	w8, [x20, #4]
	mov	w9, #15
	sub	w0, w9, w8
	bl	_BIT
	orr	w2, w0, w23
Lloh16:
	adrp	x8, _AD7291_COMMAND@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AD7291_COMMAND@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_ad7291_i2c_write
	tbnz	w0, #31, LBB0_27
; %bb.23:
	ldr	w0, [x21, #8]
Lloh19:
	adrp	x8, _AD7291_VOLTAGE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AD7291_VOLTAGE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_word_swapped
	mov	x20, x0
	tbnz	w0, #31, LBB0_28
; %bb.24:
Lloh22:
	adrp	x8, _AD7291_VALUE_MASK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AD7291_VALUE_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	and	w8, w8, w20
	str	w8, [x19]
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_19
LBB0_25:
	mov	w8, #2500
LBB0_26:
Lloh25:
	adrp	x9, _AD7291_BITS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _AD7291_BITS@GOTPAGEOFF]
	str	w8, [x19]
Lloh27:
	ldr	w8, [x9]
	str	w8, [x22]
Lloh28:
	adrp	x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGEOFF]
	b	LBB0_20
LBB0_27:
	mov	x20, x0
LBB0_28:
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7291_AUTOCYCLE,4,2           ; @AD7291_AUTOCYCLE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_AD7291_VOLTAGE_MASK,4,2        ; @AD7291_VOLTAGE_MASK
	.comm	_AD7291_COMMAND,4,2             ; @AD7291_COMMAND
	.comm	_AD7291_VOLTAGE,4,2             ; @AD7291_VOLTAGE
	.comm	_AD7291_VALUE_MASK,4,2          ; @AD7291_VALUE_MASK
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_AD7291_T_SENSE,4,2             ; @AD7291_T_SENSE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AD7291_T_AVERAGE,4,2           ; @AD7291_T_AVERAGE
	.comm	_AD7291_BITS,4,2                ; @AD7291_BITS
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ; @IIO_VAL_FRACTIONAL_LOG2
	.no_dead_strip	_ad7291_read_raw
.subsections_via_symbols
