	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp3911_write_raw
_mcp3911_write_raw:                     ## @mcp3911_write_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
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	callq	_iio_priv
	movq	%rax, %r15
	movq	_EINVAL@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	subl	(%r12), %ebx
	movq	%rax, %rdi
	callq	_mutex_lock
	cmpq	$128, %r14
	jne	LBB0_5
## %bb.1:
	movq	%r12, %rax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	movl	(%r13), %edi
	callq	_MCP3911_OFFCAL
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	movl	$3, %ecx
	callq	_mcp3911_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_MCP3911_REG_STATUSCOM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MCP3911_STATUSCOM_EN_OFFCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ecx, %edx
	movl	$2, %r8d
	callq	_mcp3911_update
	movl	%eax, %ebx
LBB0_5:
	movq	%r15, %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	_EINVAL,4,2                     ## @EINVAL
	.comm	_MCP3911_REG_STATUSCOM,4,2      ## @MCP3911_REG_STATUSCOM
	.comm	_MCP3911_STATUSCOM_EN_OFFCAL,4,2 ## @MCP3911_STATUSCOM_EN_OFFCAL
	.no_dead_strip	_mcp3911_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcp3911_write_raw
_mcp3911_write_raw:                     ; @mcp3911_write_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	x23, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	bl	_iio_priv
	mov	x19, x0
Lloh0:
	adrp	x24, _EINVAL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _EINVAL@GOTPAGEOFF]
	ldr	w25, [x24]
	bl	_mutex_lock
	cmp	x23, #128
	b.ne	LBB0_3
; %bb.1:
	cbz	w22, LBB0_5
; %bb.2:
	ldr	w8, [x24]
	neg	w20, w8
	b	LBB0_4
LBB0_3:
	neg	w20, w25
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
LBB0_5:
	ldr	w0, [x21]
	bl	_MCP3911_OFFCAL
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	mov	w3, #3
	bl	_mcp3911_write
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.6:
Lloh2:
	adrp	x8, _MCP3911_REG_STATUSCOM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MCP3911_REG_STATUSCOM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _MCP3911_STATUSCOM_EN_OFFCAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MCP3911_STATUSCOM_EN_OFFCAL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	mov	w4, #2
	bl	_mcp3911_update
	mov	x20, x0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MCP3911_REG_STATUSCOM,4,2      ; @MCP3911_REG_STATUSCOM
	.comm	_MCP3911_STATUSCOM_EN_OFFCAL,4,2 ; @MCP3911_STATUSCOM_EN_OFFCAL
	.no_dead_strip	_mcp3911_write_raw
.subsections_via_symbols
