	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function common_test_pidfile_child
_common_test_pidfile_child:             ## @common_test_pidfile_child
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$0, -52(%rbp)
	callq	_unlink
	leaq	-48(%rbp), %rdi
	callq	_pipe
	testq	%rax, %rax
	je	LBB0_5
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_2:
	callq	_strerror
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_36
## %bb.4:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.6:
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	movl	$384, %esi                      ## imm = 0x180
	callq	_pidfile_open
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:
	cmpl	$0, -52(%rbp)
	je	LBB0_10
LBB0_8:
	leaq	L_.str(%rip), %rax
	jmp	LBB0_3
LBB0_9:
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_10:
	testq	%r14, %r14
	je	LBB0_1
LBB0_11:
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_18
## %bb.12:
	movl	%eax, %r15d
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.13:
	movl	-44(%rbp), %edi
	callq	_close
	testq	%r14, %r14
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_pidfile_close
LBB0_15:
	movl	-48(%rbp), %edi
	leaq	-64(%rbp), %rsi
	movl	$1, %edx
	callq	_read
	cmpl	$1, %eax
	jne	LBB0_21
## %bb.16:
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	movl	$384, %esi                      ## imm = 0x180
	callq	_pidfile_open
	testq	%rax, %rax
	je	LBB0_27
## %bb.17:
	movq	%rax, %rdi
	callq	_pidfile_close
	movq	%r12, %rdi
	callq	_unlink
	leaq	L_.str.2(%rip), %rax
	jmp	LBB0_3
LBB0_18:
	movl	-48(%rbp), %edi
	callq	_close
	movq	_SIGINT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_signal_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	testl	%ebx, %ebx
	je	LBB0_23
LBB0_19:
	movq	%r14, %rdi
	callq	_pidfile_write
	testq	%rax, %rax
	je	LBB0_37
## %bb.20:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_pidfile_close
	movq	%r12, %rdi
	callq	_unlink
	jmp	LBB0_22
LBB0_21:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	%r12, %rdi
	callq	_unlink
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_kill
	movl	%ebx, (%r14)
LBB0_22:
	movl	%ebx, %edi
	jmp	LBB0_2
LBB0_23:
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	movl	$384, %esi                      ## imm = 0x180
	callq	_pidfile_open
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_26
## %bb.24:
	cmpl	$0, -52(%rbp)
	jne	LBB0_8
LBB0_26:
	testq	%r14, %r14
	jne	LBB0_19
	jmp	LBB0_1
LBB0_27:
	movl	-52(%rbp), %ebx
	movq	%r12, %rdi
	testl	%ebx, %ebx
	je	LBB0_33
## %bb.28:
	callq	_unlink
	cmpl	%r15d, %ebx
	jne	LBB0_34
## %bb.29:
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_kill
	testq	%rax, %rax
	jne	LBB0_1
## %bb.30:
	leaq	-56(%rbp), %rsi
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_waitpid
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.31:
	movl	-56(%rbp), %edi
	callq	_WIFSIGNALED
	testq	%rax, %rax
	je	LBB0_35
## %bb.32:
	leaq	L_.str.4(%rip), %rax
	jmp	LBB0_3
LBB0_33:
	callq	_unlink
	jmp	LBB0_1
LBB0_34:
	leaq	L_.str.3(%rip), %rax
	jmp	LBB0_3
LBB0_35:
	movl	-56(%rbp), %edi
	callq	_WEXITSTATUS
	movq	%rax, %rcx
	testq	%rax, %rax
	leaq	L_.str.5(%rip), %rax
	cmoveq	%rcx, %rax
	jmp	LBB0_3
LBB0_36:
	callq	___stack_chk_fail
LBB0_37:
	testq	%r14, %r14
	jne	LBB0_39
## %bb.38:
	movl	$1, %edi
	callq	__exit
LBB0_39:
	movq	%r14, %rdi
	callq	_pidfile_write
	testq	%rax, %rax
	jne	LBB0_42
## %bb.40:
	xorl	%eax, %eax
	callq	_kqueue
	cmpl	$-1, %eax
	jne	LBB0_43
## %bb.41:
	movl	$3, %edi
	callq	__exit
LBB0_42:
	movl	$2, %edi
	callq	__exit
LBB0_43:
	movl	%eax, %ebx
	movl	(%r15), %esi
	movq	_EVFILT_SIGNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_EV_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	$0, (%rsp)
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_EV_SET
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_kevent
	testl	%eax, %eax
	jne	LBB0_47
## %bb.44:
	movl	-44(%rbp), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edx
	callq	_write
	cmpl	$1, %eax
	jne	LBB0_48
## %bb.45:
	leaq	-56(%rbp), %rcx
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_kevent
	cmpl	$1, %eax
	jne	LBB0_49
## %bb.46:
	xorl	%edi, %edi
	callq	__exit
LBB0_47:
	movl	$4, %edi
	callq	__exit
LBB0_48:
	movl	$5, %edi
	callq	__exit
LBB0_49:
	movl	$6, %edi
	callq	__exit
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pidfile exists and is locked"

	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_signal_handler,4,2             ## @signal_handler
	.comm	_EVFILT_SIGNAL,4,2              ## @EVFILT_SIGNAL
	.comm	_EV_ADD,4,2                     ## @EV_ADD
L_.str.1:                               ## @.str.1
	.asciz	"*"

	.comm	_SIGTERM,4,2                    ## @SIGTERM
L_.str.2:                               ## @.str.2
	.asciz	"managed to lock contested pidfile"

L_.str.3:                               ## @.str.3
	.asciz	"pidfile contained wrong PID"

L_.str.4:                               ## @.str.4
	.asciz	"child caught signal"

L_.str.5:                               ## @.str.5
	.asciz	"child returned non-zero status"

	.no_dead_strip	_common_test_pidfile_child
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function common_test_pidfile_child
_common_test_pidfile_child:             ; @common_test_pidfile_child
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x1
	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]
	str	wzr, [sp, #12]
	bl	_unlink
	add	x0, sp, #16
	bl	_pipe
	cbz	x0, LBB0_5
LBB0_1:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_2:
	bl	_strerror
LBB0_3:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_34
; %bb.4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	cbz	w22, LBB0_9
; %bb.6:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #384
	bl	_pidfile_open
	mov	x21, x0
	cbnz	x0, LBB0_10
; %bb.7:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_10
LBB0_8:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_3
LBB0_9:
	mov	x21, #0
	b	LBB0_11
LBB0_10:
	cbz	x21, LBB0_1
LBB0_11:
	bl	_fork
	cbz	w0, LBB0_18
; %bb.12:
	mov	x20, x0
	cmn	w0, #1
	b.eq	LBB0_1
; %bb.13:
	ldr	w0, [sp, #20]
	bl	_close
	cbz	x21, LBB0_15
; %bb.14:
	mov	x0, x21
	bl	_pidfile_close
LBB0_15:
	ldr	w0, [sp, #16]
	mov	x1, sp
	mov	w2, #1
	bl	_read
	cmp	w0, #1
	b.ne	LBB0_21
; %bb.16:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #384
	bl	_pidfile_open
	cbz	x0, LBB0_25
; %bb.17:
	bl	_pidfile_close
	mov	x0, x19
	bl	_unlink
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_18:
	ldr	w0, [sp, #16]
	bl	_close
Lloh13:
	adrp	x20, _SIGINT@GOTPAGE
Lloh14:
	ldr	x20, [x20, _SIGINT@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh15:
	adrp	x8, _signal_handler@GOTPAGE
Lloh16:
	ldr	x8, [x8, _signal_handler@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_signal
	cbz	w22, LBB0_22
LBB0_19:
	mov	x0, x21
	bl	_pidfile_write
	cbz	x0, LBB0_35
; %bb.20:
Lloh18:
	adrp	x8, _errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
	mov	x0, x21
	bl	_pidfile_close
	mov	x0, x19
	bl	_unlink
	mov	x0, x20
	b	LBB0_2
LBB0_21:
Lloh21:
	adrp	x22, _errno@GOTPAGE
Lloh22:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	w21, [x22]
	mov	x0, x19
	bl	_unlink
Lloh23:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_kill
	str	w21, [x22]
	mov	x0, x21
	b	LBB0_2
LBB0_22:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #384
	bl	_pidfile_open
	mov	x21, x0
	cbnz	x0, LBB0_24
; %bb.23:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_8
LBB0_24:
	cbnz	x21, LBB0_19
	b	LBB0_1
LBB0_25:
	ldr	w21, [sp, #12]
	cbz	w21, LBB0_31
; %bb.26:
	mov	x0, x19
	bl	_unlink
	cmp	w21, w20
	b.ne	LBB0_32
; %bb.27:
Lloh26:
	adrp	x8, _SIGINT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SIGINT@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_kill
	cbnz	x0, LBB0_1
; %bb.28:
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #0
	bl	_waitpid
	cmn	w0, #1
	b.eq	LBB0_1
; %bb.29:
	ldr	w0, [sp, #8]
	bl	_WIFSIGNALED
	cbz	x0, LBB0_33
; %bb.30:
Lloh29:
	adrp	x0, l_.str.4@PAGE
Lloh30:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_3
LBB0_31:
	mov	x0, x19
	bl	_unlink
	b	LBB0_1
LBB0_32:
Lloh31:
	adrp	x0, l_.str.3@PAGE
Lloh32:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_33:
	ldr	w0, [sp, #8]
	bl	_WEXITSTATUS
Lloh33:
	adrp	x8, l_.str.5@PAGE
Lloh34:
	add	x8, x8, l_.str.5@PAGEOFF
	cmp	x0, #0
	csel	x0, xzr, x8, eq
	b	LBB0_3
LBB0_34:
	bl	___stack_chk_fail
LBB0_35:
	cbnz	x21, LBB0_37
; %bb.36:
	mov	w0, #1
	bl	__exit
LBB0_37:
	mov	x0, x21
	bl	_pidfile_write
	cbnz	x0, LBB0_40
; %bb.38:
	bl	_kqueue
	cmn	w0, #1
	b.ne	LBB0_41
; %bb.39:
	mov	w0, #3
	bl	__exit
LBB0_40:
	mov	w0, #2
	bl	__exit
LBB0_41:
	mov	x19, x0
	ldr	w1, [x20]
Lloh35:
	adrp	x8, _EVFILT_SIGNAL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EVFILT_SIGNAL@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
Lloh38:
	adrp	x8, _EV_ADD@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EV_ADD@GOTPAGEOFF]
Lloh40:
	ldr	w3, [x8]
	mov	x0, sp
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_EV_SET
	mov	x1, sp
	mov	x0, x19
	mov	w2, #1
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	bl	_kevent
	cbnz	w0, LBB0_45
; %bb.42:
	ldr	w0, [sp, #20]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #1
	bl	_write
	cmp	w0, #1
	b.ne	LBB0_46
; %bb.43:
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	mov	w4, #1
	mov	x5, #0
	bl	_kevent
	cmp	w0, #1
	b.ne	LBB0_47
; %bb.44:
	mov	w0, #0
	bl	__exit
LBB0_45:
	mov	w0, #4
	bl	__exit
LBB0_46:
	mov	w0, #5
	bl	__exit
LBB0_47:
	mov	w0, #6
	bl	__exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pidfile exists and is locked"

	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_signal_handler,4,2             ; @signal_handler
	.comm	_EVFILT_SIGNAL,4,2              ; @EVFILT_SIGNAL
	.comm	_EV_ADD,4,2                     ; @EV_ADD
l_.str.1:                               ; @.str.1
	.asciz	"*"

	.comm	_SIGTERM,4,2                    ; @SIGTERM
l_.str.2:                               ; @.str.2
	.asciz	"managed to lock contested pidfile"

l_.str.3:                               ; @.str.3
	.asciz	"pidfile contained wrong PID"

l_.str.4:                               ; @.str.4
	.asciz	"child caught signal"

l_.str.5:                               ; @.str.5
	.asciz	"child returned non-zero status"

	.no_dead_strip	_common_test_pidfile_child
.subsections_via_symbols
