	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pidfile                        ## -- Begin function pidfile
	.p2align	4, 0x90
_pidfile:                               ## @pidfile
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	movq	___progname@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_2:
	movq	_pidfile_path@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_free
	movq	$0, (%r14)
LBB0_4:
	movq	__PATH_VARRUN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rcx
	callq	_asprintf
	movq	(%r14), %rdi
	movl	$-1, %eax
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_getpid
	movq	%rax, %r15
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_fprintf
	testq	%rax, %rax
	jle	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_fclose
	testq	%rax, %rax
	je	LBB0_11
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r14), %rdi
	callq	_unlink
	jmp	LBB0_7
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_7:
	movq	(%r14), %rdi
	callq	_free
	movq	$0, (%r14)
LBB0_13:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movl	$-1, %eax
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_pidfile_pid@GOTPCREL(%rip), %r12
	movq	%r15, (%r12)
	movq	_pidfile_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_atexit
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_14
## %bb.12:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r14), %rdi
	callq	_unlink
	movq	(%r14), %rdi
	callq	_free
	movq	$0, (%r14)
	movq	$0, (%r12)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	___progname,8,3                 ## @__progname
	.comm	_pidfile_path,8,3               ## @pidfile_path
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s.pid"

	.comm	__PATH_VARRUN,4,2               ## @_PATH_VARRUN
L_.str.1:                               ## @.str.1
	.asciz	"w"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"%ld\n"

	.comm	_pidfile_pid,8,3                ## @pidfile_pid
	.comm	_pidfile_cleanup,4,2            ## @pidfile_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pidfile                        ; -- Begin function pidfile
	.p2align	2
_pidfile:                               ; @pidfile
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, ___progname@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___progname@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x20, x8, x0, eq
Lloh3:
	adrp	x19, _pidfile_path@GOTPAGE
Lloh4:
	ldr	x19, [x19, _pidfile_path@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
	str	xzr, [x19]
LBB0_2:
Lloh5:
	adrp	x8, __PATH_VARRUN@GOTPAGE
Lloh6:
	ldr	x8, [x8, __PATH_VARRUN@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_asprintf
	ldr	x0, [x19]
	cbz	x0, LBB0_10
; %bb.3:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_7
; %bb.4:
	mov	x21, x0
	bl	_getpid
	mov	x20, x0
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_fprintf
	cmp	x0, #1
	b.lt	LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_fclose
	cbz	x0, LBB0_12
LBB0_6:
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w20, [x8]
	ldr	x0, [x19]
	bl	_unlink
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
LBB0_8:
	ldr	x0, [x19]
	bl	_free
	str	xzr, [x19]
LBB0_9:
Lloh20:
	adrp	x8, _errno@GOTPAGE
Lloh21:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh22:
	str	w20, [x8]
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh23:
	adrp	x21, _pidfile_pid@GOTPAGE
Lloh24:
	ldr	x21, [x21, _pidfile_pid@GOTPAGEOFF]
	str	x20, [x21]
Lloh25:
	adrp	x8, _pidfile_cleanup@GOTPAGE
Lloh26:
	ldr	x8, [x8, _pidfile_cleanup@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_atexit
	tbnz	x0, #63, LBB0_14
; %bb.13:
	mov	w0, #0
	b	LBB0_11
LBB0_14:
Lloh28:
	adrp	x8, _errno@GOTPAGE
Lloh29:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh30:
	ldr	w20, [x8]
	ldr	x0, [x19]
	bl	_unlink
	ldr	x0, [x19]
	bl	_free
	str	xzr, [x19]
	str	xzr, [x21]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	___progname,8,3                 ; @__progname
	.comm	_pidfile_path,8,3               ; @pidfile_path
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s.pid"

	.comm	__PATH_VARRUN,4,2               ; @_PATH_VARRUN
l_.str.1:                               ; @.str.1
	.asciz	"w"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"%ld\n"

	.comm	_pidfile_pid,8,3                ; @pidfile_pid
	.comm	_pidfile_cleanup,4,2            ; @pidfile_cleanup
.subsections_via_symbols
