	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function daemonize
_daemonize:                             ## @daemonize
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	movq	_PIDFILE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	(%rbx), %rcx
	movl	$127, %esi
	xorl	%eax, %eax
	callq	_snprintf
	movl	24(%rbx), %edi
	leaq	-28(%rbp), %rdx
	movl	$384, %esi                      ## imm = 0x180
	callq	_pidfile_open
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_daemon
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_pidfile_write
	movq	%r14, 16(%rbx)
	movq	_FLG_DAEMON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	movq	_syslog_title@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	xorl	%eax, %eax
	callq	_getprogname
	movq	(%rbx), %r8
	leaq	L_.str.2(%rip), %rdx
	movl	%r14d, %edi
	movl	$63, %esi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_snprintf
	movl	(%r15), %edi
	movq	_LOG_PID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LOG_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_openlog
	movq	_syslog_open@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_5
LBB0_1:
	movl	24(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	movq	%r14, %rdi
	callq	_pidfile_remove
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIDFILE,8,3                    ## @PIDFILE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot create pidfile %s"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot daemonize"

	.comm	_FLG_DAEMON,4,2                 ## @FLG_DAEMON
	.comm	_syslog_title,4,2               ## @syslog_title
L_.str.2:                               ## @.str.2
	.asciz	"%s:%s"

	.comm	_LOG_PID,4,2                    ## @LOG_PID
	.comm	_LOG_USER,4,2                   ## @LOG_USER
	.comm	_syslog_open,4,2                ## @syslog_open
	.no_dead_strip	_daemonize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function daemonize
_daemonize:                             ; @daemonize
	.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
	mov	x19, x0
	ldr	w0, [x0, #24]
Lloh0:
	adrp	x8, _PIDFILE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIDFILE@GOTPAGEOFF]
Lloh2:
	ldr	x2, [x8]
	ldr	x3, [x19]
	mov	w1, #127
	bl	_snprintf
	ldr	w0, [x19, #24]
	add	x2, sp, #12
	mov	w1, #384
	bl	_pidfile_open
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	w0, #0
	mov	w1, #0
	bl	_daemon
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_pidfile_write
	str	x20, [x19, #16]
Lloh3:
	adrp	x8, _FLG_DAEMON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FLG_DAEMON@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
Lloh6:
	adrp	x21, _syslog_title@GOTPAGE
Lloh7:
	ldr	x21, [x21, _syslog_title@GOTPAGEOFF]
	ldr	w20, [x21]
	bl	_getprogname
	mov	x3, x0
	ldr	x8, [x19]
	str	x8, [sp]
Lloh8:
	adrp	x2, l_.str.2@PAGE
Lloh9:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w1, #63
	bl	_snprintf
	ldr	w0, [x21]
Lloh10:
	adrp	x8, _LOG_PID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LOG_PID@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _LOG_USER@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LOG_USER@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	bl	_openlog
Lloh16:
	adrp	x8, _syslog_open@GOTPAGE
Lloh17:
	ldr	x8, [x8, _syslog_open@GOTPAGEOFF]
	mov	w9, #1
Lloh18:
	str	w9, [x8]
	b	LBB0_5
LBB0_3:
	ldr	w8, [x19, #24]
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	b	LBB0_5
LBB0_4:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	mov	x0, x20
	bl	_pidfile_remove
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PIDFILE,8,3                    ; @PIDFILE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot create pidfile %s"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot daemonize"

	.comm	_FLG_DAEMON,4,2                 ; @FLG_DAEMON
	.comm	_syslog_title,4,2               ; @syslog_title
l_.str.2:                               ; @.str.2
	.asciz	"%s:%s"

	.comm	_LOG_PID,4,2                    ; @LOG_PID
	.comm	_LOG_USER,4,2                   ; @LOG_USER
	.comm	_syslog_open,4,2                ; @syslog_open
	.no_dead_strip	_daemonize
.subsections_via_symbols
