	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___sigev_alloc                  ## -- Begin function __sigev_alloc
	.p2align	4, 0x90
___sigev_alloc:                         ## @__sigev_alloc
	.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
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rsi, %r12
	movl	%edi, %r13d
	movl	$1, %edi
	movl	$32, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movl	12(%r12), %eax
	movl	%eax, 24(%rbx)
	movl	8(%r12), %eax
	movl	%eax, 20(%rbx)
	movq	_memory_order_relaxed@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_sigev_generation@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_atomic_fetch_add_explicit
	movl	%eax, 16(%rbx)
	movl	%r13d, (%rbx)
	movq	%rbx, %r13
	addq	$4, %r13
	movq	%r13, %rdi
	callq	__pthread_attr_init
	movq	_PTHREAD_CREATE_DETACHED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	__pthread_attr_setdetachstate
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movq	%r13, %rsi
	callq	_attrcopy
LBB0_3:
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	___sigev_list_lock
	movq	8(%r14), %rax
	incl	(%rax)
	xorl	%eax, %eax
	callq	___sigev_list_unlock
	movq	8(%r14), %rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_8
LBB0_5:
	movl	%r15d, %edi
	callq	_sigev_thread_create
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	%r13, %rdi
	callq	__pthread_attr_destroy
	movq	%rbx, %rdi
	callq	_free
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sigev_generation,4,2           ## @sigev_generation
	.comm	_memory_order_relaxed,4,2       ## @memory_order_relaxed
	.comm	_PTHREAD_CREATE_DETACHED,4,2    ## @PTHREAD_CREATE_DETACHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___sigev_alloc                  ; -- Begin function __sigev_alloc
	.p2align	2
___sigev_alloc:                         ; @__sigev_alloc
	.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
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	mov	w0, #1
	mov	w1, #32
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	ldr	d0, [x22, #8]
	stur	d0, [x19, #20]
Lloh0:
	adrp	x8, _memory_order_relaxed@GOTPAGE
Lloh1:
	ldr	x8, [x8, _memory_order_relaxed@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x0, _sigev_generation@GOTPAGE
Lloh4:
	ldr	x0, [x0, _sigev_generation@GOTPAGEOFF]
	mov	w1, #1
	bl	_atomic_fetch_add_explicit
	str	w0, [x19, #16]
	str	w23, [x19]
	add	x23, x19, #4
	mov	x0, x23
	bl	__pthread_attr_init
Lloh5:
	adrp	x8, _PTHREAD_CREATE_DETACHED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PTHREAD_CREATE_DETACHED@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x23
	bl	__pthread_attr_setdetachstate
	ldr	x0, [x22]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, x23
	bl	_attrcopy
LBB0_3:
	cbz	x20, LBB0_5
; %bb.4:
	bl	___sigev_list_lock
	ldr	x8, [x20, #8]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	bl	___sigev_list_unlock
	ldr	x8, [x20, #8]
	str	x8, [x19, #8]
	b	LBB0_7
LBB0_5:
	mov	x0, x21
	bl	_sigev_thread_create
	str	x0, [x19, #8]
	cbnz	x0, LBB0_7
; %bb.6:
	mov	x0, x23
	bl	__pthread_attr_destroy
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_sigev_generation,4,2           ; @sigev_generation
	.comm	_memory_order_relaxed,4,2       ; @memory_order_relaxed
	.comm	_PTHREAD_CREATE_DETACHED,4,2    ; @PTHREAD_CREATE_DETACHED
.subsections_via_symbols
