	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps3vram_cache_match
_ps3vram_cache_match:                   ## @ps3vram_cache_match
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_ps3_system_bus_get_drvdata
	movq	%rax, %r15
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	andl	%ebx, %r12d
	movl	4(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.1:
	movq	16(%r15), %rax
	movq	_CACHE_PAGE_PRESENT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %rcx
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%edx, (%rax,%rbx,8)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r12d, 4(%rax,%rbx,8)
	jne	LBB0_5
## %bb.4:
	incl	24(%r15)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_7
LBB0_6:
	movq	_jiffies@GOTPCREL(%rip), %rdx
	movl	_ps3vram_cache_match.counter(%rip), %eax
	leal	1(%rax), %esi
	movl	%esi, _ps3vram_cache_match.counter(%rip)
	addl	(%rdx), %eax
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%ecx
	movl	%edx, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ps3vram_cache_evict
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_ps3vram_cache_load
	incl	8(%r15)
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_ps3vram_cache_match.counter,4,2 ## @ps3vram_cache_match.counter
	.comm	_CACHE_PAGE_PRESENT,4,2         ## @CACHE_PAGE_PRESENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Found entry %d: 0x%08x\n"

	.comm	_jiffies,4,2                    ## @jiffies
L_.str.1:                               ## @.str.1
	.asciz	"Using entry %d\n"

	.no_dead_strip	_ps3vram_cache_match
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps3vram_cache_match
_ps3vram_cache_match:                   ; @ps3vram_cache_match
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_ps3_system_bus_get_drvdata
	mov	x20, x0
	ldp	w9, w8, [x0]
	neg	w9, w9
	and	w22, w9, w21
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x21, #0
	ldr	x10, [x20, #16]
Lloh0:
	adrp	x9, _CACHE_PAGE_PRESENT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CACHE_PAGE_PRESENT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	x10, x10, #4
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	add	x10, x10, #8
	cmp	x8, x21
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w11, [x10, #-4]
	tst	w9, w11
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x10]
	cmp	w11, w22
	b.ne	LBB0_2
; %bb.5:
	ldr	w8, [x20, #24]
	add	w8, w8, #1
	str	w8, [x20, #24]
	str	x22, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_dbg
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x9, _jiffies@GOTPAGE
Lloh6:
	ldr	x9, [x9, _jiffies@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	adrp	x10, _ps3vram_cache_match.counter@PAGE
	ldr	w11, [x10, _ps3vram_cache_match.counter@PAGEOFF]
	add	w12, w11, #1
	str	w12, [x10, _ps3vram_cache_match.counter@PAGEOFF]
	add	w9, w11, w9
	sdiv	w10, w9, w8
	msub	w21, w10, w8, w9
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_dbg
	mov	x0, x19
	mov	x1, x21
	bl	_ps3vram_cache_evict
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_ps3vram_cache_load
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_ps3vram_cache_match.counter,4,2 ; @ps3vram_cache_match.counter
	.comm	_CACHE_PAGE_PRESENT,4,2         ; @CACHE_PAGE_PRESENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Found entry %d: 0x%08x\n"

	.comm	_jiffies,4,2                    ; @jiffies
l_.str.1:                               ; @.str.1
	.asciz	"Using entry %d\n"

	.no_dead_strip	_ps3vram_cache_match
.subsections_via_symbols
