	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function main_detach
_main_detach:                           ## @main_detach
	.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	_getppid
	movq	_SIGUSR1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kill
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_log_err
LBB0_2:
	xorl	%eax, %eax
	callq	_setsid
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_log_err
LBB0_4:
	movq	__PATH_DEVNULL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	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), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_dup2
	movl	%ebx, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_5:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_log_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not signal main process: %m"

L_.str.1:                               ## @.str.1
	.asciz	"setsid() failed"

	.comm	__PATH_DEVNULL,4,2              ## @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.2:                               ## @.str.2
	.asciz	"Could not open %s"

	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
	.no_dead_strip	_main_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function main_detach
_main_detach:                           ; @main_detach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_getppid
Lloh0:
	adrp	x8, _SIGUSR1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kill
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log_err
LBB0_2:
	bl	_setsid
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_log_err
LBB0_4:
Lloh7:
	adrp	x20, __PATH_DEVNULL@GOTPAGE
Lloh8:
	ldr	x20, [x20, __PATH_DEVNULL@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh9:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.5:
	mov	x19, x0
Lloh12:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_dup2
Lloh15:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dup2
Lloh18:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dup2
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_close
LBB0_6:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_log_err
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not signal main process: %m"

l_.str.1:                               ; @.str.1
	.asciz	"setsid() failed"

	.comm	__PATH_DEVNULL,4,2              ; @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.2:                               ; @.str.2
	.asciz	"Could not open %s"

	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
	.no_dead_strip	_main_detach
.subsections_via_symbols
