	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_thread                     ## -- Begin function ubi_thread
	.p2align	4, 0x90
_ubi_thread:                            ## @ubi_thread
	.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
	movq	%rdi, %r14
	movl	(%rdi), %ebx
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_task_pid_nr
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ubi_msg
	xorl	%eax, %eax
	callq	_set_freezable
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	je	LBB0_1
LBB0_14:
	movl	(%r14), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_dbg_wl
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	16(%r14), %rbx
	leaq	32(%r14), %r15
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %edi
	callq	_set_current_state
	movq	%rbx, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	callq	_schedule
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	jne	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_try_to_freeze
	testq	%rax, %rax
	jne	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	%r15, %rdi
	callq	_list_empty
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 24(%r14)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 8(%r14)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%r14, %rdi
	callq	_do_work
	testl	%eax, %eax
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %edx
	callq	_ubi_err
	movq	%r12, %rcx
	incl	%r12d
	movq	_WL_MAX_FAILURES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%edx, %ecx
	jle	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_ubi_msg
	movq	%r14, %rdi
	callq	_ubi_ro_mode
	movq	$0, 8(%r14)
	jmp	LBB0_12
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_cond_resched
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $r12d killed $r12d def $r12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"background thread \"%s\" started, PID %d"

	.comm	_current,4,2                    ## @current
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
L_.str.1:                               ## @.str.1
	.asciz	"%s: work failed with error code %d"

	.comm	_WL_MAX_FAILURES,4,2            ## @WL_MAX_FAILURES
L_.str.2:                               ## @.str.2
	.asciz	"%s: %d consecutive failures"

L_.str.3:                               ## @.str.3
	.asciz	"background thread \"%s\" is killed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_thread                     ; -- Begin function ubi_thread
	.p2align	2
_ubi_thread:                            ; @ubi_thread
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w20, [x0]
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_task_pid_nr
	mov	x2, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_ubi_msg
	bl	_set_freezable
	bl	_kthread_should_stop
	cbz	x0, LBB0_2
LBB0_1:
	ldr	w1, [x19]
Lloh5:
	adrp	x0, l_.str.3@PAGE
Lloh6:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dbg_wl
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	w26, #0
	add	x20, x19, #16
	add	x21, x19, #32
Lloh7:
	adrp	x22, l_.str.1@PAGE
Lloh8:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh9:
	adrp	x24, _WL_MAX_FAILURES@GOTPAGE
Lloh10:
	ldr	x24, [x24, _WL_MAX_FAILURES@GOTPAGEOFF]
Lloh11:
	adrp	x25, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh12:
	ldr	x25, [x25, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh13:
	adrp	x23, l_.str.2@PAGE
Lloh14:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x25]
	bl	_set_current_state
	mov	x0, x20
	bl	_spin_unlock
	bl	_schedule
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_kthread_should_stop
	cbnz	x0, LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	bl	_try_to_freeze
	cbnz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_spin_lock
	mov	x0, x21
	bl	_list_empty
	cbnz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x19
	bl	_do_work
	cbz	w0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x2, x0
	ldr	w1, [x19]
	mov	x0, x22
	bl	_ubi_err
	add	w27, w26, #1
	ldr	w2, [x24]
	cmp	w26, w2
	b.le	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x19]
	mov	x0, x23
	bl	_ubi_msg
	mov	x0, x19
	bl	_ubi_ro_mode
	str	xzr, [x19, #8]
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w27, #0
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_cond_resched
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, x27
	b	LBB0_4
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"background thread \"%s\" started, PID %d"

	.comm	_current,4,2                    ; @current
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
l_.str.1:                               ; @.str.1
	.asciz	"%s: work failed with error code %d"

	.comm	_WL_MAX_FAILURES,4,2            ; @WL_MAX_FAILURES
l_.str.2:                               ; @.str.2
	.asciz	"%s: %d consecutive failures"

l_.str.3:                               ; @.str.3
	.asciz	"background thread \"%s\" is killed"

.subsections_via_symbols
