	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_daemonfd                       ## -- Begin function daemonfd
	.p2align	4, 0x90
_daemonfd:                              ## @daemonfd
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	leaq	-52(%rbp), %rdi
	callq	_sigemptyset
	movq	_SIG_IGN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	$0, -64(%rbp)
	movq	_SIGHUP@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	-64(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	callq	___libc_sigaction
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, %ebx
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.1:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.2:
	xorl	%eax, %eax
	callq	_setsid
	movl	%eax, %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	$-1, %r12d
	je	LBB0_4
## %bb.3:
	movl	(%r13), %edi
	leaq	-80(%rbp), %rsi
	xorl	%edx, %edx
	movq	%rax, %r12
	movl	%ecx, %ebx
	callq	___libc_sigaction
	movl	%ebx, %ecx
	movq	%r12, %rax
LBB0_4:
	cmpl	$-1, %r14d
	je	LBB0_5
## %bb.6:
	cmpl	$-1, %r15d
	je	LBB0_8
## %bb.7:
	movl	%r15d, %edi
	callq	_fchdir
LBB0_8:
	xorl	%ebx, %ebx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	cmpl	$-1, %r14d
	je	LBB0_10
## %bb.9:
	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
	jmp	LBB0_10
LBB0_5:
	movl	%ecx, (%rax)
	movl	$-1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%edi, %edi
	callq	__exit
	.cfi_endproc
                                        ## -- End function
	.comm	_SIG_IGN,4,2                    ## @SIG_IGN
	.comm	_SIGHUP,4,2                     ## @SIGHUP
	.comm	_errno,4,2                      ## @errno
	.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	_daemonfd                       ; -- Begin function daemonfd
	.p2align	2
_daemonfd:                              ; @daemonfd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	mov	x8, sp
	add	x0, x8, #12
	bl	_sigemptyset
Lloh0:
	adrp	x8, _SIG_IGN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIG_IGN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	str	xzr, [sp]
Lloh3:
	adrp	x23, _SIGHUP@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SIGHUP@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	x1, sp
	add	x2, sp, #16
	bl	___libc_sigaction
	mov	x21, x0
	bl	_fork
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.1:
	cbnz	w0, LBB0_12
; %bb.2:
	bl	_setsid
	mov	x22, x0
Lloh5:
	adrp	x24, _errno@GOTPAGE
Lloh6:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
	ldr	w25, [x24]
	cmn	w21, #1
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x23]
	add	x1, sp, #16
	mov	x2, #0
	bl	___libc_sigaction
LBB0_4:
	cmn	w22, #1
	b.eq	LBB0_10
; %bb.5:
	cmn	w20, #1
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_fchdir
LBB0_7:
	cmn	w19, #1
	b.eq	LBB0_9
; %bb.8:
Lloh7:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	__dup2
Lloh10:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	__dup2
Lloh13:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	__dup2
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	str	w25, [x24]
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
	mov	w0, #0
	bl	__exit
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SIG_IGN,4,2                    ; @SIG_IGN
	.comm	_SIGHUP,4,2                     ; @SIGHUP
	.comm	_errno,4,2                      ; @errno
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
.subsections_via_symbols
