	.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	%edi, %r14d
	movl	$-1, %ebx
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	testl	%r14d, %r14d
	je	LBB0_4
LBB0_3:
	movl	$-1, %edi
	movl	%ebx, %esi
	callq	_daemonfd
	movl	%eax, %r14d
	jmp	LBB0_6
LBB0_1:
	movq	__PATH_DEVNULL@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	__open
	movl	%eax, %ebx
	testl	%r14d, %r14d
	jne	LBB0_3
LBB0_4:
	movq	_O_EXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	__open
	movl	%eax, %r15d
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_daemonfd
	movl	%eax, %r14d
	cmpl	$-1, %r15d
	je	LBB0_6
## %bb.5:
	movl	%r15d, %edi
	callq	__close
LBB0_6:
	cmpl	$3, %ebx
	jl	LBB0_8
## %bb.7:
	movl	%ebx, %edi
	callq	__close
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__PATH_DEVNULL,4,2              ## @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

	.comm	_O_EXEC,4,2                     ## @O_EXEC
.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:
	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	x20, x0
	cbz	w1, LBB0_3
; %bb.1:
	mov	w19, #-1
	cbz	w20, LBB0_4
LBB0_2:
	mov	w0, #-1
	mov	x1, x19
	bl	_daemonfd
	mov	x20, x0
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, __PATH_DEVNULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, __PATH_DEVNULL@GOTPAGEOFF]
Lloh2:
	ldrsw	x0, [x8]
Lloh3:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	str	xzr, [sp]
	bl	__open
	mov	x19, x0
	cbnz	w20, LBB0_2
LBB0_4:
Lloh6:
	adrp	x8, _O_EXEC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _O_EXEC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	__open
	mov	x21, x0
	mov	x1, x19
	bl	_daemonfd
	mov	x20, x0
	cmn	w21, #1
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x21
	bl	__close
LBB0_6:
	cmp	w19, #3
	b.lt	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	__close
LBB0_8:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	__PATH_DEVNULL,4,2              ; @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

	.comm	_O_EXEC,4,2                     ; @O_EXEC
.subsections_via_symbols
