	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_adc_set_watermark
_at91_adc_set_watermark:                ## @at91_adc_set_watermark
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_iio_priv
	movq	%rax, %r15
	movq	_AT91_HWFIFO_MAX_SIZE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jae	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_2:
	movq	8(%r15), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, (%r15)
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.5:
	movq	%r14, %rdi
	cmpl	$1, %ebx
	jne	LBB0_7
## %bb.6:
	callq	_to_platform_device
	movl	%eax, %edi
	callq	_at91_adc_dma_disable
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_9
LBB0_7:
	callq	_to_platform_device
	movl	%eax, %edi
	callq	_at91_adc_dma_init
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AT91_HWFIFO_MAX_SIZE,4,2       ## @AT91_HWFIFO_MAX_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"we need hw trigger for DMA\n"

L_.str.1:                               ## @.str.1
	.asciz	"new watermark is %u\n"

	.no_dead_strip	_at91_adc_set_watermark
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_adc_set_watermark
_at91_adc_set_watermark:                ; @at91_adc_set_watermark
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_iio_priv
Lloh0:
	adrp	x8, _AT91_HWFIFO_MAX_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AT91_HWFIFO_MAX_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_9
LBB0_2:
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.3:
	str	x19, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	str	w19, [x21]
	cbz	w19, LBB0_9
; %bb.4:
	mov	x0, x20
	cmp	w19, #1
	b.ne	LBB0_7
; %bb.5:
	bl	_to_platform_device
	bl	_at91_adc_dma_disable
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	b	LBB0_8
LBB0_7:
	bl	_to_platform_device
	bl	_at91_adc_dma_init
LBB0_8:
	mov	w19, #0
LBB0_9:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AT91_HWFIFO_MAX_SIZE,4,2       ; @AT91_HWFIFO_MAX_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"we need hw trigger for DMA\n"

l_.str.1:                               ; @.str.1
	.asciz	"new watermark is %u\n"

	.no_dead_strip	_at91_adc_set_watermark
.subsections_via_symbols
