	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nau7802_read_raw
_nau7802_read_raw:                      ## @nau7802_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, %rbx
	movq	%rcx, %r15
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	callq	_iio_priv
	movq	%rax, %r14
	cmpq	$128, %rbx
	je	LBB0_7
## %bb.1:
	cmpq	$129, %rbx
	je	LBB0_9
## %bb.2:
	cmpq	$130, %rbx
	jne	LBB0_10
## %bb.3:
	movq	%rax, %r13
	addq	$24, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	16(%r14), %rdi
	movq	_NAU7802_REG_CTRL2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_17
## %bb.4:
	movq	_NAU7802_CTRL2_CHS_BIT@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.5:
	testl	%edi, %edi
	jne	LBB0_13
## %bb.6:
	xorl	%edi, %edi
	jmp	LBB0_12
LBB0_7:
	movq	16(%r14), %rdi
	movq	_NAU7802_REG_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.8:
	movl	8(%r14), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_NAU7802_CTRL1_GAINS_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	addl	$23, %eax
	movl	%eax, (%r15)
	movq	_IIO_VAL_FRACTIONAL_LOG2@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_18
LBB0_9:
	movq	_nau7802_sample_freq_avail@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	$0, (%r15)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_18
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_11:
	testl	%edi, %edi
	je	LBB0_13
LBB0_12:
	movl	$0, 28(%r14)
	movq	16(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%r15), %r15d
	callq	_NAU7802_CTRL2_CHS
	movl	%eax, %ebx
	movq	(%r14), %rdi
	callq	_NAU7802_CTRL2_CRS
	orl	%eax, %ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_16
LBB0_13:
	movq	16(%r14), %rax
	cmpl	$0, (%rax)
	je	LBB0_15
## %bb.14:
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_nau7802_read_irq
	jmp	LBB0_16
LBB0_15:
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_nau7802_read_poll
LBB0_16:
	movl	%eax, %ebx
LBB0_17:
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_18:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAU7802_REG_CTRL2,4,2          ## @NAU7802_REG_CTRL2
	.comm	_NAU7802_CTRL2_CHS_BIT,4,2      ## @NAU7802_CTRL2_CHS_BIT
	.comm	_NAU7802_REG_CTRL1,4,2          ## @NAU7802_REG_CTRL1
	.comm	_NAU7802_CTRL1_GAINS_BITS,4,2   ## @NAU7802_CTRL1_GAINS_BITS
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ## @IIO_VAL_FRACTIONAL_LOG2
	.comm	_nau7802_sample_freq_avail,8,3  ## @nau7802_sample_freq_avail
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nau7802_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nau7802_read_raw
_nau7802_read_raw:                      ; @nau7802_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	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x23, x0
	bl	_iio_priv
	mov	x22, x0
	cmp	x24, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	x24, #129
	b.eq	LBB0_8
; %bb.2:
	cmp	x24, #130
	b.ne	LBB0_9
; %bb.3:
	add	x20, x22, #24
	mov	x0, x20
	bl	_mutex_lock
	ldr	x0, [x22, #16]
Lloh0:
	adrp	x25, _NAU7802_REG_CTRL2@GOTPAGE
Lloh1:
	ldr	x25, [x25, _NAU7802_REG_CTRL2@GOTPAGEOFF]
	ldr	w1, [x25]
	bl	_i2c_smbus_read_byte_data
	mov	x24, x0
	tbnz	w0, #31, LBB0_16
; %bb.4:
Lloh2:
	adrp	x8, _NAU7802_CTRL2_CHS_BIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NAU7802_CTRL2_CHS_BIT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w0, [x21]
	tst	w8, w24
	b.eq	LBB0_10
; %bb.5:
	cbnz	w0, LBB0_12
	b	LBB0_11
LBB0_6:
	ldr	x0, [x22, #16]
Lloh5:
	adrp	x8, _NAU7802_REG_CTRL1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NAU7802_REG_CTRL1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_i2c_smbus_read_byte_data
	mov	x24, x0
	tbnz	w0, #31, LBB0_17
; %bb.7:
	ldr	w8, [x22, #8]
	str	w8, [x19]
Lloh8:
	adrp	x8, _NAU7802_CTRL1_GAINS_BITS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NAU7802_CTRL1_GAINS_BITS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w24
	add	w8, w8, #23
	str	w8, [x20]
Lloh11:
	adrp	x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IIO_VAL_FRACTIONAL_LOG2@GOTPAGEOFF]
Lloh13:
	ldr	w24, [x8]
	b	LBB0_17
LBB0_8:
Lloh14:
	adrp	x8, _nau7802_sample_freq_avail@GOTPAGE
Lloh15:
	ldr	x8, [x8, _nau7802_sample_freq_avail@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	x9, [x22]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x19]
	str	wzr, [x20]
Lloh17:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh19:
	ldr	w24, [x8]
	b	LBB0_17
LBB0_9:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_17
LBB0_10:
	cbz	w0, LBB0_12
LBB0_11:
	str	wzr, [x22, #28]
	ldr	x24, [x22, #16]
	ldr	w25, [x25]
	bl	_NAU7802_CTRL2_CHS
	mov	x26, x0
	ldr	x0, [x22]
	bl	_NAU7802_CTRL2_CRS
	orr	w2, w0, w26
	mov	x0, x24
	mov	x1, x25
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_15
LBB0_12:
	ldr	x8, [x22, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_14
; %bb.13:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x19
	bl	_nau7802_read_irq
	b	LBB0_15
LBB0_14:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x19
	bl	_nau7802_read_poll
LBB0_15:
	mov	x24, x0
LBB0_16:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_17:
	mov	x0, x24
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_NAU7802_REG_CTRL2,4,2          ; @NAU7802_REG_CTRL2
	.comm	_NAU7802_CTRL2_CHS_BIT,4,2      ; @NAU7802_CTRL2_CHS_BIT
	.comm	_NAU7802_REG_CTRL1,4,2          ; @NAU7802_REG_CTRL1
	.comm	_NAU7802_CTRL1_GAINS_BITS,4,2   ; @NAU7802_CTRL1_GAINS_BITS
	.comm	_IIO_VAL_FRACTIONAL_LOG2,4,2    ; @IIO_VAL_FRACTIONAL_LOG2
	.comm	_nau7802_sample_freq_avail,8,3  ; @nau7802_sample_freq_avail
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nau7802_read_raw
.subsections_via_symbols
