	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ubt_task_schedule
_ubt_task_schedule:                     ## @ubt_task_schedule
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	addq	$8, %rdi
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mtx_assert
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	movq	_UBT_FLAG_T_STOP_ALL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.4:
	movq	_UBT_FLAG_T_START_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%r14), %eax
	jmp	LBB0_5
LBB0_1:
	movl	(%r14), %eax
	jmp	LBB0_6
LBB0_3:
	movl	(%r14), %eax
LBB0_5:
	orl	%ebx, %eax
	movl	%eax, (%r14)
LBB0_6:
	movq	_UBT_FLAG_T_PENDING@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	jne	LBB0_9
## %bb.7:
	movq	_taskqueue_swi@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r14), %rsi
	callq	_taskqueue_enqueue
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movl	(%rbx), %eax
	orl	%eax, (%r14)
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_UBT_FLAG_T_STOP_ALL,4,2        ## @UBT_FLAG_T_STOP_ALL
	.comm	_UBT_FLAG_T_START_ALL,4,2       ## @UBT_FLAG_T_START_ALL
	.comm	_UBT_FLAG_T_PENDING,4,2         ## @UBT_FLAG_T_PENDING
	.comm	_taskqueue_swi,4,2              ## @taskqueue_swi
	.no_dead_strip	_ubt_task_schedule
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ubt_task_schedule
_ubt_task_schedule:                     ; @ubt_task_schedule
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	add	x0, x0, #8
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mtx_assert
	cbz	w20, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _UBT_FLAG_T_STOP_ALL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UBT_FLAG_T_STOP_ALL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _UBT_FLAG_T_START_ALL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UBT_FLAG_T_START_ALL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	b	LBB0_5
LBB0_3:
	ldr	w8, [x19]
	b	LBB0_6
LBB0_4:
	ldr	w8, [x19]
LBB0_5:
	orr	w8, w8, w20
	str	w8, [x19]
LBB0_6:
Lloh9:
	adrp	x20, _UBT_FLAG_T_PENDING@GOTPAGE
Lloh10:
	ldr	x20, [x20, _UBT_FLAG_T_PENDING@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.7:
Lloh11:
	adrp	x8, _taskqueue_swi@GOTPAGE
Lloh12:
	ldr	x8, [x8, _taskqueue_swi@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_taskqueue_enqueue
	cbnz	x0, LBB0_9
; %bb.8:
	ldr	w8, [x20]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_UBT_FLAG_T_STOP_ALL,4,2        ; @UBT_FLAG_T_STOP_ALL
	.comm	_UBT_FLAG_T_START_ALL,4,2       ; @UBT_FLAG_T_START_ALL
	.comm	_UBT_FLAG_T_PENDING,4,2         ; @UBT_FLAG_T_PENDING
	.comm	_taskqueue_swi,4,2              ; @taskqueue_swi
	.no_dead_strip	_ubt_task_schedule
.subsections_via_symbols
