	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_dac_write_raw
_ti_dac_write_raw:                      ## @ti_dac_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, %rbx
	movl	%edx, %r14d
	callq	_iio_priv
	movq	%rax, %r12
	movl	12(%rax), %esi
	movq	%rax, %rdi
	callq	_ti_dac_get_power
	cmpq	$128, %rbx
	jne	LBB0_9
## %bb.1:
	xorl	%ebx, %ebx
	cmpl	%r14d, (%r12)
	je	LBB0_11
## %bb.2:
	movl	%eax, %r15d
	movb	4(%r12), %cl
	movl	$1, %eax
	shll	%cl, %eax
	testl	%r14d, %r14d
	js	LBB0_9
## %bb.3:
	cmpl	%r14d, %eax
	jle	LBB0_9
## %bb.4:
	cmpl	$0, 12(%r12)
	je	LBB0_6
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r12, %r13
	addq	$8, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_ti_dac_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	%r14d, (%r12)
LBB0_8:
	movq	%r13, %rdi
	callq	_mutex_unlock
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_ti_dac_write_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_dac_write_raw
_ti_dac_write_raw:                      ; @ti_dac_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, x2
	bl	_iio_priv
	mov	x20, x0
	ldr	w1, [x0, #12]
	bl	_ti_dac_get_power
	cmp	x22, #128
	b.ne	LBB0_7
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, w19
	b.ne	LBB0_3
; %bb.2:
	mov	w21, #0
	b	LBB0_9
LBB0_3:
	tbnz	w19, #31, LBB0_7
; %bb.4:
	ldr	w8, [x20, #4]
	mov	w9, #1
	lsl	w8, w9, w8
	cmp	w8, w19
	b.le	LBB0_7
; %bb.5:
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_10
; %bb.6:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	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
LBB0_10:
	mov	x21, x0
	add	x22, x20, #8
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_ti_dac_cmd
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.11:
	str	w19, [x20]
LBB0_12:
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_ti_dac_write_raw
.subsections_via_symbols
