	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function openfiles
_openfiles:                             ## @openfiles
	.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, %r13
	movq	_SIGUSR1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	movq	_AFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_CREAT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	movl	%eax, %r14d
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_ATF_REQUIRE
	movl	%r14d, %edi
	callq	_close
	movq	_RENDEZVOUS@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	(%rbx), %esi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	movl	%eax, %r14d
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_ATF_REQUIRE
	movl	%r14d, %edi
	callq	_close
	movq	_done@GOTPCREL(%rip), %r14
	movl	$0, (%r14)
	movq	_PARALLEL@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.10:
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rdi
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	callq	_openfiles2
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	incl	%ebx
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	jge	LBB0_2
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_fork
	testq	%rax, %rax
	jne	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movslq	(%r15), %rcx
	movq	%r13, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %edi
	jmp	LBB0_15
LBB0_2:
	movl	(%r14), %ecx
	cmpl	%eax, %ecx
	jne	LBB0_4
	jmp	LBB0_6
LBB0_1:
	xorl	%ecx, %ecx
	cmpl	%eax, %ecx
	je	LBB0_6
LBB0_4:
	movq	_WNOHANG@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_usleep
	movl	(%r13), %edx
	movl	$-1, %edi
	xorl	%esi, %esi
	callq	_waitpid
	xorl	%edi, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_ATF_REQUIRE_EQ_MSG
	movl	(%r14), %eax
	cmpl	(%r15), %eax
	jne	LBB0_5
LBB0_6:
	movl	(%r12), %edi
	callq	_unlink
	cmpl	$0, (%r15)
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	movq	_errno@GOTPCREL(%rip), %r13
	leaq	L_.str.1(%rip), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	callq	_wait
	xorl	%r12d, %r12d
	testq	%rax, %rax
	setg	%r12b
	movl	(%r13), %edi
	callq	_strerror
	movl	%r12d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_ATF_CHECK_MSG
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.comm	_handler,4,2                    ## @handler
	.comm	_AFILE,4,2                      ## @AFILE
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_RENDEZVOUS,4,2                 ## @RENDEZVOUS
	.comm	_done,4,2                       ## @done
	.comm	_PARALLEL,4,2                   ## @PARALLEL
	.comm	_WNOHANG,4,2                    ## @WNOHANG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"a child exited unexpectedly"

L_.str.1:                               ## @.str.1
	.asciz	"wait: %s"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_openfiles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function openfiles
_openfiles:                             ; @openfiles
	.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	x8, _SIGUSR1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _handler@GOTPAGE
Lloh4:
	ldr	x8, [x8, _handler@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_signal
Lloh6:
	adrp	x8, _AFILE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AFILE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x21, _O_CREAT@GOTPAGE
Lloh10:
	ldr	x21, [x21, _O_CREAT@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #420
	bl	_open
	mov	x20, x0
	cmn	w0, #1
	cset	w0, ne
	bl	_ATF_REQUIRE
	mov	x0, x20
	bl	_close
Lloh11:
	adrp	x22, _RENDEZVOUS@GOTPAGE
Lloh12:
	ldr	x22, [x22, _RENDEZVOUS@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w1, [x21]
	mov	w2, #420
	bl	_open
	mov	x20, x0
	cmn	w0, #1
	cset	w0, ne
	bl	_ATF_REQUIRE
	mov	x0, x20
	bl	_close
Lloh13:
	adrp	x20, _done@GOTPAGE
Lloh14:
	ldr	x20, [x20, _done@GOTPAGEOFF]
	str	wzr, [x20]
Lloh15:
	adrp	x21, _PARALLEL@GOTPAGE
Lloh16:
	ldr	x21, [x21, _PARALLEL@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w23, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	ldr	w8, [x21]
	cmp	w23, w8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_fork
	cbnz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [x21]
	udiv	x0, x19, x8
	bl	_openfiles2
	b	LBB0_2
LBB0_5:
	ldr	w9, [x20]
	cmp	w9, w8
	b.ne	LBB0_7
	b	LBB0_9
LBB0_6:
	mov	w9, #0
	cmp	w9, w8
	b.eq	LBB0_9
LBB0_7:
Lloh17:
	adrp	x23, _WNOHANG@GOTPAGE
Lloh18:
	ldr	x23, [x23, _WNOHANG@GOTPAGEOFF]
Lloh19:
	adrp	x19, l_.str@PAGE
Lloh20:
	add	x19, x19, l_.str@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1000
	bl	_usleep
	ldr	w2, [x23]
	mov	w0, #-1
	mov	x1, #0
	bl	_waitpid
	mov	x1, x0
	mov	w0, #0
	mov	x2, x19
	bl	_ATF_REQUIRE_EQ_MSG
	ldr	w8, [x20]
	ldr	w9, [x21]
	cmp	w8, w9
	b.ne	LBB0_8
LBB0_9:
	ldr	w0, [x22]
	bl	_unlink
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.10:
	mov	w22, #0
Lloh21:
	adrp	x23, _errno@GOTPAGE
Lloh22:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh23:
	adrp	x19, l_.str.1@PAGE
Lloh24:
	add	x19, x19, l_.str.1@PAGEOFF
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, #0
	bl	_wait
	cmp	x0, #0
	cset	w20, gt
	ldr	w0, [x23]
	bl	_strerror
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_ATF_CHECK_MSG
	add	w22, w22, #1
	ldr	w8, [x21]
	cmp	w22, w8
	b.lt	LBB0_11
LBB0_12:
	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 AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.comm	_handler,4,2                    ; @handler
	.comm	_AFILE,4,2                      ; @AFILE
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_RENDEZVOUS,4,2                 ; @RENDEZVOUS
	.comm	_done,4,2                       ; @done
	.comm	_PARALLEL,4,2                   ; @PARALLEL
	.comm	_WNOHANG,4,2                    ; @WNOHANG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"a child exited unexpectedly"

l_.str.1:                               ; @.str.1
	.asciz	"wait: %s"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_openfiles
.subsections_via_symbols
