	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function inval_cache_and_wait_for_operation
_inval_cache_and_wait_for_operation:    ## @inval_cache_and_wait_for_operation
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%r8d, %r15d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	$128, %edi
	callq	_CMD
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	4(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_INVALIDATE_CACHED_RANGE
LBB0_2:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_mutex_lock
	movl	16(%rbp), %ecx
	testl	%ecx, %ecx
	movl	$500000, %eax                   ## imm = 0x7A120
	cmovnel	%ecx, %eax
	shrl	%r13d
	leaq	24(%r12), %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	xorl	%eax, %eax
	callq	_cond_resched
	decl	%ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_mutex_lock
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	%r13d, -64(%rbp)                ## 4-byte Spill
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	cmpl	%r14d, (%r12)
	movq	%r12, %rbx
	movq	_current@GOTPCREL(%rip), %rax
	movq	_wait@GOTPCREL(%rip), %r15
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edi
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_add_wait_queue
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_schedule
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_remove_wait_queue
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_current@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rbx)
	jne	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %r12
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_map_read
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %edx
	callq	_map_word_andequal
	testq	%rax, %rax
	jne	LBB0_19
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 16(%r12)
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movq	_FL_ERASING@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, 16(%r12)
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 8(%r12)
	je	LBB0_15
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movq	_FL_WRITING@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, 8(%r12)
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpq	$0, 8(%r12)
	jne	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	testl	%ebx, %ebx
	je	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	movq	_HZ@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	cmpl	%eax, %r13d
	jb	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %eax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	shrq	$38, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	movq	%rcx, %r15
	callq	_msleep
	subl	%r13d, %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	idivl	(%r15)
	movl	%eax, %r13d
	jmp	LBB0_18
LBB0_19:
	movq	_FL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_16:
	movl	$112, %edi
	callq	_CMD
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_map_write
	movq	_FL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movq	_ETIME@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_20:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.comm	_FL_ERASING,4,2                 ## @FL_ERASING
	.comm	_FL_WRITING,4,2                 ## @FL_WRITING
	.comm	_FL_STATUS,8,3                  ## @FL_STATUS
	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_inval_cache_and_wait_for_operation
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function inval_cache_and_wait_for_operation
_inval_cache_and_wait_for_operation:    ; @inval_cache_and_wait_for_operation
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x6
	mov	x24, x5
	mov	x26, x4
	mov	x27, x3
	str	x2, [sp, #24]                   ; 8-byte Folded Spill
	mov	x19, x1
	mov	x20, x0
	mov	w0, #128
	bl	_CMD
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	mov	x23, x19
	ldr	w28, [x23], #4
	mov	x0, x23
	bl	_mutex_unlock
	cbz	w26, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x27
	mov	x2, x26
	bl	_INVALIDATE_CACHED_RANGE
LBB0_2:
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
	mov	x0, x23
	bl	_mutex_lock
	mov	w8, #41248
	movk	w8, #7, lsl #16
	cmp	w25, #0
	csel	w21, w8, w25, eq
	lsr	w26, w24, #1
	add	x24, x19, #24
Lloh0:
	adrp	x25, _wait@GOTPAGE
Lloh1:
	ldr	x25, [x25, _wait@GOTPAGEOFF]
Lloh2:
	adrp	x20, _current@GOTPAGE
Lloh3:
	ldr	x20, [x20, _current@GOTPAGEOFF]
Lloh4:
	adrp	x27, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
	str	w21, [sp, #8]                   ; 4-byte Folded Spill
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x25]
	ldr	w1, [x20]
	bl	_DECLARE_WAITQUEUE
	ldr	w0, [x27]
	bl	_set_current_state
	mov	x0, x24
	mov	x1, x25
	bl	_add_wait_queue
	mov	x0, x23
	bl	_mutex_unlock
	bl	_schedule
	mov	x0, x24
	mov	x1, x25
	bl	_remove_wait_queue
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_mutex_lock
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	cmp	w8, w28
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	x22, x1, [sp, #16]              ; 16-byte Folded Reload
	mov	x0, x22
	bl	_map_read
	mov	x1, x0
	mov	x0, x22
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	mov	x3, x2
	bl	_map_word_andequal
	cbnz	x0, LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh6:
	adrp	x8, _FL_ERASING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FL_ERASING@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w28, w8
	mov	w22, #16960
	movk	w22, #15, lsl #16
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x19, #16]
	ldr	w21, [sp, #8]                   ; 4-byte Folded Reload
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh9:
	adrp	x8, _FL_WRITING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FL_WRITING@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w28, w8
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x19, #8]
	ldr	w21, [sp, #8]                   ; 4-byte Folded Reload
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w22, #16960
	movk	w22, #15, lsl #16
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_11
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w21, LBB0_19
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_mutex_unlock
Lloh12:
	adrp	x8, _HZ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	sdiv	w8, w22, w8
	cmp	w26, w8
	b.hs	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_udelay
	bl	_cond_resched
	sub	w21, w21, #1
	b	LBB0_4
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w26, w8
	lsr	x0, x8, #38
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_msleep
	sub	w21, w21, w26
Lloh15:
	adrp	x8, _HZ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	sdiv	w26, w22, w8
	b	LBB0_4
LBB0_18:
	mov	w0, #0
Lloh18:
	adrp	x8, _FL_STATUS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FL_STATUS@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	str	w8, [x19]
	b	LBB0_20
LBB0_19:
	mov	w0, #112
	bl	_CMD
	mov	x1, x0
	ldp	x0, x2, [sp, #16]               ; 16-byte Folded Reload
	bl	_map_write
Lloh21:
	adrp	x8, _FL_STATUS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FL_STATUS@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	str	w8, [x19]
Lloh24:
	adrp	x8, _ETIME@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.comm	_FL_ERASING,4,2                 ; @FL_ERASING
	.comm	_FL_WRITING,4,2                 ; @FL_WRITING
	.comm	_FL_STATUS,8,3                  ; @FL_STATUS
	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_inval_cache_and_wait_for_operation
.subsections_via_symbols
