	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generic_reg_wait               ## -- Begin function generic_reg_wait
	.p2align	4, 0x90
_generic_reg_wait:                      ## @generic_reg_wait
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %ebx
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	32(%rbp), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	24(%rbp), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %r15d
	movl	%r15d, %eax
	imull	%r9d, %eax
	xorl	%edi, %edi
	cmpl	$3000001, %eax                  ## imm = 0x2DC6C1
	setb	%dil
	callq	_ASSERT
	movl	%ebx, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movl	$-1, %r12d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$-1, %r12d
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$1000, %ebx                     ## imm = 0x3E8
	jb	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_msleep
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edi
	callq	_udelay
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_dm_read_reg
	movq	%rax, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	callq	_get_reg_field_value_ex
	cmpq	-96(%rbp), %rax                 ## 8-byte Folded Reload
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	addl	%ebx, %r14d
	incl	%r12d
	cmpl	%r12d, %r15d
	jne	LBB0_1
## %bb.11:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_DC_LOG_WARNING
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_IS_FPGA_MAXIMUS_DC
	testl	%eax, %eax
	jne	LBB0_12
## %bb.13:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BREAK_TO_DEBUGGER              ## TAILCALL
LBB0_7:
	cmpl	$1001, %r14d                    ## imm = 0x3E9
	jb	LBB0_12
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_IS_FPGA_MAXIMUS_DC
	testl	%eax, %eax
	je	LBB0_9
LBB0_12:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%r14d, %eax
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	shrq	$38, %rsi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DC_LOG_DC                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"REG_WAIT taking a while: %dms in %s line:%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"REG_WAIT timeout %dus * %d tries - %s line:%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generic_reg_wait               ; -- Begin function generic_reg_wait
	.p2align	2
_generic_reg_wait:                      ; @generic_reg_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x7, [sp, #8]                    ; 8-byte Folded Spill
	mov	x22, x6
	mov	x23, x5
	mov	x24, x4
	mov	x25, x3
	mov	x26, x2
	mov	x27, x1
	mov	x21, x0
	ldr	w8, [x29, #16]
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	mul	w8, w6, w5
	mov	w9, #50881
	movk	w9, #45, lsl #16
	cmp	w8, w9
	cset	w0, lo
	bl	_ASSERT
	mov	w19, #0
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w23, w8
	lsr	x28, x8, #38
	mov	w20, #-1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmn	w20, #1
	b.eq	LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w23, #1000
	b.lo	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x28
	bl	_msleep
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	cbz	w23, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x23
	bl	_udelay
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	mov	x1, x27
	bl	_dm_read_reg
	mov	x1, x25
	mov	x2, x26
	bl	_get_reg_field_value_ex
	cmp	x0, x24
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w19, w19, w23
	add	w20, w20, #1
	cmp	w22, w20
	b.ne	LBB0_1
; %bb.8:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	mov	x2, x22
	ldr	x3, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w4, [sp, #4]                    ; 4-byte Folded Reload
	bl	_DC_LOG_WARNING
	ldr	w0, [x21]
	bl	_IS_FPGA_MAXIMUS_DC
	cbnz	w0, LBB0_12
; %bb.9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_BREAK_TO_DEBUGGER
LBB0_10:
	cmp	w19, #1001
	b.lo	LBB0_12
; %bb.11:
	ldr	w0, [x21]
	bl	_IS_FPGA_MAXIMUS_DC
	cbz	w0, LBB0_13
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w19, w8
	lsr	x1, x8, #38
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w3, [sp, #4]                    ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_DC_LOG_DC
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"REG_WAIT taking a while: %dms in %s line:%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"REG_WAIT timeout %dus * %d tries - %s line:%d\n"

.subsections_via_symbols
