	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_pidfile_uncontested
_test_pidfile_uncontested:              ## @test_pidfile_uncontested
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	$0, -24(%rbp)
	leaq	L_.str(%rip), %rbx
	movq	%rbx, %rdi
	callq	_unlink
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$384, %esi                      ## imm = 0x180
	callq	_pidfile_open
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	cmpq	$0, -24(%rbp)
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_pidfile_write
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_pidfile_close
	leaq	L_.str(%rip), %rdi
	callq	_unlink
	testq	%r14, %r14
	leaq	L_.str.2(%rip), %rax
	cmoveq	%r14, %rax
	jmp	LBB0_6
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_pidfile_uncontested"

L_.str.1:                               ## @.str.1
	.asciz	"pidfile exists and is locked"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"failed to write PID"

	.no_dead_strip	_test_pidfile_uncontested
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_pidfile_uncontested
_test_pidfile_uncontested:              ; @test_pidfile_uncontested
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	str	xzr, [sp, #8]
Lloh0:
	adrp	x19, l_.str@PAGE
Lloh1:
	add	x19, x19, l_.str@PAGEOFF
	mov	x0, x19
	bl	_unlink
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #384
	bl	_pidfile_open
	ldr	x8, [sp, #8]
	cmp	x0, #0
	ccmp	x8, #0, #4, eq
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_pidfile_write
	mov	x20, x0
	mov	x0, x19
	bl	_pidfile_close
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_unlink
Lloh4:
	adrp	x8, l_.str.2@PAGE
Lloh5:
	add	x8, x8, l_.str.2@PAGEOFF
	cmp	x20, #0
	csel	x0, xzr, x8, eq
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_strerror
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_pidfile_uncontested"

l_.str.1:                               ; @.str.1
	.asciz	"pidfile exists and is locked"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"failed to write PID"

	.no_dead_strip	_test_pidfile_uncontested
.subsections_via_symbols
