	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_get_act_info
_altera_get_act_info:                   ## @altera_get_act_info
	.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
                                        ## kill: def $edx killed $edx def $rdx
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	cmpq	$53, %rsi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jl	LBB0_13
## %bb.1:
	movq	%r8, %r14
	movq	%rcx, %r12
	movq	%rdi, %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%r9, -96(%rbp)                  ## 8-byte Spill
	callq	_get_unaligned_be32
	cmpl	$1245793537, %eax               ## imm = 0x4A414D01
	jne	LBB0_13
## %bb.2:
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	leaq	16(%r15), %rdi
	callq	_get_unaligned_be32
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	32(%r15), %rdi
	callq	_get_unaligned_be32
	movl	%eax, %r13d
	leaq	48(%r15), %rdi
	callq	_get_unaligned_be32
	movl	%eax, %r12d
	leaq	64(%r15), %rdi
	callq	_get_unaligned_be32
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	leaq	192(%r15), %rdi
	callq	_get_unaligned_be32
	movl	%eax, %r14d
	leaq	208(%r15), %rdi
	callq	_get_unaligned_be32
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpl	%ecx, %r14d
	jle	LBB0_13
## %bb.3:
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	leal	(%rcx,%rcx,2), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leal	(%rcx,%rax,4), %eax
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	movslq	%eax, %r12
	leaq	(%r15,%r12,4), %rdi
	callq	_get_unaligned_be32
	movl	%eax, %r14d
	leaq	(%r15,%r12,4), %rdi
	addq	$16, %rdi
	callq	_get_unaligned_be32
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	leaq	(%r15,%r12,4), %rdi
	addq	$32, %rdi
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	callq	_get_unaligned_be32
                                        ## kill: def $eax killed $eax def $rax
	addl	%ebx, %r14d
	movslq	%r14d, %rcx
	leaq	(%r15,%rcx,4), %rcx
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, (%rdx)
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	subl	%ebx, %ecx
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	cmpl	%ecx, %edx
	jge	LBB0_5
## %bb.4:
	movl	%edx, %ecx
	addl	%ebx, %ecx
	movslq	%ecx, %rcx
	leaq	(%r15,%rcx,4), %rcx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, (%rdx)
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	leal	(%rax,%rax,2), %ecx
	leal	(%rax,%rcx,4), %eax
	movl	%r13d, %ebx
	addl	%r13d, %eax
	movslq	%eax, %r12
	leaq	(%r15,%r12,4), %rdi
	callq	_get_unaligned_be32
	movl	%eax, %r14d
	movl	32(%r15,%r12,4), %r13d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	andl	$3, %r13d
	addl	-56(%rbp), %r14d                ## 4-byte Folded Reload
	movslq	%r14d, %rcx
	leaq	(%r15,%rcx,4), %rcx
	movq	%rcx, (%rax)
	movl	%r13d, 8(%rax)
	movq	$0, 16(%rax)
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rcx, %rdx
	movq	16(%rcx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, 16(%rdx)
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, (%rdx)
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %r13d
	leaq	(%r15,%r12,4), %rdi
	addq	$16, %rdi
	callq	_get_unaligned_be32
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	-72(%rbp), %eax                 ## 4-byte Folded Reload
	jl	LBB0_5
LBB0_13:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_altera_get_act_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_get_act_info
_altera_get_act_info:                   ; @altera_get_act_info
	.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
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	cmp	x1, #53
	b.lt	LBB0_13
; %bb.1:
	mov	x19, x5
	mov	x25, x4
	mov	x26, x3
	mov	x27, x2
	mov	x21, x0
	bl	_get_unaligned_be32
	mov	w8, #19713
	movk	w8, #19009, lsl #16
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.2:
	add	x0, x21, #16
	bl	_get_unaligned_be32
	str	w0, [sp, #8]                    ; 4-byte Folded Spill
	add	x0, x21, #32
	bl	_get_unaligned_be32
	mov	x22, x0
	add	x0, x21, #48
	bl	_get_unaligned_be32
	mov	x20, x0
	add	x0, x21, #64
	bl	_get_unaligned_be32
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	add	x0, x21, #192
	bl	_get_unaligned_be32
	mov	x28, x0
	add	x0, x21, #208
	bl	_get_unaligned_be32
	cmp	w28, w27
	b.le	LBB0_13
; %bb.3:
	mov	x24, x0
	mov	w8, #12
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	madd	w8, w27, w8, w9
	add	x28, x21, w8, sxtw #2
	mov	x0, x28
	bl	_get_unaligned_be32
	str	w0, [sp, #8]                    ; 4-byte Folded Spill
	add	x0, x28, #16
	bl	_get_unaligned_be32
	mov	x27, x0
	add	x0, x28, #32
	bl	_get_unaligned_be32
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	add	w8, w8, w20
	add	x8, x21, w8, sxtw #2
	str	x8, [x26]
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	sub	w8, w8, w20
	cmp	w27, w8
	b.ge	LBB0_5
; %bb.4:
	add	w8, w27, w20
	add	x8, x21, w8, sxtw #2
	str	x8, [x25]
LBB0_5:
	mov	x27, x20
Lloh3:
	adrp	x28, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x28, [x28, _GFP_KERNEL@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	sxtw	x8, w20
	add	x8, x21, x8, lsl #2
	add	x0, x8, #16
	bl	_get_unaligned_be32
	cmp	w0, #0
	ccmp	w0, w24, #0, ne
	b.ge	LBB0_13
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	mov	w8, #13
	madd	w20, w0, w8, w22
	add	x26, x21, w20, sxtw #2
	mov	x0, x26
	bl	_get_unaligned_be32
	mov	x25, x0
	ldr	w26, [x26, #32]
	ldr	w1, [x28]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	and	w8, w26, #0x3
	add	w9, w25, w27
	add	x9, x21, w9, sxtw #2
	str	x9, [x0]
	str	w8, [x0, #8]
	str	xzr, [x0, #16]
	ldr	x8, [x19]
	cbz	x8, LBB0_12
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x9, x8
	ldr	x8, [x8, #16]
	cbnz	x8, LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	str	x0, [x9, #16]
	b	LBB0_7
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	str	x0, [x19]
	b	LBB0_7
LBB0_13:
	mov	x0, x23
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_altera_get_act_info
.subsections_via_symbols
