	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_log_redirect_stderr_to         ## -- Begin function log_redirect_stderr_to
	.p2align	4, 0x90
_log_redirect_stderr_to:                ## @log_redirect_stderr_to
	.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
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rdi, %rbx
	movq	_O_APPEND@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$384, %edx                      ## imm = 0x180
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.1:
	movq	_log_stderr_fd@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_APPEND,4,2                   ## @O_APPEND
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't open logfile %s: %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_log_stderr_fd,4,2              ## @log_stderr_fd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_log_redirect_stderr_to         ; -- Begin function log_redirect_stderr_to
	.p2align	2
_log_redirect_stderr_to:                ; @log_redirect_stderr_to
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _O_APPEND@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_APPEND@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w2, #384
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _log_stderr_fd@GOTPAGE
Lloh10:
	ldr	x8, [x8, _log_stderr_fd@GOTPAGEOFF]
Lloh11:
	str	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_APPEND,4,2                   ; @O_APPEND
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't open logfile %s: %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_log_stderr_fd,4,2              ; @log_stderr_fd
.subsections_via_symbols
