	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_setprio               ## -- Begin function _pthread_setprio
	.p2align	4, 0x90
__pthread_setprio:                      ## @_pthread_setprio
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r14
	movl	%r15d, -40(%rbp)
	cmpq	%r12, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	__thr_find_thread
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_3
LBB0_1:
	movq	%r12, %rdi
	callq	_THR_LOCK
LBB0_3:
	movq	(%r12), %rsi
	movq	_SCHED_OTHER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_5
## %bb.4:
	cmpl	%r15d, 8(%r12)
	jne	LBB0_6
LBB0_5:
	movl	%r15d, 8(%r12)
	xorl	%ebx, %ebx
LBB0_9:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_THR_THREAD_UNLOCK
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	16(%r12), %edi
	leaq	-40(%rbp), %rdx
	callq	__thr_setscheduler
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	movl	%r15d, 8(%r12)
	jmp	LBB0_9
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_SCHED_OTHER,8,3                ## @SCHED_OTHER
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_setprio               ; -- Begin function _pthread_setprio
	.p2align	2
__pthread_setprio:                      ; @_pthread_setprio
	.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	x21, x1
	mov	x19, x0
	bl	__get_curthread
	mov	x20, x0
	str	w21, [sp, #8]
	cmp	x0, x19
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	__thr_find_thread
	mov	x22, x0
	cbnz	w0, LBB0_8
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_THR_LOCK
LBB0_3:
	ldr	x1, [x19]
Lloh0:
	adrp	x8, _SCHED_OTHER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCHED_OTHER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x1, x8
	b.eq	LBB0_5
; %bb.4:
	ldr	w8, [x19, #8]
	cmp	w8, w21
	b.ne	LBB0_9
LBB0_5:
	mov	w22, #0
LBB0_6:
	str	w21, [x19, #8]
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	bl	_THR_THREAD_UNLOCK
LBB0_8:
	mov	x0, x22
	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
	ret
LBB0_9:
	ldr	w0, [x19, #16]
	add	x2, sp, #8
	bl	__thr_setscheduler
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.10:
	mov	x22, x0
	b	LBB0_6
LBB0_11:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SCHED_OTHER,8,3                ; @SCHED_OTHER
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
