	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_NUM_THREADS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_sighandler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_SIGCHLD@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_sigaction
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	leaq	-60(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sigemptyset
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_sigaddset
	movq	_SIG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_sigprocmask
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_4:
	movl	$0, -52(%rbp)
	cmpl	$0, (%r15)
	jle	LBB0_9
## %bb.5:
	xorl	%eax, %eax
	movq	_vfork_test@GOTPCREL(%rip), %r13
	leaq	-52(%rbp), %rbx
	leaq	L_.str.2(%rip), %r14
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	-52(%rbp), %eax
	incl	%eax
	movl	%eax, -52(%rbp)
	cmpl	(%r15), %eax
	jge	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cltq
	leaq	(%r12,%rax,4), %rdi
	movl	(%r13), %edx
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_pthread_create
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_errc
	jmp	LBB0_8
LBB0_9:
	xorl	%eax, %eax
	callq	_pause
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_THREADS,4,2                ## @NUM_THREADS
	.comm	_sighandler,4,2                 ## @sighandler
	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not sigaction(SIGCHLD)"

	.comm	_SIG_BLOCK,4,2                  ## @SIG_BLOCK
L_.str.1:                               ## @.str.1
	.asciz	"sigprocmask"

	.comm	_vfork_test,4,2                 ## @vfork_test
L_.str.2:                               ## @.str.2
	.asciz	"pthread_create"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x20, _NUM_THREADS@GOTPAGE
Lloh4:
	ldr	x20, [x20, _NUM_THREADS@GOTPAGEOFF]
	ldr	w8, [x20]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	sub	x0, x29, #48
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh7:
	adrp	x8, _sighandler@GOTPAGE
Lloh8:
	ldr	x8, [x8, _sighandler@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	stur	w8, [x29, #-48]
Lloh10:
	adrp	x19, _SIGCHLD@GOTPAGE
Lloh11:
	ldr	x19, [x19, _SIGCHLD@GOTPAGEOFF]
	ldr	w0, [x19]
	sub	x1, x29, #48
	mov	x2, #0
	bl	_sigaction
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	sub	x0, x29, #52
	bl	_sigemptyset
	ldr	w1, [x19]
	sub	x0, x29, #52
	bl	_sigaddset
Lloh14:
	adrp	x8, _SIG_BLOCK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SIG_BLOCK@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	sub	x1, x29, #52
	mov	x2, #0
	bl	_sigprocmask
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	stur	wzr, [x29, #-56]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:
	mov	w8, #0
Lloh19:
	adrp	x22, _vfork_test@GOTPAGE
Lloh20:
	ldr	x22, [x22, _vfork_test@GOTPAGEOFF]
Lloh21:
	adrp	x19, l_.str.2@PAGE
Lloh22:
	add	x19, x19, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldur	w8, [x29, #-56]
	add	w8, w8, #1
	stur	w8, [x29, #-56]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x21, w8, sxtw #2
	ldr	w2, [x22]
	sub	x3, x29, #56
	mov	x1, #0
	bl	_pthread_create
	cbz	w0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, x0
	mov	w0, #1
	mov	x2, x19
	bl	_errc
	b	LBB0_6
LBB0_9:
	bl	_pause
	ldur	x8, [x29, #-40]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	w0, #0
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_THREADS,4,2                ; @NUM_THREADS
	.comm	_sighandler,4,2                 ; @sighandler
	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not sigaction(SIGCHLD)"

	.comm	_SIG_BLOCK,4,2                  ; @SIG_BLOCK
l_.str.1:                               ; @.str.1
	.asciz	"sigprocmask"

	.comm	_vfork_test,4,2                 ; @vfork_test
l_.str.2:                               ; @.str.2
	.asciz	"pthread_create"

.subsections_via_symbols
