	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adc_synchronization
_adc_synchronization:                   ## @adc_synchronization
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$0, -36(%rbp)
	movq	(%rdi), %r15
	leaq	-36(%rbp), %rsi
	callq	_adc_sync_measurement
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
LBB0_6:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_err
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	-36(%rbp), %eax
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.3:
	movl	$0, -40(%rbp)
	movq	_IQM_AF_CLKNEG__A@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-40(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_drxj_dap_read_reg16
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	_IQM_AF_CLKNEG_CLKNEGDATA__M@GOTPCREL(%rip), %rax
	movl	-40(%rbp), %edx
	xorl	(%rax), %edx
	movl	%edx, -40(%rbp)
	movl	(%r12), %esi
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_drxj_dap_write_reg16
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	leaq	-36(%rbp), %rsi
	movq	%r14, %rdi
	callq	_adc_sync_measurement
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:
	movl	-36(%rbp), %eax
LBB0_8:
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	jg	LBB0_10
## %bb.9:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error %d\n"

	.comm	_IQM_AF_CLKNEG__A,4,2           ## @IQM_AF_CLKNEG__A
	.comm	_IQM_AF_CLKNEG_CLKNEGDATA__M,4,2 ## @IQM_AF_CLKNEG_CLKNEGDATA__M
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_adc_synchronization
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adc_synchronization
_adc_synchronization:                   ; @adc_synchronization
	.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, x0
	str	wzr, [sp, #12]
	ldr	x20, [x0]
	add	x1, sp, #12
	bl	_adc_sync_measurement
	cbz	w0, LBB0_4
; %bb.1:
	mov	x21, x0
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_pr_err
LBB0_3:
	mov	x0, x21
	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
LBB0_4:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.5:
	str	wzr, [sp, #8]
Lloh2:
	adrp	x22, _IQM_AF_CLKNEG__A@GOTPAGE
Lloh3:
	ldr	x22, [x22, _IQM_AF_CLKNEG__A@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #0
	bl	_drxj_dap_read_reg16
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.6:
Lloh4:
	adrp	x8, _IQM_AF_CLKNEG_CLKNEGDATA__M@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IQM_AF_CLKNEG_CLKNEGDATA__M@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	eor	w2, w9, w8
	str	w2, [sp, #8]
	ldr	w1, [x22]
	mov	x0, x20
	mov	w3, #0
	bl	_drxj_dap_write_reg16
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.7:
	add	x1, sp, #12
	mov	x0, x19
	bl	_adc_sync_measurement
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.8:
	ldr	w8, [sp, #12]
LBB0_9:
	cmp	w8, #1
	b.gt	LBB0_11
; %bb.10:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_3
LBB0_11:
	mov	w21, #0
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error %d\n"

	.comm	_IQM_AF_CLKNEG__A,4,2           ; @IQM_AF_CLKNEG__A
	.comm	_IQM_AF_CLKNEG_CLKNEGDATA__M,4,2 ; @IQM_AF_CLKNEG_CLKNEGDATA__M
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_adc_synchronization
.subsections_via_symbols
