	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altera_goto_jstate             ## -- Begin function altera_goto_jstate
	.p2align	4, 0x90
_altera_goto_jstate:                    ## @altera_goto_jstate
	.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	%esi, %r14d
	movq	%rdi, %r15
	movl	(%rdi), %eax
	movq	_ILLEGAL_JTAG_STATE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_altera_jreset_idle
	movl	(%r15), %eax
LBB0_2:
	cmpl	%r14d, %eax
	jne	LBB0_3
## %bb.8:
	movq	_IDLE@GOTPCREL(%rip), %rcx
	movq	_TMS_LOW@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rcx)
	je	LBB0_15
## %bb.9:
	movq	_DRSHIFT@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	je	LBB0_15
## %bb.10:
	movq	_DRPAUSE@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	je	LBB0_15
## %bb.11:
	movq	_IRSHIFT@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	je	LBB0_15
## %bb.12:
	movq	_IRPAUSE@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	je	LBB0_15
## %bb.13:
	movq	_RESET@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_16
## %bb.14:
	movq	_TMS_HIGH@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %edi
	movq	_TDI_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IGNORE_TDO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_alt_jtag_io
	jmp	LBB0_16
LBB0_3:
	movl	$1, %r12d
	movl	%r14d, %ecx
	shll	%cl, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_altera_jtag_path_map@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movl	(%rcx,%rax,4), %ecx
	movq	_TMS_HIGH@GOTPCREL(%rip), %rax
	andl	%r12d, %ecx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_TMS_LOW@GOTPCREL(%rip), %rax
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rax), %ebx
	movq	_TDI_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IGNORE_TDO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_alt_jtag_io
	movq	_altera_transitions@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%r15), %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %rdx
	testl	%ebx, %ebx
	leaq	8(%rax,%rcx), %rax
	cmovneq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	cmpl	%r14d, %eax
	je	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%r13), %ecx
	cmpl	$8, %r13d
	movl	%ecx, %r13d
	jb	LBB0_4
LBB0_16:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	cmpl	%r14d, (%r15)
	cmovel	%edx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ILLEGAL_JTAG_STATE,4,2         ## @ILLEGAL_JTAG_STATE
	.comm	_IDLE,4,2                       ## @IDLE
	.comm	_DRSHIFT,4,2                    ## @DRSHIFT
	.comm	_DRPAUSE,4,2                    ## @DRPAUSE
	.comm	_IRSHIFT,4,2                    ## @IRSHIFT
	.comm	_IRPAUSE,4,2                    ## @IRPAUSE
	.comm	_TMS_LOW,4,2                    ## @TMS_LOW
	.comm	_TDI_LOW,4,2                    ## @TDI_LOW
	.comm	_IGNORE_TDO,4,2                 ## @IGNORE_TDO
	.comm	_RESET,4,2                      ## @RESET
	.comm	_TMS_HIGH,4,2                   ## @TMS_HIGH
	.comm	_altera_jtag_path_map,8,3       ## @altera_jtag_path_map
	.comm	_altera_transitions,8,3         ## @altera_transitions
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altera_goto_jstate             ; -- Begin function altera_goto_jstate
	.p2align	2
_altera_goto_jstate:                    ; @altera_goto_jstate
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _ILLEGAL_JTAG_STATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ILLEGAL_JTAG_STATE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_altera_jreset_idle
	ldr	w8, [x20]
LBB0_2:
	cmp	w8, w19
	b.ne	LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _IDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IDLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _DRSHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRSHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _DRPAUSE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DRPAUSE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _IRSHIFT@GOTPAGE
Lloh13:
	ldr	x11, [x11, _IRSHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
Lloh15:
	adrp	x12, _IRPAUSE@GOTPAGE
Lloh16:
	ldr	x12, [x12, _IRPAUSE@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	cmp	w8, w19
	ccmp	w9, w19, #4, ne
	ccmp	w10, w19, #4, ne
	ccmp	w11, w19, #4, ne
	ccmp	w12, w19, #4, ne
	b.ne	LBB0_7
; %bb.4:
Lloh18:
	adrp	x8, _TMS_LOW@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TMS_LOW@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	mov	w23, #0
	mov	w9, #1
	lsl	w22, w9, w19
Lloh20:
	adrp	x25, _TMS_HIGH@GOTPAGE
Lloh21:
	ldr	x25, [x25, _TMS_HIGH@GOTPAGEOFF]
Lloh22:
	adrp	x26, _TMS_LOW@GOTPAGE
Lloh23:
	ldr	x26, [x26, _TMS_LOW@GOTPAGEOFF]
Lloh24:
	adrp	x27, _TDI_LOW@GOTPAGE
Lloh25:
	ldr	x27, [x27, _TDI_LOW@GOTPAGEOFF]
Lloh26:
	adrp	x28, _IGNORE_TDO@GOTPAGE
Lloh27:
	ldr	x28, [x28, _IGNORE_TDO@GOTPAGEOFF]
Lloh28:
	adrp	x24, _altera_transitions@GOTPAGE
Lloh29:
	ldr	x24, [x24, _altera_transitions@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
Lloh30:
	adrp	x9, _altera_jtag_path_map@GOTPAGE
Lloh31:
	ldr	x9, [x9, _altera_jtag_path_map@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	ldr	w8, [x9, w8, sxtw #2]
	tst	w8, w22
	csel	x8, x26, x25, eq
	ldr	w21, [x8]
	ldr	w1, [x27]
	ldr	w2, [x28]
	mov	x0, x21
	bl	_alt_jtag_io
	ldr	x8, [x24]
	ldrsw	x9, [x20]
	add	x8, x8, x9, lsl #4
	add	x9, x8, #8
	cmp	w21, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x20]
	cmp	w8, w19
	ccmp	w23, #8, #2, ne
	add	w23, w23, #1
	b.lo	LBB0_6
	b	LBB0_10
LBB0_7:
Lloh33:
	adrp	x8, _RESET@GOTPAGE
Lloh34:
	ldr	x8, [x8, _RESET@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_10
; %bb.8:
Lloh36:
	adrp	x8, _TMS_HIGH@GOTPAGE
Lloh37:
	ldr	x8, [x8, _TMS_HIGH@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
Lloh38:
	adrp	x8, _TDI_LOW@GOTPAGE
Lloh39:
	ldr	x8, [x8, _TDI_LOW@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x8, _IGNORE_TDO@GOTPAGE
Lloh42:
	ldr	x8, [x8, _IGNORE_TDO@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	bl	_alt_jtag_io
LBB0_10:
	ldr	w8, [x20]
Lloh44:
	adrp	x9, _EREMOTEIO@GOTPAGE
Lloh45:
	ldr	x9, [x9, _EREMOTEIO@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	cmp	w8, w19
	csneg	w0, wzr, w9, eq
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_ILLEGAL_JTAG_STATE,4,2         ; @ILLEGAL_JTAG_STATE
	.comm	_IDLE,4,2                       ; @IDLE
	.comm	_DRSHIFT,4,2                    ; @DRSHIFT
	.comm	_DRPAUSE,4,2                    ; @DRPAUSE
	.comm	_IRSHIFT,4,2                    ; @IRSHIFT
	.comm	_IRPAUSE,4,2                    ; @IRPAUSE
	.comm	_TMS_LOW,4,2                    ; @TMS_LOW
	.comm	_TDI_LOW,4,2                    ; @TDI_LOW
	.comm	_IGNORE_TDO,4,2                 ; @IGNORE_TDO
	.comm	_RESET,4,2                      ; @RESET
	.comm	_TMS_HIGH,4,2                   ; @TMS_HIGH
	.comm	_altera_jtag_path_map,8,3       ; @altera_jtag_path_map
	.comm	_altera_transitions,8,3         ; @altera_transitions
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
.subsections_via_symbols
