	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setaffinity
_setaffinity:                           ## @setaffinity
	.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
	cmpl	$-1, %edi
	je	LBB0_7
## %bb.1:
	movl	%edi, %ebx
	leaq	-28(%rbp), %r14
	movq	%r14, %rdi
	callq	_CPU_ZERO
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_CPU_SET
	xorl	%eax, %eax
	callq	_pthread_self
	movl	%eax, %edi
	movl	$4, %esi
	movq	%r14, %rdx
	callq	_pthread_setaffinity_np
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_WWW
LBB0_3:
	movq	_PRIO_PROCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movl	$-10, %edx
	callq	_setpriority
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_WWW
LBB0_5:
	movl	$10, -24(%rbp)
	movq	_SCHED_RR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	xorl	%edi, %edi
	callq	_sched_setscheduler
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_WWW
LBB0_7:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to set affinity: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_PRIO_PROCESS,4,2               ## @PRIO_PROCESS
L_.str.1:                               ## @.str.1
	.asciz	"Unable to set priority: %s"

	.comm	_SCHED_RR,4,2                   ## @SCHED_RR
L_.str.2:                               ## @.str.2
	.asciz	"Unable to set scheduler: %s"

	.no_dead_strip	_setaffinity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setaffinity
_setaffinity:                           ; @setaffinity
	.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
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.1:
	mov	x19, x0
	add	x0, sp, #12
	bl	_CPU_ZERO
	add	x1, sp, #12
	mov	x0, x19
	bl	_CPU_SET
	bl	_pthread_self
	add	x2, sp, #12
	mov	w1, #4
	bl	_pthread_setaffinity_np
Lloh0:
	adrp	x19, _errno@GOTPAGE
Lloh1:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x19]
	bl	_strerror
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WWW
LBB0_3:
Lloh4:
	adrp	x8, _PRIO_PROCESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PRIO_PROCESS@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #-10
	bl	_setpriority
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x19]
	bl	_strerror
	mov	x1, x0
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WWW
LBB0_5:
	mov	w8, #10
	str	w8, [sp, #8]
Lloh9:
	adrp	x8, _SCHED_RR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SCHED_RR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w0, #0
	bl	_sched_setscheduler
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x19]
	bl	_strerror
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_WWW
LBB0_7:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to set affinity: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_PRIO_PROCESS,4,2               ; @PRIO_PROCESS
l_.str.1:                               ; @.str.1
	.asciz	"Unable to set priority: %s"

	.comm	_SCHED_RR,4,2                   ; @SCHED_RR
l_.str.2:                               ; @.str.2
	.asciz	"Unable to set scheduler: %s"

	.no_dead_strip	_setaffinity
.subsections_via_symbols
