	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_SetThreadPriority          ## -- Begin function SDL_SetThreadPriority
	.p2align	4, 0x90
_SDL_SetThreadPriority:                 ## @SDL_SetThreadPriority
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_pthread_self
	movl	%eax, %r14d
	leaq	-28(%rbp), %rsi
	leaq	-24(%rbp), %rdx
	movl	%eax, %edi
	callq	_pthread_getschedparam
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_SDL_THREAD_PRIORITY_LOW@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_4
## %bb.3:
	movl	-28(%rbp), %edi
	callq	_sched_get_priority_min
	movl	%eax, -24(%rbp)
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_9
LBB0_4:
	movq	_SDL_THREAD_PRIORITY_HIGH@GOTPCREL(%rip), %rax
	movl	-28(%rbp), %edi
	cmpq	%rbx, (%rax)
	jne	LBB0_6
## %bb.5:
	callq	_sched_get_priority_max
	movl	%eax, -24(%rbp)
	jmp	LBB0_7
LBB0_6:
	callq	_sched_get_priority_min
	movq	%rax, %rbx
	movl	-28(%rbp), %edi
	callq	_sched_get_priority_max
	subl	%ebx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	addl	%ebx, %ecx
	movl	%ecx, -24(%rbp)
LBB0_7:
	movl	-28(%rbp), %esi
	leaq	-24(%rbp), %rdx
	movl	%r14d, %edi
	callq	_pthread_setschedparam
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_10
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
LBB0_9:
	callq	_ALOGE
	movl	$-1, %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pthread_getschedparam() failed"

	.comm	_SDL_THREAD_PRIORITY_LOW,8,3    ## @SDL_THREAD_PRIORITY_LOW
	.comm	_SDL_THREAD_PRIORITY_HIGH,8,3   ## @SDL_THREAD_PRIORITY_HIGH
L_.str.1:                               ## @.str.1
	.asciz	"pthread_setschedparam() failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_SetThreadPriority          ; -- Begin function SDL_SetThreadPriority
	.p2align	2
_SDL_SetThreadPriority:                 ; @SDL_SetThreadPriority
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_pthread_self
	mov	x19, x0
	add	x1, sp, #4
	add	x2, sp, #8
	bl	_pthread_getschedparam
	tbnz	x0, #63, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _SDL_THREAD_PRIORITY_LOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDL_THREAD_PRIORITY_LOW@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [sp, #4]
	bl	_sched_get_priority_min
	str	w0, [sp, #8]
	b	LBB0_7
LBB0_3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_4:
Lloh5:
	adrp	x8, _SDL_THREAD_PRIORITY_HIGH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SDL_THREAD_PRIORITY_HIGH@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w0, [sp, #4]
	cmp	x8, x20
	b.ne	LBB0_6
; %bb.5:
	bl	_sched_get_priority_max
	str	w0, [sp, #8]
	b	LBB0_7
LBB0_6:
	bl	_sched_get_priority_min
	mov	x20, x0
	ldr	w0, [sp, #4]
	bl	_sched_get_priority_max
	sub	w8, w0, w20
	cmp	w8, #0
	cinc	w8, w8, lt
	add	w8, w20, w8, asr #1
	str	w8, [sp, #8]
LBB0_7:
	ldr	w1, [sp, #4]
	add	x2, sp, #8
	mov	x0, x19
	bl	_pthread_setschedparam
	tbnz	x0, #63, LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	bl	_ALOGE
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pthread_getschedparam() failed"

	.comm	_SDL_THREAD_PRIORITY_LOW,8,3    ; @SDL_THREAD_PRIORITY_LOW
	.comm	_SDL_THREAD_PRIORITY_HIGH,8,3   ; @SDL_THREAD_PRIORITY_HIGH
l_.str.1:                               ; @.str.1
	.asciz	"pthread_setschedparam() failed"

.subsections_via_symbols
