	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_sched_getaffinity          ## -- Begin function sys_sched_getaffinity
	.p2align	4, 0x90
_sys_sched_getaffinity:                 ## @sys_sched_getaffinity
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_STRACE
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	_pids_lock@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_lock
	movq	%rbx, %rdi
	callq	_pid_get_task
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_unlock
	testq	%rbx, %rbx
	je	LBB0_2
LBB0_3:
	movq	__SC_NPROCESSORS_ONLN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sysconf
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	leal	(,%r15,8), %r13d
	cmpl	%r13d, %eax
	cmovbl	%eax, %r13d
	movl	%r15d, %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memset
	testl	%r13d, %r13d
	je	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_bit_set
	incl	%ebx
	cmpl	%ebx, %r13d
	jne	LBB0_9
LBB0_4:
	movl	%r14d, %edi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_user_write
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_2:
	movq	__ESRCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sched_getaffinity(%d, %d, %#x)"

	.comm	_pids_lock,4,2                  ## @pids_lock
	.comm	__ESRCH,4,2                     ## @_ESRCH
	.comm	__SC_NPROCESSORS_ONLN,4,2       ## @_SC_NPROCESSORS_ONLN
	.comm	__EFAULT,4,2                    ## @_EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_sched_getaffinity          ; -- Begin function sys_sched_getaffinity
	.p2align	2
_sys_sched_getaffinity:                 ; @sys_sched_getaffinity
	.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
	sub	sp, sp, #16
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	bl	_STRACE
	cbz	x21, LBB0_2
; %bb.1:
Lloh5:
	adrp	x22, _pids_lock@GOTPAGE
Lloh6:
	ldr	x22, [x22, _pids_lock@GOTPAGEOFF]
	mov	x0, x22
	bl	_lock
	mov	x0, x21
	bl	_pid_get_task
	mov	x21, x0
	mov	x0, x22
	bl	_unlock
	cbz	x21, LBB0_6
LBB0_2:
Lloh7:
	adrp	x8, __SC_NPROCESSORS_ONLN@GOTPAGE
Lloh8:
	ldr	x8, [x8, __SC_NPROCESSORS_ONLN@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_sysconf
	mov	x23, sp
	lsl	w8, w19, #3
	cmp	w0, w8
	csel	w24, w0, w8, lo
	mov	w8, w19
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x0, x21
	mov	w1, #0
	mov	x2, x19
	bl	_memset
	cbz	w24, LBB0_5
; %bb.3:
	mov	w22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_bit_set
	add	w22, w22, #1
	cmp	w24, w22
	b.ne	LBB0_4
LBB0_5:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_user_write
Lloh12:
	adrp	x8, __EFAULT@GOTPAGE
Lloh13:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, wzr, w8, eq
	mov	sp, x23
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, __ESRCH@GOTPAGE
Lloh16:
	ldr	x8, [x8, __ESRCH@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_7:
	ldur	x8, [x29, #-56]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	sub	sp, x29, #48
	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
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sched_getaffinity(%d, %d, %#x)"

	.comm	_pids_lock,4,2                  ; @pids_lock
	.comm	__ESRCH,4,2                     ; @_ESRCH
	.comm	__SC_NPROCESSORS_ONLN,4,2       ; @_SC_NPROCESSORS_ONLN
	.comm	__EFAULT,4,2                    ; @_EFAULT
.subsections_via_symbols
