	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uninorth_fetch_size
_uninorth_fetch_size:                   ## @uninorth_fetch_size
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_agp_bridge@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	24(%rax), %rax
	movl	4(%rax), %edi
	callq	_A_SIZE_32
	movq	%rax, %rbx
	movq	_aperture@GOTPCREL(%rip), %r14
	movq	(%r14), %r15
	testq	%r15, %r15
	je	LBB0_10
## %bb.1:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_memparse
	movq	%r15, (%r14)
	movq	(%r12), %rdx
	movq	24(%rdx), %rcx
	movl	(%rcx), %esi
	testl	%esi, %esi
	jle	LBB0_2
## %bb.6:
	movl	%eax, %edi
	sarl	$20, %edi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%rbx,%rcx,4), %edi
	je	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rcx
	cmpq	%rcx, %rsi
	jne	LBB0_7
	jmp	LBB0_9
LBB0_2:
	xorl	%ecx, %ecx
LBB0_3:
	cmpl	%esi, %ecx
	jne	LBB0_4
LBB0_9:
	movq	32(%rdx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	$0, (%r14)
	jmp	LBB0_10
LBB0_4:
	cmpl	$1048576, %eax                  ## imm = 0x100000
	jae	LBB0_5
LBB0_10:
	movq	(%r12), %rax
	movq	24(%rax), %rcx
	movl	(%rcx), %edx
	testl	%edx, %edx
	jle	LBB0_11
## %bb.12:
	movq	_DEFAULT_APERTURE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, (%rbx,%rcx,4)
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	incq	%rcx
	cmpq	%rcx, %rdx
	jne	LBB0_13
## %bb.15:
	movl	%edx, %ecx
	jmp	LBB0_16
LBB0_11:
	xorl	%ecx, %ecx
	jmp	LBB0_16
LBB0_5:
	movq	(%r12), %rax
LBB0_16:
	movslq	%ecx, %rcx
	leaq	(%rbx,%rcx,4), %rdx
	movq	%rdx, 8(%rax)
	movq	%rdx, 16(%rax)
	movl	%ecx, (%rax)
	movl	(%rbx,%rcx,4), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_agp_bridge,8,3                 ## @agp_bridge
	.comm	_aperture,8,3                   ## @aperture
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid aperture size, using default\n"

	.comm	_DEFAULT_APERTURE_SIZE,4,2      ## @DEFAULT_APERTURE_SIZE
	.no_dead_strip	_uninorth_fetch_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uninorth_fetch_size
_uninorth_fetch_size:                   ; @uninorth_fetch_size
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x22, _agp_bridge@GOTPAGE
Lloh1:
	ldr	x22, [x22, _agp_bridge@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x8, [x8, #24]
	ldr	w0, [x8, #4]
	bl	_A_SIZE_32
	mov	x19, x0
Lloh2:
	adrp	x20, _aperture@GOTPAGE
Lloh3:
	ldr	x20, [x20, _aperture@GOTPAGEOFF]
	ldr	x21, [x20]
	cbz	x21, LBB0_9
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	bl	_memparse
	str	x21, [x20]
	ldr	x8, [x22]
	ldr	x9, [x8, #24]
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x9, #0
	asr	w11, w0, #20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x19, x9, lsl #2]
	cmp	w11, w12
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	cmp	x10, x9
	b.ne	LBB0_3
	b	LBB0_7
LBB0_5:
	mov	w9, #0
LBB0_6:
	cmp	w9, w10
	b.ne	LBB0_8
LBB0_7:
	ldr	x0, [x8, #32]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	str	xzr, [x20]
	b	LBB0_9
LBB0_8:
	cmp	w0, #256, lsl #12               ; =1048576
	b.hs	LBB0_16
LBB0_9:
	ldr	x8, [x22]
	ldr	x9, [x8, #24]
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.10:
	mov	x10, #0
Lloh6:
	adrp	x11, _DEFAULT_APERTURE_SIZE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _DEFAULT_APERTURE_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x19, x10, lsl #2]
	cmp	w12, w11
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x10, x10, #1
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.13:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	b	LBB0_17
LBB0_14:
	mov	w9, #0
	b	LBB0_17
LBB0_15:
	mov	x9, x10
	b	LBB0_17
LBB0_16:
	ldr	x8, [x22]
LBB0_17:
	add	x10, x19, w9, sxtw #2
	stp	x10, x10, [x8, #8]
	str	w9, [x8]
	ldr	w0, [x10]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_agp_bridge,8,3                 ; @agp_bridge
	.comm	_aperture,8,3                   ; @aperture
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid aperture size, using default\n"

	.comm	_DEFAULT_APERTURE_SIZE,4,2      ; @DEFAULT_APERTURE_SIZE
	.no_dead_strip	_uninorth_fetch_size
.subsections_via_symbols
