	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altera_wait_cycles             ## -- Begin function altera_wait_cycles
	.p2align	4, 0x90
_altera_wait_cycles:                    ## @altera_wait_cycles
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	cmpl	%edx, (%rdi)
	je	LBB0_2
## %bb.1:
	movl	%r15d, %esi
	callq	_altera_goto_jstate
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_8
LBB0_2:
	movq	_RESET@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	_TMS_HIGH@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_TMS_LOW@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%r14d, %r14d
	testq	%rbx, %rbx
	jle	LBB0_8
## %bb.6:
	movl	(%rax), %r15d
	movq	_TDI_LOW@GOTPCREL(%rip), %r12
	movq	_IGNORE_TDO@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	%r15d, %edi
	callq	_alt_jtag_io
	decq	%rbx
	jne	LBB0_7
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RESET,4,2                      ## @RESET
	.comm	_TMS_HIGH,4,2                   ## @TMS_HIGH
	.comm	_TMS_LOW,4,2                    ## @TMS_LOW
	.comm	_TDI_LOW,4,2                    ## @TDI_LOW
	.comm	_IGNORE_TDO,4,2                 ## @IGNORE_TDO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altera_wait_cycles             ; -- Begin function altera_wait_cycles
	.p2align	2
_altera_wait_cycles:                    ; @altera_wait_cycles
	.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, x2
	mov	x19, x1
	ldr	w8, [x0]
	cmp	w8, w2
	b.eq	LBB0_2
; %bb.1:
	mov	x1, x20
	bl	_altera_goto_jstate
	cbnz	w0, LBB0_6
LBB0_2:
Lloh0:
	adrp	x8, _RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RESET@GOTPAGEOFF]
Lloh2:
	adrp	x9, _TMS_HIGH@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TMS_HIGH@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x10, _TMS_LOW@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TMS_LOW@GOTPAGEOFF]
	cmp	w8, w20
	csel	x8, x9, x10, eq
	cmp	x19, #1
	b.lt	LBB0_5
; %bb.3:
	ldr	w20, [x8]
Lloh7:
	adrp	x21, _TDI_LOW@GOTPAGE
Lloh8:
	ldr	x21, [x21, _TDI_LOW@GOTPAGEOFF]
Lloh9:
	adrp	x22, _IGNORE_TDO@GOTPAGE
Lloh10:
	ldr	x22, [x22, _IGNORE_TDO@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_alt_jtag_io
	subs	x19, x19, #1
	b.ne	LBB0_4
LBB0_5:
	mov	w0, #0
LBB0_6:
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RESET,4,2                      ; @RESET
	.comm	_TMS_HIGH,4,2                   ; @TMS_HIGH
	.comm	_TMS_LOW,4,2                    ; @TMS_LOW
	.comm	_TDI_LOW,4,2                    ; @TDI_LOW
	.comm	_IGNORE_TDO,4,2                 ; @IGNORE_TDO
.subsections_via_symbols
