	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_new                    ## -- Begin function context_new
	.p2align	4, 0x90
_context_new:                           ## @context_new
	.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
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %r12
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$72, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movq	%r14, %rdi
	callq	_lock_basic_lock
	leaq	64(%rbx), %r13
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_find_id
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_lock_basic_unlock
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.2:
	movq	16(%rbp), %rax
	movq	%r13, 16(%rbx)
	xorl	%ecx, %ecx
	movq	%r12, %rdx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	orq	%rsi, %rdx
	setne	%cl
	movl	%ecx, (%rbx)
	movq	%r12, 56(%rbx)
	movq	%rsi, 48(%rbx)
	movq	%rax, 40(%rbx)
	movl	$1, %edi
	movl	$72, %esi
	callq	_calloc
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_strdup
	movq	24(%rbx), %rdi
	movl	%eax, 32(%rdi)
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	movq	%rbx, %r15
	addq	$16, %r15
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rdi)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rdi)
	movq	%r14, %rdi
	callq	_lock_basic_lock
	cmpl	$0, (%rbx)
	je	LBB0_6
## %bb.5:
	incl	8(%r14)
LBB0_6:
	leaq	4(%r14), %rdi
	movq	%r15, %rsi
	callq	_rbtree_insert
	movq	%r14, %rdi
	callq	_lock_basic_unlock
	jmp	LBB0_11
LBB0_8:
	callq	_free
LBB0_9:
	movq	%rbx, %rdi
	callq	_free
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_new                    ; -- Begin function context_new
	.p2align	2
_context_new:                           ; @context_new
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x6
	mov	x26, x5
	mov	x27, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	mov	w0, #1
	mov	w1, #72
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.1:
	mov	x0, x20
	bl	_lock_basic_lock
	add	x28, x19, #64
	mov	x0, x20
	mov	x1, x28
	bl	_find_id
	mov	x24, x0
	mov	x0, x20
	bl	_lock_basic_unlock
	cbz	w24, LBB0_8
; %bb.2:
	mov	x24, x19
	str	x28, [x24, #16]!
	orr	x8, x27, x26
	cmp	x8, #0
	cset	w8, ne
	str	w8, [x19]
	stp	x26, x27, [x19, #48]
	str	x25, [x19, #40]
	mov	w0, #1
	mov	w1, #72
	bl	_calloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_8
; %bb.3:
	mov	x0, x23
	bl	_strdup
	mov	x8, x0
	ldr	x0, [x19, #24]
	str	w8, [x0, #32]
	cbz	w8, LBB0_7
; %bb.4:
	stp	w22, w21, [x0, #4]
	mov	x0, x20
	bl	_lock_basic_lock
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.5:
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
LBB0_6:
	add	x0, x20, #4
	mov	x1, x24
	bl	_rbtree_insert
	mov	x0, x20
	bl	_lock_basic_unlock
	b	LBB0_9
LBB0_7:
	bl	_free
LBB0_8:
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
