	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp3422_write_raw
_mcp3422_write_raw:                     ## @mcp3422_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
	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
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movq	%rsi, %rbx
	callq	_iio_priv
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rdi
	movq	(%rbx), %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_MCP3422_SAMPLE_RATE
	cmpq	$129, %r14
	je	LBB0_9
## %bb.1:
	cmpq	$128, %r14
	jne	LBB0_8
## %bb.2:
	testl	%r15d, %r15d
	je	LBB0_3
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpl	$59, %r15d
	jg	LBB0_13
## %bb.10:
	cmpl	$3, %r15d
	je	LBB0_17
## %bb.11:
	cmpl	$15, %r15d
	jne	LBB0_8
## %bb.12:
	movq	_MCP3422_SRATE_15@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_13:
	cmpl	$240, %r15d
	je	LBB0_14
## %bb.15:
	cmpl	$60, %r15d
	jne	LBB0_8
## %bb.16:
	movq	_MCP3422_SRATE_60@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_3:
	movq	%rax, %r12
	movq	%rbx, %r15
	movq	_mcp3422_scales@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r12,8), %rcx
	cmpl	%r13d, (%rcx,%rbx,4)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %rbx
	jb	LBB0_5
	jmp	LBB0_8
LBB0_17:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$5, 16(%rax)
	jge	LBB0_8
## %bb.18:
	movq	_MCP3422_SRATE_3@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_14:
	movq	_MCP3422_SRATE_240@GOTPCREL(%rip), %rax
LBB0_19:
	movq	(%rax), %r14
	movq	_MCP3422_CHANNEL_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	andq	%rax, %r15
	movq	%rbx, %rdi
	callq	_MCP3422_CHANNEL_VALUE
	orq	%rax, %r15
	movq	_MCP3422_SRATE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	notq	%rbx
	andq	%r15, %rbx
	movq	%r14, %rdi
	callq	_MCP3422_SAMPLE_RATE_VALUE
	orq	%rax, %rbx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_20:
	movq	%rbx, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mcp3422_update_config          ## TAILCALL
LBB0_6:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	8(%r14), %rax
	movq	%r15, %r12
	movq	%rbx, (%rax,%r15,8)
	movq	_MCP3422_CHANNEL_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	andq	%rax, %r15
	movq	%r12, %rdi
	callq	_MCP3422_CHANNEL_VALUE
	orq	%rax, %r15
	movq	_MCP3422_PGA_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	notq	%rbx
	andq	%r15, %rbx
	movq	8(%r14), %rax
	movq	(%rax,%r12,8), %rdi
	callq	_MCP3422_PGA_VALUE
	orq	%rax, %rbx
	movq	%r14, %rdi
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mcp3422_scales,8,3             ## @mcp3422_scales
	.comm	_MCP3422_CHANNEL_MASK,8,3       ## @MCP3422_CHANNEL_MASK
	.comm	_MCP3422_PGA_MASK,8,3           ## @MCP3422_PGA_MASK
	.comm	_MCP3422_SRATE_240,8,3          ## @MCP3422_SRATE_240
	.comm	_MCP3422_SRATE_60,8,3           ## @MCP3422_SRATE_60
	.comm	_MCP3422_SRATE_15,8,3           ## @MCP3422_SRATE_15
	.comm	_MCP3422_SRATE_3,8,3            ## @MCP3422_SRATE_3
	.comm	_MCP3422_SRATE_MASK,8,3         ## @MCP3422_SRATE_MASK
	.no_dead_strip	_mcp3422_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcp3422_write_raw
_mcp3422_write_raw:                     ; @mcp3422_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	x25, x4
	mov	x22, x3
	mov	x24, x2
	mov	x20, x1
	bl	_iio_priv
	mov	x19, x0
	ldr	x21, [x0]
	ldr	x20, [x20]
	mov	x0, x21
	bl	_MCP3422_SAMPLE_RATE
	cmp	x25, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	x25, #128
	b.ne	LBB0_3
; %bb.2:
	cbz	w24, LBB0_11
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	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_4:
	cmp	w24, #59
	b.gt	LBB0_8
; %bb.5:
	cmp	w24, #3
	b.eq	LBB0_15
; %bb.6:
	cmp	w24, #15
	b.ne	LBB0_3
; %bb.7:
Lloh3:
	adrp	x8, _MCP3422_SRATE_15@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCP3422_SRATE_15@GOTPAGEOFF]
	b	LBB0_18
LBB0_8:
	cmp	w24, #240
	b.eq	LBB0_17
; %bb.9:
	cmp	w24, #60
	b.ne	LBB0_3
; %bb.10:
Lloh5:
	adrp	x8, _MCP3422_SRATE_60@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MCP3422_SRATE_60@GOTPAGEOFF]
	b	LBB0_18
LBB0_11:
	mov	x23, x0
Lloh7:
	adrp	x24, _mcp3422_scales@GOTPAGE
Lloh8:
	ldr	x24, [x24, _mcp3422_scales@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x0, [x8]
	bl	_ARRAY_SIZE
	cbz	x0, LBB0_3
; %bb.12:
	mov	x25, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x9, [x8, x23, lsl #3]
	ldr	w9, [x9, x25, lsl #2]
	cmp	w9, w22
	b.eq	LBB0_20
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x25, x25, #1
	ldr	x0, [x8]
	bl	_ARRAY_SIZE
	cmp	x25, x0
	b.lo	LBB0_13
	b	LBB0_3
LBB0_15:
	ldr	w8, [x19, #16]
	cmp	w8, #5
	b.ge	LBB0_3
; %bb.16:
Lloh9:
	adrp	x8, _MCP3422_SRATE_3@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MCP3422_SRATE_3@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh11:
	adrp	x8, _MCP3422_SRATE_240@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MCP3422_SRATE_240@GOTPAGEOFF]
LBB0_18:
	ldr	x22, [x8]
Lloh13:
	adrp	x8, _MCP3422_CHANNEL_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MCP3422_CHANNEL_MASK@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	bic	x21, x21, x8
	mov	x0, x20
	bl	_MCP3422_CHANNEL_VALUE
	orr	x8, x21, x0
Lloh16:
	adrp	x9, _MCP3422_SRATE_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MCP3422_SRATE_MASK@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	bic	x20, x8, x9
	mov	x0, x22
	bl	_MCP3422_SAMPLE_RATE_VALUE
	orr	x1, x20, x0
LBB0_19:
	mov	x0, x19
	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
	b	_mcp3422_update_config
LBB0_20:
	ldr	x8, [x19, #8]
	lsl	x22, x20, #3
	str	x25, [x8, x22]
Lloh19:
	adrp	x8, _MCP3422_CHANNEL_MASK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MCP3422_CHANNEL_MASK@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	bic	x21, x21, x8
	mov	x0, x20
	bl	_MCP3422_CHANNEL_VALUE
Lloh22:
	adrp	x8, _MCP3422_PGA_MASK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MCP3422_PGA_MASK@GOTPAGEOFF]
	orr	x9, x21, x0
Lloh24:
	ldr	x8, [x8]
	bic	x20, x9, x8
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x22]
	bl	_MCP3422_PGA_VALUE
	orr	x1, x0, x20
	b	LBB0_19
	.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	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mcp3422_scales,8,3             ; @mcp3422_scales
	.comm	_MCP3422_CHANNEL_MASK,8,3       ; @MCP3422_CHANNEL_MASK
	.comm	_MCP3422_PGA_MASK,8,3           ; @MCP3422_PGA_MASK
	.comm	_MCP3422_SRATE_240,8,3          ; @MCP3422_SRATE_240
	.comm	_MCP3422_SRATE_60,8,3           ; @MCP3422_SRATE_60
	.comm	_MCP3422_SRATE_15,8,3           ; @MCP3422_SRATE_15
	.comm	_MCP3422_SRATE_3,8,3            ; @MCP3422_SRATE_3
	.comm	_MCP3422_SRATE_MASK,8,3         ; @MCP3422_SRATE_MASK
	.no_dead_strip	_mcp3422_write_raw
.subsections_via_symbols
