	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thr_suspender
_thr_suspender:                         ## @thr_suspender
	.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	%rdi, %rbx
	movq	_QUIT@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	_hz@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$1, %ecx
	je	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %esi
	movq	%rbx, %rdi
	callq	_kthread_suspend
	movl	(%r14), %ecx
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%ecx, %ecx
	jne	LBB0_1
## %bb.4:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_panic
LBB0_7:
	movq	_test_global_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	_test_thrcnt@GOTPCREL(%rip), %rax
	decl	(%rax)
	movq	_global_condvar@GOTPCREL(%rip), %rdi
	callq	_wakeup
	movq	%rbx, %rdi
	callq	_mtx_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kthread_exit                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_QUIT,4,2                       ## @QUIT
	.comm	_hz,4,2                         ## @hz
	.comm	_EWOULDBLOCK,4,2                ## @EWOULDBLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ooops: kthread deadlock\n"

L_.str.1:                               ## @.str.1
	.asciz	"kthread_suspend error: %d\n"

	.comm	_test_global_lock,4,2           ## @test_global_lock
	.comm	_test_thrcnt,4,2                ## @test_thrcnt
	.comm	_global_condvar,4,2             ## @global_condvar
	.no_dead_strip	_thr_suspender
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thr_suspender
_thr_suspender:                         ; @thr_suspender
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
Lloh0:
	adrp	x20, _QUIT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _QUIT@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x21, _hz@GOTPAGE
Lloh3:
	ldr	x21, [x21, _hz@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #1
	b.eq	LBB0_7
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x21]
	add	w8, w8, w8, lsl #2
	lsl	w1, w8, #1
	mov	x0, x19
	bl	_kthread_suspend
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x20]
	cmp	w0, #0
	ccmp	w8, #0, #0, ne
	b.ne	LBB0_1
; %bb.3:
Lloh4:
	adrp	x8, _EWOULDBLOCK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EWOULDBLOCK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
	str	x0, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_panic
LBB0_7:
Lloh11:
	adrp	x19, _test_global_lock@GOTPAGE
Lloh12:
	ldr	x19, [x19, _test_global_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_mtx_lock
Lloh13:
	adrp	x8, _test_thrcnt@GOTPAGE
Lloh14:
	ldr	x8, [x8, _test_thrcnt@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
Lloh15:
	adrp	x0, _global_condvar@GOTPAGE
Lloh16:
	ldr	x0, [x0, _global_condvar@GOTPAGEOFF]
	bl	_wakeup
	mov	x0, x19
	bl	_mtx_unlock
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_kthread_exit
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_QUIT,4,2                       ; @QUIT
	.comm	_hz,4,2                         ; @hz
	.comm	_EWOULDBLOCK,4,2                ; @EWOULDBLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ooops: kthread deadlock\n"

l_.str.1:                               ; @.str.1
	.asciz	"kthread_suspend error: %d\n"

	.comm	_test_global_lock,4,2           ; @test_global_lock
	.comm	_test_thrcnt,4,2                ; @test_thrcnt
	.comm	_global_condvar,4,2             ; @global_condvar
	.no_dead_strip	_thr_suspender
.subsections_via_symbols
