	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_get_note
_altera_get_note:                       ## @altera_get_note
	.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
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	cmpq	$53, %rsi
	jl	LBB0_2
## %bb.1:
	movl	%r9d, %r12d
	movq	%rdx, %rbx
	movq	%rdi, %r13
	movq	_ENODATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	callq	_get_unaligned_be32
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %r15
	leal	(,%rax,8), %ebx
	andl	$8, %ebx
	leaq	(%rbx,%r13), %rdi
	addq	$8, %rdi
	callq	_get_unaligned_be32
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%r13), %rdi
	addq	$12, %rdi
	callq	_get_unaligned_be32
	movq	%rax, %r14
	leal	(%rbx,%rbx), %edi
	addl	$44, %edi
	addq	%r13, %rdi
	callq	_get_unaligned_be32
	andq	$-2, %r15
	cmpq	$1245793536, %r15               ## imm = 0x4A414D00
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_2
## %bb.3:
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %r12d
	negl	%r12d
	testq	%rax, %rax
	jle	LBB0_19
## %bb.4:
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.12:
	movq	(%rcx), %rbx
	testl	%ebx, %ebx
	js	LBB0_19
## %bb.13:
	movslq	%ebx, %rcx
	cmpq	%rax, %rcx
	jge	LBB0_19
## %bb.14:
	movl	%ebx, %edx
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_16
## %bb.15:
	leal	(,%rdx,8), %eax
	movslq	%eax, %rdi
	addq	%r14, %rdi
	addq	%r13, %rdi
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	callq	_get_unaligned_be32
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_strlcpy
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
LBB0_16:
	shlq	$32, %rbx
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	je	LBB0_18
## %bb.17:
	leal	(,%rdx,8), %eax
	cltq
	addq	%rax, %r14
	leaq	(%r14,%r13), %rdi
	addq	$4, %rdi
	callq	_get_unaligned_be32
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addq	%rax, %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_strlcpy
LBB0_18:
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	addq	%rax, %rbx
	sarq	$32, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	xorl	%r12d, %r12d
	jmp	LBB0_19
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_19:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	testl	%edx, %edx
	je	LBB0_19
## %bb.6:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	addq	%r13, %r14
	xorl	%r15d, %r15d
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r15
	addq	$8, %r14
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	%r15, %rax
	jle	LBB0_19
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_get_unaligned_be32
	testq	%r13, %r13
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rbx
	addq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	addq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strncasecmp
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_get_unaligned_be32
	xorl	%r12d, %r12d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.10:
	addq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	%rax, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_strlcpy
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_altera_get_note
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_get_note
_altera_get_note:                       ; @altera_get_note
	.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
	cmp	x1, #53
	b.lt	LBB0_11
; %bb.1:
	mov	x19, x5
	mov	x27, x4
	mov	x23, x3
	mov	x24, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _ENODATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
Lloh2:
	ldr	w28, [x8]
	bl	_get_unaligned_be32
	mov	x25, x0
	ubfiz	w26, w25, #3, #1
	mov	x20, x19
	lsr	w19, w26, #3
	add	w8, w26, #8
	add	x0, x21, x8
	bl	_get_unaligned_be32
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	add	w8, w26, #12
	add	x0, x21, x8
	bl	_get_unaligned_be32
	mov	x22, x0
	mov	w8, #44
	bfi	w8, w19, #4, #1
	mov	x19, x20
	mov	x20, x27
	add	x0, x21, x8
	bl	_get_unaligned_be32
	mov	w8, #42624
	movk	w8, #9504, lsl #16
	cmp	x8, x25, lsr #1
	b.ne	LBB0_11
; %bb.2:
	mov	x26, x0
	neg	w25, w28
	cmp	x0, #1
	b.lt	LBB0_12
; %bb.3:
	cbz	x24, LBB0_13
; %bb.4:
	ldr	x28, [x24]
	tbnz	w28, #31, LBB0_12
; %bb.5:
	cmp	x26, w28, sxtw
	b.le	LBB0_12
; %bb.6:
	lsl	w25, w28, #3
	cbz	x23, LBB0_8
; %bb.7:
	add	x8, x22, w25, sxtw
	add	x0, x21, x8
	bl	_get_unaligned_be32
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x8, x0, x8
	add	x1, x21, x8
	mov	x0, x23
	mov	x2, x19
	bl	_strlcpy
LBB0_8:
	lsl	x23, x28, #32
	cbz	x20, LBB0_10
; %bb.9:
	add	x8, x22, w25, sxtw
	add	x8, x8, x21
	add	x0, x8, #4
	bl	_get_unaligned_be32
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x8, x0, x8
	add	x1, x21, x8
	mov	x0, x20
	mov	x2, x19
	bl	_strlcpy
LBB0_10:
	mov	w25, #0
	mov	x8, #4294967296
	add	x8, x23, x8
	asr	x8, x8, #32
	str	x8, [x24]
	b	LBB0_12
LBB0_11:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_12:
	mov	x0, x25
	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:
	cbz	w28, LBB0_12
; %bb.14:
	mov	x28, #0
	add	x24, x21, x22
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x28, x28, #1
	add	x24, x24, #8
	cmp	x26, x28
	b.le	LBB0_12
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_get_unaligned_be32
	cbz	x23, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x8, x0, x22
	add	x27, x21, x8
	mov	x0, x27
	bl	_strlen
	mov	x2, x0
	mov	x0, x23
	mov	x1, x27
	bl	_strncasecmp
	cbnz	w0, LBB0_15
; %bb.18:
	add	x0, x24, #4
	bl	_get_unaligned_be32
	cbz	x20, LBB0_20
; %bb.19:
	add	x8, x0, x22
	add	x1, x21, x8
	mov	x0, x20
	mov	x2, x19
	bl	_strlcpy
LBB0_20:
	mov	w25, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_altera_get_note
.subsections_via_symbols
