	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_read_packed
_altera_read_packed:                    ## @altera_read_packed
	.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	%rbx
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	jle	LBB0_1
## %bb.2:
	movq	%rcx, %r8
	movq	(%rdx), %r10
	xorl	%r9d, %r9d
	movq	_CHAR_BITS@GOTPCREL(%rip), %r11
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %r14
	movq	(%r8), %r15
	movq	(%rdi,%r15,8), %rax
	movl	(%r11), %ecx
	subl	%r10d, %ecx
	sarq	%cl, %rax
	movl	$255, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %ebx
	andl	%ebx, %eax
	movl	%r9d, %ecx
	shlq	%cl, %rax
	orq	%r14, %rax
	subq	%rsi, %r10
	jge	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movq	%r15, (%r8)
	movq	(%rdx), %rcx
	addq	%rcx, %r9
	movq	(%r11), %r10
	movq	%r10, (%rdx)
	subq	%rcx, %rsi
	jg	LBB0_3
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_SHORT_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%esi, %r9d
	subl	%r9d, %ecx
	movl	$65535, %esi                    ## imm = 0xFFFF
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %esi
	andl	%esi, %eax
	movq	%r10, (%rdx)
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHAR_BITS,8,3                  ## @CHAR_BITS
	.comm	_SHORT_BITS,8,3                 ## @SHORT_BITS
	.no_dead_strip	_altera_read_packed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_read_packed
_altera_read_packed:                    ; @altera_read_packed
	.cfi_startproc
; %bb.0:
	cmp	x1, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x8, x0
	mov	x9, #0
	mov	x0, #0
	ldr	x12, [x2]
Lloh0:
	adrp	x10, _CHAR_BITS@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CHAR_BITS@GOTPAGEOFF]
	mov	w11, #255
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x3]
	ldr	x14, [x8, x13, lsl #3]
	ldr	x15, [x10]
	sub	x15, x15, x12
	asr	x14, x14, x15
	lsr	w15, w11, w15
	and	x14, x14, x15
	lsl	x14, x14, x9
	orr	x0, x14, x0
	subs	x12, x12, x1
	b.ge	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x12, x13, #1
	str	x12, [x3]
	ldr	x12, [x2]
	add	x9, x12, x9
	sub	x1, x1, x12
	ldr	x12, [x10]
	str	x12, [x2]
	cmp	x1, #0
	b.gt	LBB0_2
; %bb.4:
	ret
LBB0_5:
	mov	x0, #0
	ret
LBB0_6:
Lloh2:
	adrp	x8, _SHORT_BITS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SHORT_BITS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	add	w9, w9, w1
	sub	w8, w8, w9
	mov	w9, #65535
	lsr	w8, w9, w8
	and	x0, x0, x8
	str	x12, [x2]
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CHAR_BITS,8,3                  ; @CHAR_BITS
	.comm	_SHORT_BITS,8,3                 ; @SHORT_BITS
	.no_dead_strip	_altera_read_packed
.subsections_via_symbols
