	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_setschedparam         ## -- Begin function _pthread_setschedparam
	.p2align	4, 0x90
__pthread_setschedparam:                ## @_pthread_setschedparam
	.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	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r13
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r14
	cmpq	%r13, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	__thr_find_thread
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:
	cmpl	%r12d, (%r13)
	je	LBB0_4
	jmp	LBB0_8
LBB0_1:
	movq	%r13, %rdi
	callq	_THR_LOCK
	cmpl	%r12d, (%r13)
	jne	LBB0_8
LBB0_4:
	movq	_SCHED_OTHER@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	jmp	LBB0_7
LBB0_6:
	movq	8(%r13), %rax
	cmpq	(%r15), %rax
	jne	LBB0_8
LBB0_7:
	movq	%rax, 8(%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movl	16(%r13), %edi
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	__thr_setscheduler
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.10:
	movl	%eax, %ebx
	movl	%r12d, (%r13)
	movq	(%r15), %rax
	movq	%rax, 8(%r13)
	jmp	LBB0_11
LBB0_9:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_11:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_THR_THREAD_UNLOCK
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCHED_OTHER,4,2                ## @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_setschedparam         ; -- Begin function _pthread_setschedparam
	.p2align	2
__pthread_setschedparam:                ; @_pthread_setschedparam
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	__get_curthread
	mov	x20, x0
	cmp	x0, x19
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	__thr_find_thread
	mov	x23, x0
	cbnz	w0, LBB0_13
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_THR_LOCK
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, w22
	b.ne	LBB0_8
; %bb.4:
Lloh0:
	adrp	x8, _SCHED_OTHER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCHED_OTHER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x21]
	mov	w23, #0
	b	LBB0_10
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	w23, #0
	b	LBB0_10
LBB0_8:
	ldr	w0, [x19, #16]
	mov	x1, x22
	mov	x2, x21
	bl	__thr_setscheduler
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.9:
	mov	x23, x0
	str	w22, [x19]
	ldr	x8, [x21]
LBB0_10:
	str	x8, [x19, #8]
	b	LBB0_12
LBB0_11:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_THR_THREAD_UNLOCK
LBB0_13:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SCHED_OTHER,4,2                ; @SCHED_OTHER
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
