	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atexit_register
_atexit_register:                       ## @atexit_register
	.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
	movq	%rdi, %rbx
	movq	_atexit_mutex@GOTPCREL(%rip), %rdi
	callq	__MUTEX_LOCK
	movq	___atexit@GOTPCREL(%rip), %r12
	movq	(%r12), %r13
	testq	%r13, %r13
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_11
## %bb.1:
	movq	(%r13), %rax
	movq	_ATEXIT_SIZE@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jl	LBB0_9
## %bb.2:
	movq	_atexit_mutex@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, (%rbx)
	movq	%r13, 16(%rbx)
	movq	%rbx, (%r12)
	xorl	%eax, %eax
	movq	%rbx, %r13
	cmpq	(%r14), %rax
	jl	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	__MUTEX_UNLOCK
	movl	$24, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	__MUTEX_LOCK
	cmpq	(%r12), %r13
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	__MUTEX_UNLOCK
	movq	%rbx, %rdi
	callq	_free
	movq	%r15, %rdi
	callq	__MUTEX_LOCK
	movq	(%r12), %r13
	movq	(%r13), %rax
	cmpq	(%r14), %rax
	jge	LBB0_3
	jmp	LBB0_9
LBB0_11:
	leaq	_atexit_register.__atexit0(%rip), %r13
	movq	%r13, (%r12)
	movq	_atexit_register.__atexit0(%rip), %rax
LBB0_9:
	movq	8(%r13), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%r13)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %edx
	movl	%edx, (%rcx,%rax,4)
	movq	_atexit_mutex@GOTPCREL(%rip), %rdi
	callq	__MUTEX_UNLOCK
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$-1, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_atexit_register.__atexit0,24,3 ## @atexit_register.__atexit0
	.comm	_atexit_mutex,4,2               ## @atexit_mutex
	.comm	___atexit,8,3                   ## @__atexit
	.comm	_ATEXIT_SIZE,8,3                ## @ATEXIT_SIZE
	.no_dead_strip	_atexit_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atexit_register
_atexit_register:                       ; @atexit_register
	.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	x19, x0
Lloh0:
	adrp	x0, _atexit_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _atexit_mutex@GOTPAGEOFF]
	bl	__MUTEX_LOCK
Lloh2:
	adrp	x22, ___atexit@GOTPAGE
Lloh3:
	ldr	x22, [x22, ___atexit@GOTPAGEOFF]
	ldr	x23, [x22]
	cbz	x23, LBB0_8
; %bb.1:
	ldr	x8, [x23]
Lloh4:
	adrp	x24, _ATEXIT_SIZE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _ATEXIT_SIZE@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.lt	LBB0_9
; %bb.2:
Lloh6:
	adrp	x20, _atexit_mutex@GOTPAGE
Lloh7:
	ldr	x20, [x20, _atexit_mutex@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, #0
	str	xzr, [x21]
	str	x23, [x21, #16]
	mov	x23, x21
	str	x21, [x22]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x24]
	cmp	x8, x9
	b.lt	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	__MUTEX_UNLOCK
	mov	w0, #24
	bl	_malloc
	cbz	x0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, x0
	mov	x0, x20
	bl	__MUTEX_LOCK
	ldr	x8, [x22]
	cmp	x23, x8
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	__MUTEX_UNLOCK
	mov	x0, x21
	bl	_free
	mov	x0, x20
	bl	__MUTEX_LOCK
	ldr	x23, [x22]
	ldr	x8, [x23]
	b	LBB0_4
LBB0_8:
Lloh8:
	adrp	x23, _atexit_register.__atexit0@PAGE
Lloh9:
	add	x23, x23, _atexit_register.__atexit0@PAGEOFF
	str	x23, [x22]
	ldr	x8, [x23]
LBB0_9:
	ldr	x9, [x23, #8]
	add	x10, x8, #1
	str	x10, [x23]
	ldr	w10, [x19]
	str	w10, [x9, x8, lsl #2]
Lloh10:
	adrp	x0, _atexit_mutex@GOTPAGE
Lloh11:
	ldr	x0, [x0, _atexit_mutex@GOTPAGEOFF]
	bl	__MUTEX_UNLOCK
	mov	w0, #0
LBB0_10:
	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_11:
	mov	w0, #-1
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_atexit_register.__atexit0,24,3 ; @atexit_register.__atexit0
	.comm	_atexit_mutex,4,2               ; @atexit_mutex
	.comm	___atexit,8,3                   ; @__atexit
	.comm	_ATEXIT_SIZE,8,3                ; @ATEXIT_SIZE
	.no_dead_strip	_atexit_register
.subsections_via_symbols
