	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_start_async                    ## -- Begin function start_async
	.p2align	4, 0x90
_start_async:                           ## @start_async
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %r13d
	testl	%r13d, %r13d
	jns	LBB0_6
## %bb.1:
	leaq	-56(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_2
## %bb.5:
	movl	-52(%rbp), %eax
	movl	%eax, (%r14)
LBB0_6:
	movl	4(%r14), %r12d
	movl	%r12d, %eax
	testl	%r12d, %r12d
	js	LBB0_7
## %bb.12:
	testl	%r13d, %r13d
	js	LBB0_13
LBB0_14:
	movl	(%r14), %ecx
	xorl	%r15d, %r15d
	cmpl	$1, %ecx
	sbbl	%r15d, %r15d
	orl	%ecx, %r15d
	jmp	LBB0_15
LBB0_7:
	leaq	-64(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	js	LBB0_8
## %bb.11:
	movl	-64(%rbp), %eax
	movl	%eax, 4(%r14)
	testl	%r13d, %r13d
	jns	LBB0_14
LBB0_13:
	movl	-56(%rbp), %r15d
LBB0_15:
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	sbbl	%ebx, %ebx
	testl	%r12d, %r12d
	jns	LBB0_16
## %bb.17:
	movl	-60(%rbp), %ebx
	jmp	LBB0_18
LBB0_16:
	orl	%eax, %ebx
LBB0_18:
	movq	_main_thread_set@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_20
## %bb.19:
	movl	$1, (%rax)
	xorl	%eax, %eax
	callq	_pthread_self
	movq	_main_thread@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_async_key@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	callq	_pthread_key_create
	movq	_async_die_counter@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	callq	_pthread_key_create
	movq	_die_async@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_die_routine
	movq	_async_die_is_recursing@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_die_is_recursing_routine
LBB0_20:
	testl	%r15d, %r15d
	js	LBB0_22
## %bb.21:
	movl	%r15d, %edi
	callq	_set_cloexec
LBB0_22:
	testl	%ebx, %ebx
	js	LBB0_24
## %bb.23:
	movl	%ebx, %edi
	callq	_set_cloexec
LBB0_24:
	movl	%r15d, 16(%r14)
	movl	%ebx, 20(%r14)
	leaq	24(%r14), %rdi
	movq	_run_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movq	%r14, %rcx
	callq	_pthread_create
	testl	%eax, %eax
	je	LBB0_33
## %bb.25:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_strerror
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_error
	testl	%r13d, %r13d
	js	LBB0_26
## %bb.27:
	movl	(%r14), %edi
	testl	%edi, %edi
	je	LBB0_29
## %bb.28:
	callq	_close
LBB0_29:
	testl	%r12d, %r12d
	js	LBB0_30
LBB0_31:
	movl	4(%r14), %edi
	movl	$-1, %r15d
	testl	%edi, %edi
	je	LBB0_33
## %bb.32:
	callq	_close
	jmp	LBB0_33
LBB0_26:
	leaq	-56(%rbp), %rdi
	callq	_close_pair
	testl	%r12d, %r12d
	jns	LBB0_31
LBB0_30:
	leaq	-64(%rbp), %rdi
	callq	_close_pair
	movl	$-1, %r15d
	jmp	LBB0_33
LBB0_2:
	movl	4(%r14), %edi
	testl	%edi, %edi
	jg	LBB0_3
	jmp	LBB0_4
LBB0_8:
	testl	%r13d, %r13d
	js	LBB0_9
## %bb.10:
	movl	(%r14), %edi
	testl	%edi, %edi
	je	LBB0_4
LBB0_3:
	callq	_close
	jmp	LBB0_4
LBB0_9:
	leaq	-56(%rbp), %rdi
	callq	_close_pair
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_error_errno
	movl	%eax, %r15d
LBB0_33:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_35
## %bb.34:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot create pipe"

	.comm	_main_thread_set,4,2            ## @main_thread_set
	.comm	_main_thread,4,2                ## @main_thread
	.comm	_async_key,4,2                  ## @async_key
	.comm	_async_die_counter,4,2          ## @async_die_counter
	.comm	_die_async,4,2                  ## @die_async
	.comm	_async_die_is_recursing,4,2     ## @async_die_is_recursing
	.comm	_run_thread,4,2                 ## @run_thread
L_.str.1:                               ## @.str.1
	.asciz	"cannot create async thread: %s"

	.comm	_process_is_async,4,2           ## @process_is_async
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_start_async                    ; -- Begin function start_async
	.p2align	2
_start_async:                           ; @start_async
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w23, [x0]
	tbz	w23, #31, LBB0_3
; %bb.1:
	add	x0, sp, #16
	bl	_pipe
	tbnz	x0, #63, LBB0_25
; %bb.2:
	ldr	w8, [sp, #20]
	str	w8, [x19]
LBB0_3:
	ldr	w22, [x19, #4]
	mov	x8, x22
	tbnz	w22, #31, LBB0_6
; %bb.4:
	tbnz	w23, #31, LBB0_8
LBB0_5:
	ldr	w9, [x19]
	cmp	w9, #0
	csinv	w20, w9, wzr, ne
	b	LBB0_9
LBB0_6:
	add	x0, sp, #8
	bl	_pipe
	tbnz	x0, #63, LBB0_26
; %bb.7:
	ldr	w8, [sp, #8]
	str	w8, [x19, #4]
	tbz	w23, #31, LBB0_5
LBB0_8:
	ldr	w20, [sp, #16]
LBB0_9:
	ldr	w9, [sp, #12]
	cmp	w8, #0
	csinv	w8, w8, wzr, ne
	cmp	w22, #0
	csel	w21, w9, w8, lt
Lloh3:
	adrp	x8, _main_thread_set@GOTPAGE
Lloh4:
	ldr	x8, [x8, _main_thread_set@GOTPAGEOFF]
	ldr	w9, [x8]
	cbnz	w9, LBB0_11
; %bb.10:
	mov	w9, #1
	str	w9, [x8]
	bl	_pthread_self
Lloh5:
	adrp	x8, _main_thread@GOTPAGE
Lloh6:
	ldr	x8, [x8, _main_thread@GOTPAGEOFF]
Lloh7:
	str	w0, [x8]
Lloh8:
	adrp	x0, _async_key@GOTPAGE
Lloh9:
	ldr	x0, [x0, _async_key@GOTPAGEOFF]
	mov	x1, #0
	bl	_pthread_key_create
Lloh10:
	adrp	x0, _async_die_counter@GOTPAGE
Lloh11:
	ldr	x0, [x0, _async_die_counter@GOTPAGEOFF]
	mov	x1, #0
	bl	_pthread_key_create
Lloh12:
	adrp	x8, _die_async@GOTPAGE
Lloh13:
	ldr	x8, [x8, _die_async@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_set_die_routine
Lloh15:
	adrp	x8, _async_die_is_recursing@GOTPAGE
Lloh16:
	ldr	x8, [x8, _async_die_is_recursing@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_set_die_is_recursing_routine
LBB0_11:
	tbnz	w20, #31, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_set_cloexec
LBB0_13:
	tbnz	w21, #31, LBB0_15
; %bb.14:
	mov	x0, x21
	bl	_set_cloexec
LBB0_15:
	stp	w20, w21, [x19, #16]
	add	x0, x19, #24
Lloh18:
	adrp	x8, _run_thread@GOTPAGE
Lloh19:
	ldr	x8, [x8, _run_thread@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x1, #0
	mov	x3, x19
	bl	_pthread_create
	cbz	w0, LBB0_31
; %bb.16:
	mov	x20, x0
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	mov	x21, x0
	mov	x0, x20
	bl	_strerror
	mov	x1, x0
	mov	x0, x21
	bl	_error
	tbnz	w23, #31, LBB0_22
; %bb.17:
	ldr	w0, [x19]
	cbz	w0, LBB0_19
; %bb.18:
	bl	_close
LBB0_19:
	tbnz	w22, #31, LBB0_23
LBB0_20:
	ldr	w0, [x19, #4]
	cbz	w0, LBB0_24
; %bb.21:
	bl	_close
	b	LBB0_24
LBB0_22:
	add	x0, sp, #16
	bl	_close_pair
	tbz	w22, #31, LBB0_20
LBB0_23:
	add	x0, sp, #8
	bl	_close_pair
LBB0_24:
	mov	w0, #-1
	b	LBB0_31
LBB0_25:
	ldr	w0, [x19, #4]
	cmp	w0, #1
	b.ge	LBB0_28
	b	LBB0_30
LBB0_26:
	tbnz	w23, #31, LBB0_29
; %bb.27:
	ldr	w0, [x19]
	cbz	w0, LBB0_30
LBB0_28:
	bl	_close
	b	LBB0_30
LBB0_29:
	add	x0, sp, #16
	bl	_close_pair
LBB0_30:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error_errno
LBB0_31:
	ldr	x8, [sp, #24]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_33
; %bb.32:
	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
	add	sp, sp, #96
	ret
LBB0_33:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot create pipe"

	.comm	_main_thread_set,4,2            ; @main_thread_set
	.comm	_main_thread,4,2                ; @main_thread
	.comm	_async_key,4,2                  ; @async_key
	.comm	_async_die_counter,4,2          ; @async_die_counter
	.comm	_die_async,4,2                  ; @die_async
	.comm	_async_die_is_recursing,4,2     ; @async_die_is_recursing
	.comm	_run_thread,4,2                 ; @run_thread
l_.str.1:                               ; @.str.1
	.asciz	"cannot create async thread: %s"

	.comm	_process_is_async,4,2           ; @process_is_async
.subsections_via_symbols
