	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_daemon                         ## -- Begin function daemon
	.p2align	4, 0x90
_daemon:                                ## @daemon
	.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
	movl	%esi, %r14d
	movl	%edi, %r15d
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, %ebx
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.2:
	xorl	%eax, %eax
	callq	_setsid
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_chdir
LBB0_6:
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	jne	LBB0_10
## %bb.7:
	movq	__PATH_DEVNULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %r14d
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_dup2
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_dup2
	movq	_STDERR_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_dup2
	cmpl	$3, %r14d
	jl	LBB0_10
## %bb.9:
	movl	%r14d, %edi
	callq	_close
	jmp	LBB0_10
LBB0_3:
	movl	$-1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%edi, %edi
	callq	__exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

	.comm	__PATH_DEVNULL,4,2              ## @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_daemon                         ; -- Begin function daemon
	.p2align	2
_daemon:                                ; @daemon
	.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, x1
	mov	x20, x0
	bl	_fork
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.1:
	cbnz	w0, LBB0_11
; %bb.2:
	bl	_setsid
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.3:
	cbz	w20, LBB0_5
; %bb.4:
	cbnz	w19, LBB0_9
	b	LBB0_6
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_chdir
	cbnz	w19, LBB0_9
LBB0_6:
Lloh2:
	adrp	x8, __PATH_DEVNULL@GOTPAGE
Lloh3:
	ldr	x8, [x8, __PATH_DEVNULL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.7:
	mov	x19, x0
Lloh8:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_dup2
Lloh11:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dup2
Lloh14:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dup2
	cmp	w19, #3
	b.lt	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_close
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	w0, #0
	bl	__exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

	.comm	__PATH_DEVNULL,4,2              ; @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
.subsections_via_symbols
