	.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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_fork
	testq	%rax, %rax
	js	LBB0_3
## %bb.6:
	jne	LBB0_15
## %bb.7:
	xorl	%eax, %eax
	callq	_setsid
	xorl	%eax, %eax
	callq	_fork
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	jne	LBB0_15
## %bb.10:
	movq	_pidfile@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_13
## %bb.11:
	xorl	%eax, %eax
	callq	_remove_pidfile
	movq	(%rbx), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_getpid
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_fprintf
	movq	%rbx, %rdi
	callq	_fclose
LBB0_13:
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_close
	movl	$1, %edi
	callq	_close
	movl	$2, %edi
	callq	_close
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_dup2
	movl	%r15d, %edi
	movl	$1, %esi
	callq	_dup2
	movl	%r15d, %edi
	movl	$2, %esi
	callq	_dup2
	movl	%r14d, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	movl	$-1, %eax
	jmp	LBB0_5
LBB0_3:
	callq	_daemonize.cold.1
	jmp	LBB0_4
LBB0_8:
	callq	_daemonize.cold.2
	jmp	LBB0_4
LBB0_16:
	callq	_daemonize.cold.3
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_15:
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function daemonize.cold.1
_daemonize.cold.1:                      ## @daemonize.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	pushq	$-1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function daemonize.cold.2
_daemonize.cold.2:                      ## @daemonize.cold.2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	pushq	$-1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function daemonize.cold.3
_daemonize.cold.3:                      ## @daemonize.cold.3
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.5(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/null"

	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
L_.str.1:                               ## @.str.1
	.asciz	"open"

L_.str.2:                               ## @.str.2
	.asciz	"fork"

	.comm	_pidfile,8,3                    ## @pidfile
L_.str.3:                               ## @.str.3
	.asciz	"w"

L_.str.4:                               ## @.str.4
	.asciz	"%d\n"

L_.str.5:                               ## @.str.5
	.asciz	"fopen"

	.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
Lloh0:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	tbnz	w0, #31, LBB0_10
; %bb.1:
	mov	x19, x0
	bl	_fork
	tbnz	x0, #63, LBB0_12
; %bb.2:
	cbnz	x0, LBB0_11
; %bb.3:
	bl	_setsid
	bl	_fork
	tbnz	x0, #63, LBB0_13
; %bb.4:
	cbnz	x0, LBB0_11
; %bb.5:
Lloh5:
	adrp	x20, _pidfile@GOTPAGE
Lloh6:
	ldr	x20, [x20, _pidfile@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_8
; %bb.6:
	bl	_remove_pidfile
	ldr	x0, [x20]
Lloh7:
	adrp	x1, l_.str.3@PAGE
Lloh8:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_14
; %bb.7:
	mov	x20, x0
	bl	_getpid
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str.4@PAGE
Lloh10:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	mov	x0, x20
	bl	_fclose
LBB0_8:
	mov	w0, #0
	bl	_close
	mov	w0, #1
	bl	_close
	mov	w0, #2
	bl	_close
	mov	x0, x19
	mov	w1, #0
	bl	_dup2
	mov	x0, x19
	mov	w1, #1
	bl	_dup2
	mov	x0, x19
	mov	w1, #2
	bl	_dup2
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	mov	w0, #-1
	b	LBB0_9
LBB0_11:
	mov	w0, #0
	bl	_exit
LBB0_12:
	bl	_daemonize.cold.1
LBB0_13:
	bl	_daemonize.cold.2
LBB0_14:
	bl	_daemonize.cold.3
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function daemonize.cold.1
_daemonize.cold.1:                      ; @daemonize.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	mov	w0, #-1
	bl	_exit
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function daemonize.cold.2
_daemonize.cold.2:                      ; @daemonize.cold.2
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	mov	w0, #-1
	bl	_exit
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function daemonize.cold.3
_daemonize.cold.3:                      ; @daemonize.cold.3
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_perror
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/null"

	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
l_.str.1:                               ; @.str.1
	.asciz	"open"

l_.str.2:                               ; @.str.2
	.asciz	"fork"

	.comm	_pidfile,8,3                    ; @pidfile
l_.str.3:                               ; @.str.3
	.asciz	"w"

l_.str.4:                               ; @.str.4
	.asciz	"%d\n"

l_.str.5:                               ; @.str.5
	.asciz	"fopen"

	.no_dead_strip	_daemonize
.subsections_via_symbols
