	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_wl_put_peb                 ## -- Begin function ubi_wl_put_peb
	.p2align	4, 0x90
_ubi_wl_put_peb:                        ## @ubi_wl_put_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	callq	_dbg_wl
	movl	%ebx, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_ubi_assert
	xorl	%edi, %edi
	cmpl	%ebx, (%r12)
	setg	%dil
	callq	_ubi_assert
	leaq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	56(%r12), %rax
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %r15
	movq	(%rax,%r15,8), %r13
	cmpq	48(%r12), %r13
	jne	LBB0_3
## %bb.1:
	leaq	40(%r12), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_dbg_wl
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_spin_lock
	movq	56(%r12), %rax
	movq	(%rax,%r15,8), %r13
	cmpq	48(%r12), %r13
	je	LBB0_2
LBB0_3:
	cmpq	32(%r12), %r13
	je	LBB0_4
## %bb.5:
	leaq	20(%r12), %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_in_wl_tree
	testq	%rax, %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_8
## %bb.6:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_paranoid_check_in_wl_tree
	leaq	4(%r13), %rdi
	movq	%rbx, %rsi
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_dbg_wl
	xorl	%edi, %edi
	cmpl	$0, 4(%r12)
	sete	%dil
	callq	_ubi_assert
	movl	$1, 4(%r12)
	xorl	%r15d, %r15d
	jmp	LBB0_17
LBB0_8:
	leaq	28(%r12), %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_in_wl_tree
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_paranoid_check_in_wl_tree
	leaq	4(%r13), %rdi
	movq	%r15, %rsi
LBB0_7:
	callq	_rb_erase
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_12:
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_schedule_erase
	testl	%eax, %eax
	je	LBB0_13
## %bb.16:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_spin_lock
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_wl_tree_add
LBB0_17:
	movq	%r14, %rdi
	callq	_spin_unlock
	jmp	LBB0_18
LBB0_13:
	xorl	%r15d, %r15d
LBB0_18:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	24(%r12), %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_in_wl_tree
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_paranoid_check_in_wl_tree
	leaq	4(%r13), %rdi
	movq	%r15, %rsi
	callq	_rb_erase
	movq	8(%r12), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, 8(%r12)
	xorl	%edi, %edi
	testq	%rax, %rax
	setg	%dil
	callq	_ubi_assert
	movl	$1, %ebx
	jmp	LBB0_12
LBB0_14:
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_prot_queue_del
	testl	%eax, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_12
## %bb.15:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_ubi_err
	movq	%r12, %rdi
	callq	_ubi_ro_mode
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PEB %d"

L_.str.1:                               ## @.str.1
	.asciz	"PEB %d is being moved, wait"

L_.str.2:                               ## @.str.2
	.asciz	"PEB %d is the target of data moving"

L_.str.3:                               ## @.str.3
	.asciz	"PEB %d not found"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_wl_put_peb                 ; -- Begin function ubi_wl_put_peb
	.p2align	2
_ubi_wl_put_peb:                        ; @ubi_wl_put_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	x21, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_wl
	mvn	w8, w23
	lsr	w0, w8, #31
	bl	_ubi_assert
	ldr	w8, [x20]
	cmp	w8, w23
	cset	w0, gt
	bl	_ubi_assert
	add	x19, x20, #16
	mov	x0, x19
	bl	_spin_lock
	ldp	x9, x8, [x20, #48]
	ldr	x22, [x8, w23, sxtw #3]
	cmp	x22, x9
	b.ne	LBB0_3
; %bb.1:
	sxtw	x26, w23
	add	x24, x20, #40
Lloh2:
	adrp	x25, l_.str.1@PAGE
Lloh3:
	add	x25, x25, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x23
	bl	_dbg_wl
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x24
	bl	_mutex_lock
	mov	x0, x24
	bl	_mutex_unlock
	mov	x0, x19
	bl	_spin_lock
	ldp	x9, x8, [x20, #48]
	ldr	x22, [x8, x26, lsl #3]
	cmp	x22, x9
	b.eq	LBB0_2
LBB0_3:
	ldr	x8, [x20, #32]
	cmp	x22, x8
	b.eq	LBB0_6
; %bb.4:
	add	x24, x20, #20
	mov	x0, x22
	mov	x1, x24
	bl	_in_wl_tree
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x22
	mov	x1, x24
	bl	_paranoid_check_in_wl_tree
	add	x0, x22, #4
	mov	x1, x24
	b	LBB0_9
LBB0_6:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_dbg_wl
	ldr	w8, [x20, #4]
	cmp	w8, #0
	cset	w0, eq
	bl	_ubi_assert
	mov	w25, #0
	mov	w8, #1
	str	w8, [x20, #4]
	b	LBB0_12
LBB0_7:
	add	x25, x20, #28
	mov	x0, x22
	mov	x1, x25
	bl	_in_wl_tree
	cbz	x0, LBB0_14
; %bb.8:
	mov	x0, x22
	mov	x1, x25
	bl	_paranoid_check_in_wl_tree
	add	x0, x22, #4
	mov	x1, x25
LBB0_9:
	bl	_rb_erase
LBB0_10:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_schedule_erase
	mov	x25, x0
	cbz	w0, LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_spin_lock
	mov	x0, x22
	mov	x1, x24
	bl	_wl_tree_add
LBB0_12:
	mov	x0, x19
	bl	_spin_unlock
LBB0_13:
	mov	x0, x25
	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_14:
	add	x25, x20, #24
	mov	x0, x22
	mov	x1, x25
	bl	_in_wl_tree
	cbz	x0, LBB0_16
; %bb.15:
	mov	x0, x22
	mov	x1, x25
	bl	_paranoid_check_in_wl_tree
	add	x0, x22, #4
	mov	x1, x25
	bl	_rb_erase
	ldr	x8, [x20, #8]
	sub	x9, x8, #1
	str	x9, [x20, #8]
	cmp	x8, #0
	cset	w0, gt
	bl	_ubi_assert
	mov	w21, #1
	b	LBB0_10
LBB0_16:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_prot_queue_del
	cbz	w0, LBB0_10
; %bb.17:
	mov	x25, x0
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x23
	bl	_ubi_err
	mov	x0, x20
	bl	_ubi_ro_mode
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PEB %d"

l_.str.1:                               ; @.str.1
	.asciz	"PEB %d is being moved, wait"

l_.str.2:                               ; @.str.2
	.asciz	"PEB %d is the target of data moving"

l_.str.3:                               ; @.str.3
	.asciz	"PEB %d not found"

.subsections_via_symbols
