	.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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	callq	_fork
	testq	%rax, %rax
	js	LBB0_4
## %bb.1:
	jne	LBB0_9
## %bb.2:
	xorl	%edi, %edi
	callq	_umask
	xorl	%eax, %eax
	callq	_setsid
	testq	%rax, %rax
	js	LBB0_3
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	_chdir
	testq	%rax, %rax
	js	LBB0_3
## %bb.6:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%edx, %edx
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.7:
	movl	%eax, %ebx
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_dup2
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_dup2
	movq	_STDERR_FILENO@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_dup2
	cmpl	(%r14), %ebx
	jle	LBB0_8
## %bb.10:
	movl	%ebx, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rdi
	callq	_LOG_DEBUG
LBB0_4:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
LBB0_9:
	movq	%rax, %rbx
	movq	_conf@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_write_pid_file
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_printf
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_conf,4,2                       ## @conf
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Daemonized GoAccess: %d\n"

	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"/"

L_.str.4:                               ## @.str.4
	.asciz	"/dev/null"

	.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
	.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
	bl	_fork
	tbnz	x0, #63, LBB0_9
; %bb.1:
	mov	x19, x0
	cbnz	x0, LBB0_10
; %bb.2:
	mov	w0, #0
	bl	_umask
	bl	_setsid
	tbnz	x0, #63, LBB0_8
; %bb.3:
Lloh0:
	adrp	x0, l_.str.2@PAGE
Lloh1:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_chdir
	tbnz	x0, #63, LBB0_8
; %bb.4:
Lloh2:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x0, l_.str.4@PAGE
Lloh6:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	w2, #0
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.5:
	mov	x19, x0
Lloh7:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	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	x20, _STDERR_FILENO@GOTPAGE
Lloh14:
	ldr	x20, [x20, _STDERR_FILENO@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dup2
	ldr	w8, [x20]
	cmp	w19, w8
	b.le	LBB0_7
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_close
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	bl	_LOG_DEBUG
LBB0_9:
Lloh18:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_exit
LBB0_10:
Lloh21:
	adrp	x8, _conf@GOTPAGE
Lloh22:
	ldr	x8, [x8, _conf@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_write_pid_file
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_printf
Lloh26:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_conf,4,2                       ; @conf
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Daemonized GoAccess: %d\n"

	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"/"

l_.str.4:                               ; @.str.4
	.asciz	"/dev/null"

	.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
	.no_dead_strip	_daemonize
.subsections_via_symbols
