	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_pidfile_self
_test_pidfile_self:                     ## @test_pidfile_self
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -40(%rbp)
	leaq	L_.str(%rip), %rbx
	movq	%rbx, %rdi
	callq	_unlink
	leaq	-40(%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, -40(%rbp)
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %r14
	jmp	LBB0_11
LBB0_3:
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.6:
	movq	%rbx, %rdi
	callq	_pidfile_write
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_pidfile_close
	leaq	L_.str(%rip), %rdi
	callq	_unlink
	movl	%r14d, %edi
	jmp	LBB0_5
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_5:
	callq	_strerror
	movq	%rax, %r14
LBB0_11:
	movq	%r14, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rdi
	leaq	-40(%rbp), %rdx
	movl	$384, %esi                      ## imm = 0x180
	callq	_pidfile_open
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_pidfile_close
	movq	%r14, %rdi
	callq	_pidfile_close
	leaq	L_.str(%rip), %rdi
	callq	_unlink
	leaq	L_.str.2(%rip), %r14
	jmp	LBB0_11
LBB0_10:
	movq	-40(%rbp), %r12
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_getpid
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_pidfile_close
	leaq	L_.str(%rip), %rdi
	callq	_unlink
	cmpq	%r15, %r12
	leaq	L_.str.3(%rip), %rax
	cmovneq	%rax, %r14
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_pidfile_self"

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

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"managed to opened pidfile twice"

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

	.no_dead_strip	_test_pidfile_self
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_pidfile_self
_test_pidfile_self:                     ; @test_pidfile_self
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	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_4
; %bb.1:
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_pidfile_write
	cbz	x0, LBB0_6
; %bb.3:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_pidfile_close
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_unlink
	mov	x0, x20
	bl	_strerror
	b	LBB0_9
LBB0_4:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_5:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_strerror
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	w1, #384
	bl	_pidfile_open
	cbz	x0, LBB0_8
; %bb.7:
	mov	x20, x0
	mov	x0, x19
	bl	_pidfile_close
	mov	x0, x20
	bl	_pidfile_close
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_unlink
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	x21, [sp, #8]
	bl	_getpid
	mov	x20, x0
	mov	x0, x19
	bl	_pidfile_close
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_unlink
Lloh20:
	adrp	x8, l_.str.3@PAGE
Lloh21:
	add	x8, x8, l_.str.3@PAGEOFF
	cmp	x21, x20
	csel	x0, xzr, x8, eq
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_pidfile_self"

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

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"managed to opened pidfile twice"

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

	.no_dead_strip	_test_pidfile_self
.subsections_via_symbols
