	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad799x_write_frequency
_ad799x_write_frequency:                ## @ad799x_write_frequency
	.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	%rcx, %r14
	movq	%rdx, %rbx
	callq	_dev_to_iio_dev
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_iio_priv
	movq	%rax, %r15
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtol
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%r15), %edi
	movq	_AD7998_CYCLE_TMR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_10
## %bb.2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_AD7998_CYC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ad7998_frequencies@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jle	LBB0_3
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax
	movq	(%r14), %rdi
	cmpq	(%rdi,%rbx,8), %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_5
	jmp	LBB0_7
LBB0_3:
	xorl	%ebx, %ebx
LBB0_7:
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jne	LBB0_9
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_10
LBB0_9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	notl	%eax
	andl	%eax, %r13d
	movl	(%r15), %edi
	movq	_AD7998_CYCLE_TMR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%r13d, %ebx
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmovsl	%eax, %ecx
	movl	%ecx, %r13d
LBB0_10:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD7998_CYCLE_TMR_REG,4,2       ## @AD7998_CYCLE_TMR_REG
	.comm	_AD7998_CYC_MASK,4,2            ## @AD7998_CYC_MASK
	.comm	_ad7998_frequencies,8,3         ## @ad7998_frequencies
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ad799x_write_frequency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad799x_write_frequency
_ad799x_write_frequency:                ; @ad799x_write_frequency
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x3
	mov	x22, x2
	bl	_dev_to_iio_dev
	mov	x19, x0
	bl	_iio_priv
	mov	x21, x0
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtol
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x21]
Lloh0:
	adrp	x23, _AD7998_CYCLE_TMR_REG@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AD7998_CYCLE_TMR_REG@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_i2c_smbus_read_byte_data
	mov	x22, x0
	tbnz	w0, #31, LBB0_10
; %bb.2:
Lloh2:
	adrp	x8, _AD7998_CYC_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AD7998_CYC_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w24, [x8]
Lloh5:
	adrp	x25, _ad7998_frequencies@GOTPAGE
Lloh6:
	ldr	x25, [x25, _ad7998_frequencies@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x26, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]
	ldr	x0, [x25]
	ldr	x9, [x0, x26, lsl #3]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #1
	bl	_ARRAY_SIZE
	cmp	x26, w0, sxtw
	b.lt	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	w26, #0
LBB0_7:
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w26, w0
	b.ne	LBB0_9
; %bb.8:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_9:
	bic	w8, w22, w24
	ldr	w0, [x21]
	ldr	w1, [x23]
	orr	w2, w26, w8
	bl	_i2c_smbus_write_byte_data
	cmp	w0, #0
	csel	w22, w0, w20, lt
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AD7998_CYCLE_TMR_REG,4,2       ; @AD7998_CYCLE_TMR_REG
	.comm	_AD7998_CYC_MASK,4,2            ; @AD7998_CYC_MASK
	.comm	_ad7998_frequencies,8,3         ; @ad7998_frequencies
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ad799x_write_frequency
.subsections_via_symbols
