	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ati_fetch_size
_ati_fetch_size:                        ## @ati_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_is_r200
	movq	_agp_bridge@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movl	32(%rcx), %edi
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_ATI_RS300_APSIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ATI_RS100_APSIZE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_pci_read_config_dword
	andl	$14, -20(%rbp)
	movq	(%rbx), %rax
	movq	24(%rax), %rax
	movl	4(%rax), %edi
	callq	_A_SIZE_LVL2
	movq	(%rbx), %rcx
	movq	24(%rcx), %rdx
	movl	(%rdx), %edx
	testl	%edx, %edx
	jle	LBB0_9
## %bb.4:
	movl	-20(%rbp), %edi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%rax), %edi
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rsi
	addq	$8, %rax
	cmpq	%rsi, %rdx
	jne	LBB0_5
## %bb.8:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_6:
	movq	%rax, 8(%rcx)
	movq	%rax, 16(%rcx)
	movl	%esi, (%rcx)
	movl	4(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_agp_bridge,8,3                 ## @agp_bridge
	.comm	_ATI_RS100_APSIZE,4,2           ## @ATI_RS100_APSIZE
	.comm	_ATI_RS300_APSIZE,4,2           ## @ATI_RS300_APSIZE
	.no_dead_strip	_ati_fetch_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ati_fetch_size
_ati_fetch_size:                        ; @ati_fetch_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_is_r200
Lloh0:
	adrp	x19, _agp_bridge@GOTPAGE
Lloh1:
	ldr	x19, [x19, _agp_bridge@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _ATI_RS300_APSIZE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ATI_RS300_APSIZE@GOTPAGEOFF]
	ldr	w8, [x8, #32]
Lloh4:
	adrp	x10, _ATI_RS100_APSIZE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _ATI_RS100_APSIZE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x9, x9, x10, eq
	ldr	w1, [x9]
	add	x2, sp, #12
	mov	x0, x8
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	and	w8, w8, #0xe
	str	w8, [sp, #12]
	ldr	x8, [x19]
	ldr	x8, [x8, #24]
	ldr	w0, [x8, #4]
	bl	_A_SIZE_LVL2
	ldr	x8, [x19]
	ldr	x9, [x8, #24]
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x10, #0
	ldr	w11, [sp, #12]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x0]
	cmp	w11, w12
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #1
	add	x0, x0, #8
	cmp	x9, x10
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	stp	x0, x0, [x8, #8]
	str	w10, [x8]
	ldr	w0, [x0, #4]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_agp_bridge,8,3                 ; @agp_bridge
	.comm	_ATI_RS100_APSIZE,4,2           ; @ATI_RS100_APSIZE
	.comm	_ATI_RS300_APSIZE,4,2           ; @ATI_RS300_APSIZE
	.no_dead_strip	_ati_fetch_size
.subsections_via_symbols
