	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cache_open
_cache_open:                            ## @cache_open
	.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
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	8(%rdx), %edi
	callq	_try_module_get
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_nonseekable_open
	movq	_FMODE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	$0, 8(%rax)
	movl	$1, (%rax)
	leaq	4(%r15), %rdi
	callq	_atomic_inc
	movq	_queue_lock@GOTPCREL(%rip), %r13
	movq	%r13, %rdi
	callq	_spin_lock
	movq	%r12, %rdi
	addq	$4, %rdi
	movq	%r15, %rsi
	callq	_list_add
	movq	%r13, %rdi
	callq	_spin_unlock
	jmp	LBB0_9
LBB0_2:
	movq	_EACCES@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_5:
	xorl	%r12d, %r12d
LBB0_9:
	movq	%r12, 8(%r14)
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_FMODE_READ,4,2                 ## @FMODE_READ
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_queue_lock,4,2                 ## @queue_lock
	.no_dead_strip	_cache_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cache_open
_cache_open:                            ; @cache_open
	.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
	cbz	x2, LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x2, #8]
	bl	_try_module_get
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x21
	mov	x1, x19
	bl	_nonseekable_open
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _FMODE_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FMODE_READ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_10
; %bb.4:
	mov	x21, x0
	str	xzr, [x0, #8]
	mov	w8, #1
	str	w8, [x0]
	add	x0, x20, #4
	bl	_atomic_inc
Lloh6:
	adrp	x22, _queue_lock@GOTPAGE
Lloh7:
	ldr	x22, [x22, _queue_lock@GOTPAGEOFF]
	mov	x0, x22
	bl	_spin_lock
	add	x0, x21, #4
	mov	x1, x20
	bl	_list_add
	mov	x0, x22
	bl	_spin_unlock
	b	LBB0_8
LBB0_5:
Lloh8:
	adrp	x8, _EACCES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	mov	x21, #0
LBB0_8:
	mov	w0, #0
	str	x21, [x19, #8]
LBB0_9:
	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
LBB0_10:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_FMODE_READ,4,2                 ; @FMODE_READ
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_queue_lock,4,2                 ; @queue_lock
	.no_dead_strip	_cache_open
.subsections_via_symbols
