	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_attr_getaffinity_np   ## -- Begin function _pthread_attr_getaffinity_np
	.p2align	4, 0x90
__pthread_attr_getaffinity_np:          ## @_pthread_attr_getaffinity_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	%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
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.3:
	movq	%rdx, %r14
	movq	%rsi, %r12
	xorl	%eax, %eax
	callq	__get_kern_cpuset_size
	cmpq	%r12, %rax
	jbe	LBB0_4
## %bb.9:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rax, %r15
	movq	8(%rbx), %r13
	testq	%r13, %r13
	je	LBB0_6
## %bb.5:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_MIN
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_memcpy
	jmp	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	movl	$-1, %esi
	movq	%r15, %rdx
	callq	_memset
LBB0_7:
	xorl	%ebx, %ebx
	cmpq	%r12, %r15
	jae	LBB0_11
## %bb.8:
	addq	%r15, %r14
	subq	%r15, %r12
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r12, %rdx
	callq	_memset
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ERANGE,4,2                     ## @ERANGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_attr_getaffinity_np   ; -- Begin function _pthread_attr_getaffinity_np
	.p2align	2
__pthread_attr_getaffinity_np:          ; @_pthread_attr_getaffinity_np
	.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
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x23, [x0]
	cbz	x23, LBB0_4
; %bb.2:
	mov	x20, x2
	mov	x19, x1
	bl	__get_kern_cpuset_size
	cmp	x0, x19
	b.ls	LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
LBB0_6:
	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_7:
	mov	x21, x0
	ldr	x22, [x23, #8]
	cbz	x22, LBB0_10
; %bb.8:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_MIN
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_memcpy
	cmp	x21, x19
	b.hs	LBB0_11
LBB0_9:
	add	x0, x20, x21
	sub	x2, x19, x21
	mov	w1, #0
	bl	_memset
	mov	w0, #0
	b	LBB0_6
LBB0_10:
	mov	x0, x20
	mov	w1, #-1
	mov	x2, x21
	bl	_memset
	cmp	x21, x19
	b.lo	LBB0_9
LBB0_11:
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ERANGE,4,2                     ; @ERANGE
.subsections_via_symbols
