	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_pidfile
_create_pidfile:                        ## @create_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_register_atexit_handler
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.1:
	movq	%r14, %rdi
	callq	_cleanup_old_pidfile
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	%r14, %rdi
	callq	_strdup
	movq	_pidfile_path@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rax, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_getpid
	movq	_pidfile_pid@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_fprintf
	movq	%r14, %rdi
	callq	_fclose
	jmp	LBB0_9
LBB0_7:
	movq	(%rbx), %rdi
	callq	_free
	movq	$0, (%rbx)
LBB0_8:
	movl	$-1, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pidfile_path,8,3               ## @pidfile_path
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

	.comm	_pidfile_pid,4,2                ## @pidfile_pid
L_.str.1:                               ## @.str.1
	.asciz	"%d\n"

	.no_dead_strip	_create_pidfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_pidfile
_create_pidfile:                        ; @create_pidfile
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_register_atexit_handler
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.1:
	mov	x0, x19
	bl	_cleanup_old_pidfile
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_strdup
Lloh0:
	adrp	x20, _pidfile_path@GOTPAGE
Lloh1:
	ldr	x20, [x20, _pidfile_path@GOTPAGEOFF]
	str	x0, [x20]
	cbz	x0, LBB0_6
; %bb.3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_5
; %bb.4:
	mov	x19, x0
	bl	_getpid
	mov	x2, x0
Lloh4:
	adrp	x8, _pidfile_pid@GOTPAGE
Lloh5:
	ldr	x8, [x8, _pidfile_pid@GOTPAGEOFF]
Lloh6:
	str	w0, [x8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	mov	x0, x19
	bl	_fclose
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	ldr	x0, [x20]
	bl	_free
	str	xzr, [x20]
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_pidfile_path,8,3               ; @pidfile_path
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

	.comm	_pidfile_pid,4,2                ; @pidfile_pid
l_.str.1:                               ; @.str.1
	.asciz	"%d\n"

	.no_dead_strip	_create_pidfile
.subsections_via_symbols
