	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_wl_put_fm_peb              ## -- Begin function ubi_wl_put_fm_peb
	.p2align	4, 0x90
_ubi_wl_put_fm_peb:                     ## @ubi_wl_put_fm_peb
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	(%rsi), %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_dbg_wl
	movl	%ebx, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_ubi_assert
	xorl	%edi, %edi
	cmpl	(%r13), %ebx
	setl	%dil
	callq	_ubi_assert
	leaq	4(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	8(%r13), %rax
	movslq	%ebx, %r15
	movq	(%rax,%r15,8), %rbx
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	movq	8(%r12), %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ubi_assert
	movq	8(%r13), %rax
	movq	%r12, (%rax,%r15,8)
	movq	%r12, %rbx
LBB0_2:
	movq	%r14, %rdi
	callq	_spin_unlock
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	jne	LBB0_3
## %bb.4:
	movq	_UBI_FM_SB_VOLUME_ID@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_UBI_FM_DATA_VOLUME_ID@GOTPCREL(%rip), %rax
LBB0_5:
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	$1, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_schedule_erase                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PEB %d"

	.comm	_UBI_FM_DATA_VOLUME_ID,4,2      ## @UBI_FM_DATA_VOLUME_ID
	.comm	_UBI_FM_SB_VOLUME_ID,4,2        ## @UBI_FM_SB_VOLUME_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_wl_put_fm_peb              ; -- Begin function ubi_wl_put_fm_peb
	.p2align	2
_ubi_wl_put_fm_peb:                     ; @ubi_wl_put_fm_peb
	.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	w23, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_dbg_wl
	mvn	w8, w23
	lsr	w0, w8, #31
	bl	_ubi_assert
	ldr	w8, [x21]
	cmp	w23, w8
	cset	w0, lt
	bl	_ubi_assert
	add	x24, x21, #4
	mov	x0, x24
	bl	_spin_lock
	ldr	x8, [x21, #8]
	ldr	x25, [x8, w23, sxtw #3]
	cbnz	x25, LBB0_2
; %bb.1:
	sxtw	x23, w23
	ldr	x8, [x22, #8]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	bl	_ubi_assert
	ldr	x8, [x21, #8]
	str	x22, [x8, x23, lsl #3]
	mov	x25, x22
LBB0_2:
	mov	x0, x24
	bl	_spin_unlock
Lloh2:
	adrp	x8, _UBI_FM_DATA_VOLUME_ID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _UBI_FM_DATA_VOLUME_ID@GOTPAGEOFF]
Lloh4:
	adrp	x9, _UBI_FM_SB_VOLUME_ID@GOTPAGE
Lloh5:
	ldr	x9, [x9, _UBI_FM_SB_VOLUME_ID@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x25
	mov	x3, x20
	mov	x4, x19
	mov	w5, #1
	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	_schedule_erase
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PEB %d"

	.comm	_UBI_FM_DATA_VOLUME_ID,4,2      ; @UBI_FM_DATA_VOLUME_ID
	.comm	_UBI_FM_SB_VOLUME_ID,4,2        ; @UBI_FM_SB_VOLUME_ID
.subsections_via_symbols
