	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_panic_write                ## -- Begin function mtd_panic_write
	.p2align	4, 0x90
_mtd_panic_write:                       ## @mtd_panic_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	$0, (%rcx)
	movq	(%rdi), %r9
	testq	%r9, %r9
	je	LBB0_1
## %bb.3:
	testq	%rsi, %rsi
	js	LBB0_6
## %bb.4:
	movq	8(%rdi), %rax
	subq	%rsi, %rax
	jle	LBB0_6
## %bb.5:
	cmpq	%rdx, %rax
	jb	LBB0_6
## %bb.7:
	movq	_MTD_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rdi)
	je	LBB0_8
## %bb.9:
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.12:
	cmpl	$0, 20(%rdi)
	je	LBB0_13
## %bb.14:
	popq	%rbp
	jmpq	*%r9                            ## TAILCALL
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_8:
	movq	_EROFS@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_10:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_13:
	movl	$1, 20(%rdi)
	popq	%rbp
	jmpq	*%r9                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MTD_WRITEABLE,4,2              ## @MTD_WRITEABLE
	.comm	_EROFS,4,2                      ## @EROFS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_panic_write                ; -- Begin function mtd_panic_write
	.p2align	2
_mtd_panic_write:                       ; @mtd_panic_write
	.cfi_startproc
; %bb.0:
	str	xzr, [x3]
	ldr	x5, [x0]
	cbz	x5, LBB0_4
; %bb.1:
	tbnz	x1, #63, LBB0_3
; %bb.2:
	ldr	x8, [x0, #8]
	subs	x8, x8, x1
	ccmp	x8, x2, #0, gt
	b.hs	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_6:
	ldr	w8, [x0, #16]
Lloh4:
	adrp	x9, _MTD_WRITEABLE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MTD_WRITEABLE@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.7:
	cbz	x2, LBB0_11
; %bb.8:
	ldr	w8, [x0, #20]
	cbz	w8, LBB0_12
; %bb.9:
	br	x5
LBB0_10:
Lloh7:
	adrp	x8, _EROFS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
	b	LBB0_5
LBB0_11:
	mov	w0, #0
	ret
LBB0_12:
	mov	w8, #1
	str	w8, [x0, #20]
	br	x5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MTD_WRITEABLE,4,2              ; @MTD_WRITEABLE
	.comm	_EROFS,4,2                      ; @EROFS
.subsections_via_symbols
