	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_write_oob                  ## -- Begin function mtd_write_oob
	.p2align	4, 0x90
_mtd_write_oob:                         ## @mtd_write_oob
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, 32(%rdx)
	movq	$0, 8(%rdx)
	movq	_MTD_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
## %bb.4:
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_mtd_check_oob_ops
	testl	%eax, %eax
	jne	LBB0_3
## %bb.5:
	xorl	%eax, %eax
	callq	_ledtrig_mtd_activity
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_1:
	movq	_EROFS@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	16(%r15), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	cmpq	$0, 24(%rbx)
	je	LBB0_10
LBB0_8:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_10:
	leaq	8(%rbx), %rcx
	movl	(%rbx), %r8d
	movl	16(%rbx), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MTD_WRITEABLE,4,2              ## @MTD_WRITEABLE
	.comm	_EROFS,4,2                      ## @EROFS
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_write_oob                  ; -- Begin function mtd_write_oob
	.p2align	2
_mtd_write_oob:                         ; @mtd_write_oob
	.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
	mov	x22, x2
	str	xzr, [x22, #8]!
	str	xzr, [x22, #24]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MTD_WRITEABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MTD_WRITEABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_mtd_check_oob_ops
	cbnz	w0, LBB0_6
; %bb.2:
	bl	_ledtrig_mtd_activity
	ldr	x3, [x21, #8]
	cbz	x3, LBB0_7
; %bb.3:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	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
	br	x3
LBB0_4:
Lloh3:
	adrp	x8, _EROFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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_7:
	ldr	x5, [x21, #16]
	cbz	x5, LBB0_9
; %bb.8:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_10
LBB0_9:
Lloh5:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_5
LBB0_10:
	ldr	w2, [x20, #16]
	ldr	w4, [x20]
	mov	x0, x21
	mov	x1, x19
	mov	x3, x22
	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
	br	x5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MTD_WRITEABLE,4,2              ; @MTD_WRITEABLE
	.comm	_EROFS,4,2                      ; @EROFS
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
