	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_get_env
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	cmpb	$49, (%rax)
	jne	LBB0_7
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_get_env
	movl	$-1, %ebx
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpb	$49, (%rax)
	jne	LBB0_5
## %bb.4:
	movl	$2, %edi
	callq	_dup
	movl	%eax, %ebx
LBB0_5:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_daemon
	testq	%rax, %rax
	js	LBB0_8
## %bb.6:
	cmpl	$3, %ebx
	jl	LBB0_7
## %bb.9:
	movl	%ebx, %edi
	movl	$2, %esi
	callq	_dup2
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_warn                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"daemon"

L_.str.1:                               ## @.str.1
	.asciz	"daemon_log_redirect"

L_.str.2:                               ## @.str.2
	.asciz	"DOWN-ROOT: daemonization failed"

	.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:
	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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_get_env
	cbz	x0, LBB0_9
; %bb.1:
	ldrb	w8, [x0]
	cmp	w8, #49
	b.ne	LBB0_9
; %bb.2:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_get_env
	cbz	x0, LBB0_5
; %bb.3:
	ldrb	w8, [x0]
	cmp	w8, #49
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #2
	bl	_dup
	mov	x19, x0
	b	LBB0_6
LBB0_5:
	mov	w19, #-1
LBB0_6:
	mov	w0, #0
	mov	w1, #0
	bl	_daemon
	tbnz	x0, #63, LBB0_10
; %bb.7:
	cmp	w19, #3
	b.lt	LBB0_9
; %bb.8:
	mov	x0, x19
	mov	w1, #2
	bl	_dup2
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_close
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_warn
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"daemon"

l_.str.1:                               ; @.str.1
	.asciz	"daemon_log_redirect"

l_.str.2:                               ; @.str.2
	.asciz	"DOWN-ROOT: daemonization failed"

	.no_dead_strip	_daemonize
.subsections_via_symbols
