	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dln2_adc_write_raw
_dln2_adc_write_raw:                    ## @dln2_adc_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%ecx, %r15d
	movl	%edx, %r14d
	callq	_iio_priv
	cmpq	$128, %rbx
	jne	LBB0_10
## %bb.1:
	movq	%rax, %r12
	imull	$1000000, %r14d, %ebx           ## imm = 0xF4240
	movq	%rax, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	addl	%r15d, %ebx
	je	LBB0_3
## %bb.2:
	movl	$1000000000, %eax               ## imm = 0x3B9ACA00
	xorl	%edx, %edx
	divl	%ebx
	jmp	LBB0_4
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_3:
	movq	_UINT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movl	%eax, (%r12)
	cmpl	$65536, %eax                    ## imm = 0x10000
	jl	LBB0_6
## %bb.5:
	movl	$65535, (%r12)                  ## imm = 0xFFFF
	movq	16(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_6:
	movl	4(%r12), %esi
	cmpl	$-1, %esi
	je	LBB0_7
## %bb.8:
	movl	(%r12), %edx
	movq	%r12, %rdi
	callq	_dln2_adc_set_chan_period
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UINT_MAX,4,2                   ## @UINT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clamping period to 65535ms\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_dln2_adc_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dln2_adc_write_raw
_dln2_adc_write_raw:                    ; @dln2_adc_write_raw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x4
	mov	x19, x3
	mov	x21, x2
	bl	_iio_priv
	cmp	x22, #128
	b.ne	LBB0_3
; %bb.1:
	mov	x20, x0
	mov	w8, #16960
	movk	w8, #15, lsl #16
	madd	w21, w21, w8, w19
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	cbz	w21, LBB0_4
; %bb.2:
	mov	w8, #51712
	movk	w8, #15258, lsl #16
	udiv	w8, w8, w21
	b	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_4:
Lloh3:
	adrp	x8, _UINT_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UINT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
LBB0_5:
	str	w8, [x20]
	cmp	w8, #16, lsl #12                ; =65536
	b.lt	LBB0_7
; %bb.6:
	mov	w8, #65535
	str	w8, [x20]
	ldr	x0, [x20, #16]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_7:
	ldr	w1, [x20, #4]
	cmn	w1, #1
	b.eq	LBB0_9
; %bb.8:
	ldr	w2, [x20]
	mov	x0, x20
	bl	_dln2_adc_set_chan_period
	mov	x20, x0
	b	LBB0_10
LBB0_9:
	mov	w20, #0
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_UINT_MAX,4,2                   ; @UINT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clamping period to 65535ms\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_dln2_adc_write_raw
.subsections_via_symbols
