	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_io_mark_bad                ## -- Begin function ubi_io_mark_bad
	.p2align	4, 0x90
_ubi_io_mark_bad:                       ## @ubi_io_mark_bad
	.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, %r14d
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	cmpl	%r14d, (%rbx)
	setg	%dil
LBB0_2:
	movq	24(%rbx), %r12
	callq	_ubi_assert
	cmpq	$0, 16(%rbx)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_ubi_err
	movq	_EROFS@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_4:
	xorl	%r15d, %r15d
	cmpl	$0, 8(%rbx)
	je	LBB0_7
## %bb.5:
	movl	4(%rbx), %esi
	imull	%r14d, %esi
	movq	%r12, %rdi
	callq	*(%r12)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_ubi_err
	movl	%ebx, %r15d
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read-only mode"

	.comm	_EROFS,4,2                      ## @EROFS
L_.str.1:                               ## @.str.1
	.asciz	"cannot mark PEB %d bad, error %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_io_mark_bad                ; -- Begin function ubi_io_mark_bad
	.p2align	2
_ubi_io_mark_bad:                       ; @ubi_io_mark_bad
	.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	x19, x1
	mov	x20, x0
	tbnz	w1, #31, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, w19
	cset	w0, gt
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldr	x21, [x20, #24]
	bl	_ubi_assert
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_6
; %bb.4:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ubi_err
Lloh2:
	adrp	x8, _EROFS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	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
LBB0_6:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_9
; %bb.7:
	ldr	x8, [x21]
	ldr	w9, [x20, #4]
	mul	w1, w9, w19
	mov	x0, x21
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.8:
	stp	x19, x20, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ubi_err
	b	LBB0_5
LBB0_9:
	mov	w20, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read-only mode"

	.comm	_EROFS,4,2                      ; @EROFS
l_.str.1:                               ; @.str.1
	.asciz	"cannot mark PEB %d bad, error %d"

.subsections_via_symbols
