	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altera_drscan                  ## -- Begin function altera_drscan
	.p2align	4, 0x90
_altera_drscan:                         ## @altera_drscan
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	addl	%esi, %r14d
	addl	4(%rdi), %r14d
	movl	%ecx, %r12d
	movq	%rdx, %r8
	movl	8(%rdi), %eax
	leal	-128(%rax), %ecx
	cmpl	$17, %ecx
	jae	LBB0_1
## %bb.4:
	movslq	%ecx, %rcx
	leaq	l_switch.table.altera_drscan(%rip), %rdx
	movl	(%rdx,%rcx,4), %esi
	leaq	l_switch.table.altera_drscan.1(%rip), %rdx
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	cmpl	%esi, %eax
	jne	LBB0_6
	jmp	LBB0_8
LBB0_1:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	testl	%r13d, %r13d
	je	LBB0_3
## %bb.2:
	negl	%r13d
	testl	%r13d, %r13d
	jne	LBB0_17
	jmp	LBB0_8
LBB0_3:
	movl	$136, %esi
	cmpl	%esi, %eax
	je	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	movq	%r8, %r13
	callq	_altera_goto_jstate
	movq	%r13, %r8
	movl	%eax, %r13d
	testl	%r13d, %r13d
	jne	LBB0_17
LBB0_8:
	cmpl	12(%rbx), %r14d
	jle	LBB0_9
## %bb.10:
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	leal	7(%r14), %r12d
	movl	%r12d, %r13d
	sarl	$3, %r13d
	movq	24(%rbx), %rdi
	callq	_kfree
	movl	%r13d, %edi
	callq	_alt_malloc
	movq	%rax, %rdi
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	andl	$-8, %r12d
	movl	%r12d, 12(%rbx)
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_14
LBB0_9:
	movq	24(%rbx), %rdi
LBB0_14:
	movl	36(%rbx), %esi
	movl	32(%rbx), %r10d
	movl	(%rbx), %edx
	movl	4(%rbx), %eax
	movq	%r8, %rcx
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	pushq	%rax
	pushq	%r10
	callq	_altera_concatenate_data
	addq	$16, %rsp
	movq	24(%rbx), %rcx
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	xorl	%r8d, %r8d
	callq	_alt_jtag_drscan
	movl	$141, 8(%rbx)
	movl	16(%rbx), %esi
	cmpl	$141, %esi
	je	LBB0_17
## %bb.15:
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_altera_goto_jstate             ## TAILCALL
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testl	%r13d, %r13d
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	je	LBB0_13
## %bb.16:
	negl	%r13d
LBB0_17:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.altera_drscan
l_switch.table.altera_drscan:
	.long	137                             ## 0x89
	.long	132                             ## 0x84
	.long	132                             ## 0x84
	.long	132                             ## 0x84
	.long	132                             ## 0x84
	.long	132                             ## 0x84
	.long	132                             ## 0x84
	.long	132                             ## 0x84
	.long	137                             ## 0x89
	.long	137                             ## 0x89
	.long	141                             ## 0x8d
	.long	141                             ## 0x8d
	.long	141                             ## 0x8d
	.long	141                             ## 0x8d
	.long	141                             ## 0x8d
	.long	141                             ## 0x8d
	.long	141                             ## 0x8d

	.p2align	2                               ## @switch.table.altera_drscan.1
l_switch.table.altera_drscan.1:
	.long	0                               ## 0x0
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altera_drscan                  ; -- Begin function altera_drscan
	.p2align	2
_altera_drscan:                         ; @altera_drscan
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldp	w24, w25, [x0]
	ldr	w8, [x0, #8]
	sub	w9, w8, #128
	cmp	w9, #17
	b.hs	LBB0_2
; %bb.1:
	sbfiz	x9, x9, #2, #32
Lloh0:
	adrp	x10, l_switch.table.altera_drscan@PAGE
Lloh1:
	add	x10, x10, l_switch.table.altera_drscan@PAGEOFF
	ldr	w1, [x10, x9]
Lloh2:
	adrp	x10, l_switch.table.altera_drscan.1@PAGE
Lloh3:
	add	x10, x10, l_switch.table.altera_drscan.1@PAGEOFF
	ldr	w23, [x10, x9]
	cmp	w8, w1
	b.ne	LBB0_5
	b	LBB0_6
LBB0_2:
Lloh4:
	adrp	x9, _EREMOTEIO@GOTPAGE
Lloh5:
	ldr	x9, [x9, _EREMOTEIO@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cbz	w9, LBB0_4
; %bb.3:
	mov	w23, #0
	neg	w0, w9
	cbnz	w0, LBB0_15
	b	LBB0_6
LBB0_4:
	mov	w23, #0
	mov	w1, #136
	cmp	w8, w1
	b.eq	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_altera_goto_jstate
	cbnz	w0, LBB0_15
LBB0_6:
	add	w8, w24, w21
	add	w24, w8, w25
	ldr	w8, [x19, #12]
	cmp	w24, w8
	b.le	LBB0_9
; %bb.7:
	add	w26, w24, #7
	asr	w25, w26, #3
	ldr	x0, [x19, #24]
	bl	_kfree
	mov	x0, x25
	bl	_alt_malloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_13
; %bb.8:
	and	w8, w26, #0xfffffff8
	str	w8, [x19, #12]
	b	LBB0_10
LBB0_9:
	ldr	x0, [x19, #24]
LBB0_10:
	ldp	w6, w1, [x19, #32]
	ldp	w2, w7, [x19]
	mov	x3, x22
	mov	x4, x20
	mov	x5, x21
	bl	_altera_concatenate_data
	ldr	x3, [x19, #24]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	mov	x4, #0
	bl	_alt_jtag_drscan
	mov	w8, #141
	str	w8, [x19, #8]
	ldr	w1, [x19, #16]
	cmp	w1, #141
	b.ne	LBB0_12
; %bb.11:
	mov	w0, #0
	b	LBB0_15
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_altera_goto_jstate
LBB0_13:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.14:
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.altera_drscan
l_switch.table.altera_drscan:
	.long	137                             ; 0x89
	.long	132                             ; 0x84
	.long	132                             ; 0x84
	.long	132                             ; 0x84
	.long	132                             ; 0x84
	.long	132                             ; 0x84
	.long	132                             ; 0x84
	.long	132                             ; 0x84
	.long	137                             ; 0x89
	.long	137                             ; 0x89
	.long	141                             ; 0x8d
	.long	141                             ; 0x8d
	.long	141                             ; 0x8d
	.long	141                             ; 0x8d
	.long	141                             ; 0x8d
	.long	141                             ; 0x8d
	.long	141                             ; 0x8d

	.p2align	2                               ; @switch.table.altera_drscan.1
l_switch.table.altera_drscan.1:
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1

.subsections_via_symbols
