	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bch_count_io_errors            ## -- Begin function bch_count_io_errors
	.p2align	4, 0x90
_bch_count_io_errors:                   ## @bch_count_io_errors
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.1:
	leaq	20(%r13), %rbx
	movq	%rbx, %rdi
	callq	_atomic_inc_return
	movl	%eax, %r15d
	movq	8(%r13), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r15d
	jbe	LBB0_8
## %bb.2:
	leaq	16(%r13), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r13), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %r15d
	cmpl	%ecx, %eax
	jbe	LBB0_8
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	%r15d, %r12d
	subl	%ecx, %r12d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_atomic_cmpxchg
	cmpl	%r15d, %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %r15
	movq	%r14, %rdi
	callq	_atomic_read
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %eax
	shll	$7, %eax
	subl	%ebx, %eax
	leal	127(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$7, %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_atomic_cmpxchg
	cmpl	%eax, %ebx
	movl	%eax, %ebx
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %eax
	movq	%r15, %rbx
	jmp	LBB0_7
LBB0_8:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_11
## %bb.9:
	movq	_IO_ERROR_SHIFT@GOTPCREL(%rip), %rbx
	movb	(%rbx), %cl
	movl	$1, %edi
	shll	%cl, %edi
	leaq	16(%r13), %rsi
	callq	_atomic_add_return
	movb	(%rbx), %cl
	shrl	%cl, %eax
	movq	8(%r13), %rdi
	movl	(%r13), %edx
	cmpl	4(%rdi), %eax
	jae	LBB0_10
## %bb.12:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bch_cache_set_error            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_ERROR_SHIFT,4,2             ## @IO_ERROR_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: IO error on %s%s"

L_.str.1:                               ## @.str.1
	.asciz	", recovering."

L_.str.2:                               ## @.str.2
	.asciz	"."

L_.str.3:                               ## @.str.3
	.asciz	"%s: too many IO errors %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bch_count_io_errors            ; -- Begin function bch_count_io_errors
	.p2align	2
_bch_count_io_errors:                   ; @bch_count_io_errors
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.1:
	add	x23, x21, #20
	mov	x0, x23
	bl	_atomic_inc_return
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	cmp	w0, w8
	b.ls	LBB0_8
; %bb.2:
	mov	x26, x0
	add	x24, x21, #16
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	mov	x26, x0
	cmp	w0, w8
	b.ls	LBB0_8
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	sub	w25, w26, w8
	mov	x0, x23
	mov	x1, x26
	mov	x2, x25
	bl	_atomic_cmpxchg
	cmp	w0, w26
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_atomic_read
	mov	x26, x0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	w8, w26, #7
	sub	w8, w8, w26
	add	w9, w8, #127
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w2, w8, #7
	mov	x0, x24
	mov	x1, x26
	bl	_atomic_cmpxchg
	cmp	w26, w0
	mov	x26, x0
	b.ne	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	b	LBB0_3
LBB0_8:
	cbz	x22, LBB0_11
; %bb.9:
Lloh0:
	adrp	x22, _IO_ERROR_SHIFT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IO_ERROR_SHIFT@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	w9, #1
	lsl	w0, w9, w8
	add	x1, x21, #16
	bl	_atomic_add_return
	ldr	w8, [x22]
	lsr	w8, w0, w8
	ldr	x0, [x21, #8]
	ldr	w9, [x0, #4]
	ldr	w2, [x21]
	cmp	w8, w9
	b.hs	LBB0_12
; %bb.10:
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh4:
	adrp	x9, l_.str.2@PAGE
Lloh5:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x3, x9, x8, eq
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	mov	x2, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_pr_err
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_bch_cache_set_error
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_ERROR_SHIFT,4,2             ; @IO_ERROR_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: IO error on %s%s"

l_.str.1:                               ; @.str.1
	.asciz	", recovering."

l_.str.2:                               ; @.str.2
	.asciz	"."

l_.str.3:                               ; @.str.3
	.asciz	"%s: too many IO errors %s"

.subsections_via_symbols
