	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_redirections
_handle_redirections:                   ## @handle_redirections
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_saved_filename@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.13:
	movq	_gdb_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fprintf_unfiltered             ## TAILCALL
LBB0_1:
	movl	%edi, %r14d
	movq	_logging_filename@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	_logging_overwrite@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	callq	_gdb_fopen
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str.3(%rip), %rdi
	callq	_perror_with_name
LBB0_3:
	movq	_logging_redirect@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.8:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.9:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_10
LBB0_4:
	movq	_gdb_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_tee_file_new
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rdi
	callq	_perror_with_name
LBB0_6:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.7:
	leaq	L_.str.4(%rip), %rsi
LBB0_10:
	movq	_gdb_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	(%r12), %rdx
	callq	_fprintf_unfiltered
LBB0_11:
	movq	(%r12), %rdi
	callq	_xstrdup
	movq	%rax, (%r15)
	movq	_gdb_stdout@GOTPCREL(%rip), %r8
	movq	(%r8), %rcx
	movq	_saved_output@GOTPCREL(%rip), %rdx
	movq	%rcx, 24(%rdx)
	movq	_gdb_stderr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	%rsi, 16(%rdx)
	movq	_gdb_stdlog@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rdi
	movq	%rdi, 8(%rdx)
	movq	_gdb_stdtarg@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rax
	movq	%rax, (%rdx)
	movq	%rbx, (%r8)
	movq	%rbx, (%rcx)
	movq	%rbx, (%rsi)
	movq	%rbx, (%rdi)
	movq	_uiout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_ui_out_redirect
	testq	%rax, %rax
	js	LBB0_14
## %bb.12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	leaq	L_.str.6(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_warning                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_saved_filename,8,3             ## @saved_filename
	.comm	_gdb_stdout,8,3                 ## @gdb_stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Already logging to %s.\n"

	.comm	_logging_filename,8,3           ## @logging_filename
	.comm	_logging_overwrite,8,3          ## @logging_overwrite
L_.str.1:                               ## @.str.1
	.asciz	"w"

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

L_.str.3:                               ## @.str.3
	.asciz	"set logging"

	.comm	_logging_redirect,4,2           ## @logging_redirect
L_.str.4:                               ## @.str.4
	.asciz	"Copying output to %s.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Redirecting output to %s.\n"

	.comm	_saved_output,32,3              ## @saved_output
	.comm	_gdb_stderr,8,3                 ## @gdb_stderr
	.comm	_gdb_stdlog,8,3                 ## @gdb_stdlog
	.comm	_gdb_stdtarg,8,3                ## @gdb_stdtarg
	.comm	_uiout,4,2                      ## @uiout
L_.str.6:                               ## @.str.6
	.asciz	"Current output protocol does not support redirection"

	.no_dead_strip	_handle_redirections
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_redirections
_handle_redirections:                   ; @handle_redirections
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x21, _saved_filename@GOTPAGE
Lloh1:
	ldr	x21, [x21, _saved_filename@GOTPAGEOFF]
	ldr	x2, [x21]
	cbz	x2, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _gdb_stdout@GOTPAGE
Lloh3:
	ldr	x8, [x8, _gdb_stdout@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_fprintf_unfiltered
LBB0_2:
	mov	x20, x0
Lloh7:
	adrp	x22, _logging_filename@GOTPAGE
Lloh8:
	ldr	x22, [x22, _logging_filename@GOTPAGEOFF]
	ldr	x0, [x22]
Lloh9:
	adrp	x8, _logging_overwrite@GOTPAGE
Lloh10:
	ldr	x8, [x8, _logging_overwrite@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, l_.str.1@PAGE
Lloh13:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh14:
	adrp	x10, l_.str.2@PAGE
Lloh15:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x1, x10, x9, eq
	bl	_gdb_fopen
	mov	x19, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror_with_name
LBB0_4:
Lloh18:
	adrp	x8, _logging_redirect@GOTPAGE
Lloh19:
	ldr	x8, [x8, _logging_redirect@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cbz	w8, LBB0_7
; %bb.5:
	cbz	w20, LBB0_12
; %bb.6:
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_11
LBB0_7:
Lloh23:
	adrp	x8, _gdb_stdout@GOTPAGE
Lloh24:
	ldr	x8, [x8, _gdb_stdout@GOTPAGEOFF]
Lloh25:
	ldr	x0, [x8]
	mov	w1, #0
	mov	x2, x19
	mov	w3, #1
	bl	_tee_file_new
	mov	x19, x0
	cbnz	x0, LBB0_9
; %bb.8:
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror_with_name
LBB0_9:
	cbz	w20, LBB0_12
; %bb.10:
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_11:
Lloh30:
	adrp	x8, _gdb_stdout@GOTPAGE
Lloh31:
	ldr	x8, [x8, _gdb_stdout@GOTPAGEOFF]
Lloh32:
	ldr	x0, [x8]
	ldr	x2, [x22]
	bl	_fprintf_unfiltered
LBB0_12:
	ldr	x0, [x22]
	bl	_xstrdup
Lloh33:
	adrp	x8, _gdb_stdout@GOTPAGE
Lloh34:
	ldr	x8, [x8, _gdb_stdout@GOTPAGEOFF]
	str	x0, [x21]
	ldr	x9, [x8]
Lloh35:
	adrp	x10, _saved_output@GOTPAGE
Lloh36:
	ldr	x10, [x10, _saved_output@GOTPAGEOFF]
Lloh37:
	adrp	x11, _gdb_stderr@GOTPAGE
Lloh38:
	ldr	x11, [x11, _gdb_stderr@GOTPAGEOFF]
	ldr	x12, [x11]
	stp	x12, x9, [x10, #16]
Lloh39:
	adrp	x9, _gdb_stdlog@GOTPAGE
Lloh40:
	ldr	x9, [x9, _gdb_stdlog@GOTPAGEOFF]
	ldr	x12, [x9]
Lloh41:
	adrp	x13, _gdb_stdtarg@GOTPAGE
Lloh42:
	ldr	x13, [x13, _gdb_stdtarg@GOTPAGEOFF]
	ldr	x14, [x13]
	stp	x14, x12, [x10]
	str	x19, [x8]
	str	x19, [x11]
	str	x19, [x9]
	str	x19, [x13]
Lloh43:
	adrp	x8, _uiout@GOTPAGE
Lloh44:
	ldr	x8, [x8, _uiout@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_ui_out_redirect
	tbnz	x0, #63, LBB0_14
; %bb.13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh46:
	adrp	x0, l_.str.6@PAGE
Lloh47:
	add	x0, x0, l_.str.6@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_warning
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_saved_filename,8,3             ; @saved_filename
	.comm	_gdb_stdout,8,3                 ; @gdb_stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Already logging to %s.\n"

	.comm	_logging_filename,8,3           ; @logging_filename
	.comm	_logging_overwrite,8,3          ; @logging_overwrite
l_.str.1:                               ; @.str.1
	.asciz	"w"

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

l_.str.3:                               ; @.str.3
	.asciz	"set logging"

	.comm	_logging_redirect,4,2           ; @logging_redirect
l_.str.4:                               ; @.str.4
	.asciz	"Copying output to %s.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Redirecting output to %s.\n"

	.comm	_saved_output,32,3              ; @saved_output
	.comm	_gdb_stderr,8,3                 ; @gdb_stderr
	.comm	_gdb_stdlog,8,3                 ; @gdb_stdlog
	.comm	_gdb_stdtarg,8,3                ; @gdb_stdtarg
	.comm	_uiout,4,2                      ; @uiout
l_.str.6:                               ; @.str.6
	.asciz	"Current output protocol does not support redirection"

	.no_dead_strip	_handle_redirections
.subsections_via_symbols
