	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_attr_setaffinity_np   ## -- Begin function _pthread_attr_setaffinity_np
	.p2align	4, 0x90
__pthread_attr_setaffinity_np:          ## @_pthread_attr_setaffinity_np
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_16
## %bb.2:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.3:
	movq	%rdx, %r15
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.4:
	xorl	%eax, %eax
	callq	__get_kern_cpuset_size
	cmpq	%rbx, %rax
	jbe	LBB0_8
## %bb.5:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_6:
	movq	8(%r12), %rdi
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.7:
	callq	_free
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	jmp	LBB0_18
LBB0_8:
	movq	%rax, %r14
	jae	LBB0_12
## %bb.9:
	movq	%r14, %rax
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$0, (%r15,%rax)
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%rax
	cmpq	%rax, %rbx
	jne	LBB0_10
LBB0_12:
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	jne	LBB0_15
## %bb.13:
	movl	$1, %edi
	movq	%r14, %rsi
	callq	_calloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:
	movq	%rax, %rdi
	movq	%r14, (%r12)
LBB0_15:
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ERANGE,4,2                     ## @ERANGE
	.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_attr_setaffinity_np   ; -- Begin function _pthread_attr_setaffinity_np
	.p2align	2
__pthread_attr_setaffinity_np:          ; @_pthread_attr_setaffinity_np
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	x0, LBB0_16
; %bb.1:
	ldr	x22, [x0]
	cbz	x22, LBB0_16
; %bb.2:
	mov	x21, x1
	cbz	x1, LBB0_6
; %bb.3:
	mov	x19, x2
	cbz	x2, LBB0_6
; %bb.4:
	bl	__get_kern_cpuset_size
	cmp	x0, x21
	b.ls	LBB0_8
; %bb.5:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_17
LBB0_6:
	ldr	x0, [x22, #8]
	cbz	x0, LBB0_18
; %bb.7:
	bl	_free
	mov	w0, #0
	stp	xzr, xzr, [x22]
	b	LBB0_18
LBB0_8:
	mov	x20, x0
	b.hs	LBB0_12
; %bb.9:
	sub	x8, x21, x20
	add	x9, x19, x20
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x9]
	cbnz	w10, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x9, x9, #1
	subs	x8, x8, #1
	b.ne	LBB0_10
LBB0_12:
	ldr	x0, [x22, #8]
	cbnz	x0, LBB0_15
; %bb.13:
	mov	w0, #1
	mov	x1, x20
	bl	_calloc
	str	x0, [x22, #8]
	cbz	x0, LBB0_19
; %bb.14:
	str	x20, [x22]
LBB0_15:
	mov	x1, x19
	mov	x2, x20
	bl	_memcpy
	mov	w0, #0
	b	LBB0_18
LBB0_16:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_19:
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
