	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m1541_cache_flush
_m1541_cache_flush:                     ## @m1541_cache_flush
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_global_cache_flush
	movq	_agp_bridge@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	8(%rax), %edi
	callq	_A_SIZE_32
	movl	(%rax), %r15d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	movq	_ALI_CACHE_FLUSH_CTRL@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	4(%rax), %edi
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	callq	_pci_read_config_dword
	movq	(%r12), %rax
	movl	4(%rax), %edi
	movl	(%r13), %esi
	movq	_ALI_CACHE_FLUSH_ADDR_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	-44(%rbp), %ecx
	movl	(%rax), %edx
	addl	%ebx, %edx
	orl	%ecx, %edx
	movq	_ALI_CACHE_FLUSH_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_pci_write_config_dword
	movl	(%r14), %eax
	addl	%eax, %ebx
	movl	%r15d, %ecx
	shll	%cl, %eax
	cmpl	%eax, %ebx
	jl	LBB0_2
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_agp_bridge,8,3                 ## @agp_bridge
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ALI_CACHE_FLUSH_CTRL,4,2       ## @ALI_CACHE_FLUSH_CTRL
	.comm	_ALI_CACHE_FLUSH_ADDR_MASK,4,2  ## @ALI_CACHE_FLUSH_ADDR_MASK
	.comm	_ALI_CACHE_FLUSH_EN,4,2         ## @ALI_CACHE_FLUSH_EN
	.no_dead_strip	_m1541_cache_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m1541_cache_flush
_m1541_cache_flush:                     ; @m1541_cache_flush
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	bl	_global_cache_flush
Lloh0:
	adrp	x19, _agp_bridge@GOTPAGE
Lloh1:
	ldr	x19, [x19, _agp_bridge@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w0, [x8, #8]
	bl	_A_SIZE_32
	ldr	w20, [x0]
Lloh2:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	w8, w8, w20
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w22, #0
Lloh4:
	adrp	x23, _ALI_CACHE_FLUSH_CTRL@GOTPAGE
Lloh5:
	ldr	x23, [x23, _ALI_CACHE_FLUSH_CTRL@GOTPAGEOFF]
Lloh6:
	adrp	x24, _ALI_CACHE_FLUSH_ADDR_MASK@GOTPAGE
Lloh7:
	ldr	x24, [x24, _ALI_CACHE_FLUSH_ADDR_MASK@GOTPAGEOFF]
Lloh8:
	adrp	x25, _ALI_CACHE_FLUSH_EN@GOTPAGE
Lloh9:
	ldr	x25, [x25, _ALI_CACHE_FLUSH_EN@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	x8, [x19]
	ldr	w1, [x23]
	ldr	w9, [sp, #12]
	ldr	w10, [x24]
	and	w9, w10, w9
	ldp	w8, w0, [x8]
	add	w8, w8, w22
	orr	w8, w8, w9
	ldr	w9, [x25]
	orr	w2, w8, w9
	bl	_pci_write_config_dword
	ldr	w8, [x21]
	lsl	w9, w8, w20
	add	w22, w8, w22
	cmp	w22, w9
	b.lt	LBB0_2
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_agp_bridge,8,3                 ; @agp_bridge
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ALI_CACHE_FLUSH_CTRL,4,2       ; @ALI_CACHE_FLUSH_CTRL
	.comm	_ALI_CACHE_FLUSH_ADDR_MASK,4,2  ; @ALI_CACHE_FLUSH_ADDR_MASK
	.comm	_ALI_CACHE_FLUSH_EN,4,2         ; @ALI_CACHE_FLUSH_EN
	.no_dead_strip	_m1541_cache_flush
.subsections_via_symbols
