	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_pdfork                    ## -- Begin function test_pdfork
	.p2align	4, 0x90
_test_pdfork:                           ## @test_pdfork
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PASSED@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	leaq	-44(%rbp), %rdi
	xorl	%esi, %esi
	callq	_pdfork
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	js	LBB0_1
## %bb.7:
	jne	LBB0_2
## %bb.8:
	movl	-44(%rbp), %edi
	leaq	-56(%rbp), %rsi
	callq	_pdgetpid
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EBADF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	callq	_FAIL
LBB0_12:
	movl	%r14d, %edi
	callq	_exit
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_2:
	movl	-44(%rbp), %edi
	leaq	-96(%rbp), %rsi
	callq	_fstat
	movl	%eax, %edi
	callq	_REQUIRE
	xorl	%edi, %edi
	callq	_time
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpq	$-1, %rax
	setne	%dil
	callq	_CHECK
	movq	-96(%rbp), %r12
	xorl	%edi, %edi
	subq	%r12, %rbx
	setge	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpq	$2, %rbx
	setl	%dil
	callq	_CHECK
	movq	-88(%rbp), %r13
	xorl	%edi, %edi
	cmpq	%r13, %r12
	sete	%dil
	callq	_CHECK
	movq	-80(%rbp), %rbx
	xorl	%edi, %edi
	cmpq	%rbx, %r13
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpq	-72(%rbp), %rbx
	sete	%dil
	callq	_CHECK
	movl	-44(%rbp), %edi
	leaq	-56(%rbp), %rsi
	callq	_pdgetpid
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpq	$0, -56(%rbp)
	setg	%dil
	callq	_CHECK
	movq	-56(%rbp), %rdi
	leaq	-60(%rbp), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_waitpid
	movq	-56(%rbp), %rdi
	cmpq	%rdi, %rax
	jne	LBB0_3
## %bb.4:
	cmpl	(%r15), %r14d
	jne	LBB0_13
## %bb.5:
	movl	-60(%rbp), %edi
	callq	_WIFEXITED
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	movl	-60(%rbp), %edi
	callq	_WEXITSTATUS
	jmp	LBB0_14
LBB0_13:
	movq	_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_FAILX
	movl	%r14d, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_PASSED,4,2                     ## @PASSED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pdfork"

L_.str.1:                               ## @.str.1
	.asciz	"pdgetpid succeeded"

	.comm	_errno,8,3                      ## @errno
	.comm	_EBADF,8,3                      ## @EBADF
L_.str.2:                               ## @.str.2
	.asciz	"pdgetpid failed, but errno != EBADF"

	.comm	_FAILED,4,2                     ## @FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_pdfork                    ; -- Begin function test_pdfork
	.p2align	2
_test_pdfork:                           ; @test_pdfork
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x21, _PASSED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PASSED@GOTPAGEOFF]
	ldr	w19, [x21]
	add	x0, sp, #28
	mov	w1, #0
	bl	_pdfork
	str	x0, [sp, #16]
	tbnz	x0, #63, LBB0_6
; %bb.1:
	cbnz	x0, LBB0_7
; %bb.2:
	ldr	w0, [sp, #28]
	add	x1, sp, #16
	bl	_pdgetpid
	cmn	w0, #1
	b.ne	LBB0_14
; %bb.3:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _EBADF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EBADF@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_FAIL
LBB0_5:
	mov	x0, x19
	bl	_exit
LBB0_6:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_7:
	ldr	w0, [sp, #28]
	add	x1, sp, #32
	bl	_fstat
	bl	_REQUIRE
	mov	x0, #0
	bl	_time
	mov	x20, x0
	cmn	x0, #1
	cset	w0, ne
	bl	_CHECK
	ldr	x22, [sp, #32]
	subs	x20, x20, x22
	cset	w0, ge
	bl	_CHECK
	cmp	x20, #2
	cset	w0, lt
	bl	_CHECK
	ldr	x20, [sp, #40]
	cmp	x22, x20
	cset	w0, eq
	bl	_CHECK
	ldr	x22, [sp, #48]
	cmp	x20, x22
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [sp, #56]
	cmp	x22, x8
	cset	w0, eq
	bl	_CHECK
	ldr	w0, [sp, #28]
	add	x1, sp, #16
	bl	_pdgetpid
	cmp	w0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [sp, #16]
	cmp	x8, #0
	cset	w0, gt
	bl	_CHECK
	ldr	x0, [sp, #16]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	mov	w2, #0
	bl	_waitpid
	mov	x8, x0
	ldr	x0, [sp, #16]
	cmp	x8, x0
	b.ne	LBB0_8
; %bb.9:
	ldr	w8, [x21]
	cmp	w19, w8
	b.ne	LBB0_12
; %bb.10:
	ldr	w0, [sp, #12]
	bl	_WIFEXITED
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w0, [sp, #12]
	bl	_WEXITSTATUS
	b	LBB0_13
LBB0_12:
Lloh12:
	adrp	x8, _FAILED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FAILED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FAILX
	mov	x0, x19
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PASSED,4,2                     ; @PASSED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pdfork"

l_.str.1:                               ; @.str.1
	.asciz	"pdgetpid succeeded"

	.comm	_errno,8,3                      ; @errno
	.comm	_EBADF,8,3                      ; @EBADF
l_.str.2:                               ; @.str.2
	.asciz	"pdgetpid failed, but errno != EBADF"

	.comm	_FAILED,4,2                     ; @FAILED
.subsections_via_symbols
