	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fpga_wait_dclk_pulses
_fpga_wait_dclk_pulses:                 ## @fpga_wait_dclk_pulses
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	_FPGAMGR_DCLKSTAT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_READ4
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_WRITE4
LBB0_2:
	movq	_FPGAMGR_DCLKCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_WRITE4
	movl	$1001, %ebx                     ## imm = 0x3E9
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_READ4
	cmpl	$1, %eax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$10, %edi
	callq	_DELAY
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_3
## %bb.6:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	movl	$1, %eax
	jmp	LBB0_7
LBB0_4:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_WRITE4
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FPGAMGR_DCLKSTAT,4,2           ## @FPGAMGR_DCLKSTAT
	.comm	_FPGAMGR_DCLKCNT,4,2            ## @FPGAMGR_DCLKCNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: dclkpulses wait timeout\n"

	.no_dead_strip	_fpga_wait_dclk_pulses
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fpga_wait_dclk_pulses
_fpga_wait_dclk_pulses:                 ; @fpga_wait_dclk_pulses
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _FPGAMGR_DCLKSTAT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FPGAMGR_DCLKSTAT@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_READ4
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_WRITE4
LBB0_2:
Lloh2:
	adrp	x8, _FPGAMGR_DCLKCNT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FPGAMGR_DCLKCNT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_WRITE4
	mov	w20, #1001
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_READ4
	cmp	w0, #1
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #10
	bl	_DELAY
	sub	w20, w20, #1
	cmp	w20, #1
	b.hi	LBB0_3
; %bb.5:
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
	mov	w0, #1
	b	LBB0_7
LBB0_6:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_WRITE4
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_FPGAMGR_DCLKSTAT,4,2           ; @FPGAMGR_DCLKSTAT
	.comm	_FPGAMGR_DCLKCNT,4,2            ; @FPGAMGR_DCLKCNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: dclkpulses wait timeout\n"

	.no_dead_strip	_fpga_wait_dclk_pulses
.subsections_via_symbols
