	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp4131_write_raw
_mcp4131_write_raw:                     ## @mcp4131_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, %r15
	movl	%edx, %r12d
	movq	%rsi, %rbx
	callq	_iio_priv
	movl	(%rbx), %ebx
	movq	_MCP4131_WIPER_SHIFT@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	shll	%cl, %ebx
	cmpq	$128, %r15
	jne	LBB0_3
## %bb.1:
	testl	%r12d, %r12d
	js	LBB0_3
## %bb.2:
	movq	%rax, %r14
	movq	16(%rax), %rax
	cmpl	%r12d, (%rax)
	jl	LBB0_3
## %bb.4:
	movq	%r14, %r15
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movb	(%r13), %cl
	shll	%cl, %ebx
	movq	(%r14), %rsi
	movl	%ebx, (%rsi)
	movq	_MCP4131_WRITE@GOTPCREL(%rip), %rax
	movl	%r12d, %ecx
	shrl	$8, %ecx
	orl	%ebx, %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%rsi)
	movzbl	%r12b, %eax
	movl	%eax, 4(%rsi)
	movl	12(%r14), %edi
	movl	$2, %edx
	callq	_spi_write
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MCP4131_WIPER_SHIFT,4,2        ## @MCP4131_WIPER_SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MCP4131_WRITE,4,2              ## @MCP4131_WRITE
	.no_dead_strip	_mcp4131_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcp4131_write_raw
_mcp4131_write_raw:                     ; @mcp4131_write_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	x22, x4
	mov	x19, x2
	mov	x21, x1
	bl	_iio_priv
	cmp	x22, #128
	b.ne	LBB0_4
; %bb.1:
	tbnz	w19, #31, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	cmp	w8, w19
	b.lt	LBB0_4
; %bb.3:
	ldr	w8, [x21]
Lloh0:
	adrp	x22, _MCP4131_WIPER_SHIFT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MCP4131_WIPER_SHIFT@GOTPAGEOFF]
	ldr	w9, [x22]
	lsl	w23, w8, w9
	add	x21, x20, #8
	mov	x0, x21
	bl	_mutex_lock
	ldr	w8, [x22]
	lsl	w8, w23, w8
	ldr	x1, [x20]
Lloh2:
	adrp	x9, _MCP4131_WRITE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MCP4131_WRITE@GOTPAGEOFF]
	and	w10, w19, #0xff
	stp	w8, w10, [x1]
Lloh4:
	ldr	w9, [x9]
	orr	w8, w8, w19, lsr #8
	orr	w8, w8, w9
	str	w8, [x1]
	ldr	w0, [x20, #12]
	mov	w2, #2
	bl	_spi_write
	mov	x19, x0
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MCP4131_WIPER_SHIFT,4,2        ; @MCP4131_WIPER_SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MCP4131_WRITE,4,2              ; @MCP4131_WRITE
	.no_dead_strip	_mcp4131_write_raw
.subsections_via_symbols
