	.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_pidfile@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	movq	_dstdir@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	movq	_MAX_FPATH_LEN@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setl	%dil
	callq	_assert
	movq	(%r13), %rdi
	movq	_tmp_stat@GOTPCREL(%rip), %rbx
	movq	%rbx, %rsi
	callq	_stat
	testq	%rax, %rax
	js	LBB0_9
## %bb.1:
	movl	(%rbx), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_11
## %bb.2:
	movq	(%r13), %rdi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	callq	_open
	movl	$-1, %r14d
	testl	%eax, %eax
	js	LBB0_13
## %bb.3:
	movl	%eax, %ebx
	leaq	_create_pidfile.tmp_buff(%rip), %rsi
	movl	%eax, %edi
	movl	$16, %edx
	callq	_read
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_close
	testl	%r12d, %r12d
	js	LBB0_13
## %bb.4:
	cmpl	$15, %r12d
	ja	LBB0_7
## %bb.5:
	movl	%r12d, %eax
	leaq	_create_pidfile.tmp_buff(%rip), %rdi
	movb	$0, (%rax,%rdi)
	callq	_atoi
	testl	%eax, %eax
	jle	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	_create_pidfile.tmp_buff(%rip), %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_sprintf
	movq	_tmp_stat@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_stat
	testq	%rax, %rax
	jns	LBB0_14
LBB0_7:
	movq	(%r13), %rsi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	movq	(%r13), %rdi
	callq	_unlink
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
LBB0_9:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	(%r13), %rdi
	movq	_O_EXCL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$416, %edx                      ## imm = 0x1A0
	xorl	%eax, %eax
	callq	_open
	testl	%eax, %eax
	js	LBB0_12
## %bb.10:
	movl	%eax, %r15d
	movq	_pidfile_created@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_do_remove_pidfile@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_atexit
	xorl	%eax, %eax
	callq	_getpid
	leaq	_create_pidfile.tmp_buff(%rip), %r14
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_sprintf
	movl	%eax, %ebx
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_write
	xorl	%r14d, %r14d
	cmpl	%ebx, %eax
	setne	%r14b
	movl	%r15d, %edi
	callq	_close
	negl	%r14d
	jmp	LBB0_13
LBB0_11:
	movq	_EISDIR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_12:
	movl	$-1, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	(%r15), %rsi
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_kprintf
	movl	$2, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_create_pidfile.tmp_buff,32,4 ## @create_pidfile.tmp_buff
	.comm	_pidfile,8,3                    ## @pidfile
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/backup.pid"

	.comm	_dstdir,8,3                     ## @dstdir
	.comm	_MAX_FPATH_LEN,4,2              ## @MAX_FPATH_LEN
	.comm	_tmp_stat,4,2                   ## @tmp_stat
	.comm	_EISDIR,8,3                     ## @EISDIR
	.comm	_errno,8,3                      ## @errno
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"/proc/%d/"

L_.str.2:                               ## @.str.2
	.asciz	"fatal: destination directory %s already locked by process %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"warning: removing stale pid file %s\n"

	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_pidfile_created,4,2            ## @pidfile_created
	.comm	_do_remove_pidfile,4,2          ## @do_remove_pidfile
L_.str.4:                               ## @.str.4
	.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:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x22, _pidfile@GOTPAGE
Lloh1:
	ldr	x22, [x22, _pidfile@GOTPAGEOFF]
	ldr	x0, [x22]
Lloh2:
	adrp	x23, _dstdir@GOTPAGE
Lloh3:
	ldr	x23, [x23, _dstdir@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
Lloh6:
	adrp	x8, _MAX_FPATH_LEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_FPATH_LEN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, lt
	bl	_assert
	ldr	x0, [x22]
Lloh9:
	adrp	x19, _tmp_stat@GOTPAGE
Lloh10:
	ldr	x19, [x19, _tmp_stat@GOTPAGEOFF]
	mov	x1, x19
	bl	_stat
	tbnz	x0, #63, LBB0_9
; %bb.1:
	ldr	w0, [x19]
	bl	_S_ISREG
	cbz	w0, LBB0_11
; %bb.2:
	ldr	x0, [x22]
Lloh11:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_12
; %bb.3:
	mov	x20, x0
Lloh14:
	adrp	x19, _create_pidfile.tmp_buff@PAGE
Lloh15:
	add	x19, x19, _create_pidfile.tmp_buff@PAGEOFF
	mov	x1, x19
	mov	w2, #16
	bl	_read
	mov	x21, x0
	mov	x0, x20
	bl	_close
	tbnz	w21, #31, LBB0_12
; %bb.4:
	cmp	w21, #15
	b.hi	LBB0_7
; %bb.5:
	strb	wzr, [x19, w21, uxtw]
	mov	x0, x19
	bl	_atoi
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.6:
	mov	x19, x0
	str	x19, [sp]
Lloh16:
	adrp	x20, _create_pidfile.tmp_buff@PAGE
Lloh17:
	add	x20, x20, _create_pidfile.tmp_buff@PAGEOFF
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_sprintf
Lloh20:
	adrp	x1, _tmp_stat@GOTPAGE
Lloh21:
	ldr	x1, [x1, _tmp_stat@GOTPAGEOFF]
	mov	x0, x20
	bl	_stat
	tbz	x0, #63, LBB0_14
LBB0_7:
	ldr	x1, [x22]
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_kprintf
	ldr	x0, [x22]
	bl	_unlink
	tbz	x0, #63, LBB0_9
; %bb.8:
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _ENOENT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
LBB0_9:
	ldr	x0, [x22]
Lloh30:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh31:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh36:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh37:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w8, #416
	str	x8, [sp]
	bl	_open
	tbnz	w0, #31, LBB0_12
; %bb.10:
	mov	x19, x0
Lloh39:
	adrp	x8, _pidfile_created@GOTPAGE
Lloh40:
	ldr	x8, [x8, _pidfile_created@GOTPAGEOFF]
	mov	w9, #1
Lloh41:
	str	w9, [x8]
Lloh42:
	adrp	x8, _do_remove_pidfile@GOTPAGE
Lloh43:
	ldr	x8, [x8, _do_remove_pidfile@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
	bl	_atexit
	bl	_getpid
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh45:
	adrp	x20, _create_pidfile.tmp_buff@PAGE
Lloh46:
	add	x20, x20, _create_pidfile.tmp_buff@PAGEOFF
Lloh47:
	adrp	x1, l_.str.4@PAGE
Lloh48:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_sprintf
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_write
	mov	x20, x0
	mov	x0, x19
	bl	_close
	cmp	w20, w21
	csetm	w0, ne
	b	LBB0_13
LBB0_11:
Lloh49:
	adrp	x8, _EISDIR@GOTPAGE
Lloh50:
	ldr	x8, [x8, _EISDIR@GOTPAGEOFF]
Lloh51:
	ldr	x8, [x8]
Lloh52:
	adrp	x9, _errno@GOTPAGE
Lloh53:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh54:
	str	x8, [x9]
LBB0_12:
	mov	w0, #-1
LBB0_13:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
	ldr	x1, [x23]
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	str	x19, [sp]
Lloh55:
	adrp	x0, l_.str.2@PAGE
Lloh56:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_kprintf
	mov	w0, #2
	bl	_exit
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotStr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotStr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_create_pidfile.tmp_buff,32,0 ; @create_pidfile.tmp_buff
	.comm	_pidfile,8,3                    ; @pidfile
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/backup.pid"

	.comm	_dstdir,8,3                     ; @dstdir
	.comm	_MAX_FPATH_LEN,4,2              ; @MAX_FPATH_LEN
	.comm	_tmp_stat,4,2                   ; @tmp_stat
	.comm	_EISDIR,8,3                     ; @EISDIR
	.comm	_errno,8,3                      ; @errno
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"/proc/%d/"

l_.str.2:                               ; @.str.2
	.asciz	"fatal: destination directory %s already locked by process %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"warning: removing stale pid file %s\n"

	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_pidfile_created,4,2            ; @pidfile_created
	.comm	_do_remove_pidfile,4,2          ; @do_remove_pidfile
l_.str.4:                               ; @.str.4
	.asciz	"%d\n"

	.no_dead_strip	_create_pidfile
.subsections_via_symbols
