	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function maybe_redirect_std_handle
_maybe_redirect_std_handle:             ## @maybe_redirect_std_handle
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%edx, %edx
	jne	LBB0_1
## %bb.2:
	movq	_OPEN_EXISTING@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_OPEN_ALWAYS@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %r13
	movq	_MAX_PATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_GetEnvironmentVariableW
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:
	cmpq	%rbx, %rax
	jge	LBB0_15
## %bb.5:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_SetEnvironmentVariableW
	leaq	l_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_wcscmp
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movq	_STD_ERROR_HANDLE@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	jne	LBB0_13
## %bb.9:
	leaq	l_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_wcscmp
	testl	%eax, %eax
	je	LBB0_10
LBB0_13:
	subq	$8, %rsp
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r13, %r8
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	pushq	$0
	callq	_CreateFileW
	addq	$16, %rsp
	movq	%rax, %rbx
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_15
## %bb.14:
	movq	_O_BINARY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	__open_osfhandle
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_SetStdHandle
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_dup2
	movl	%r14d, %edi
	callq	_close
	jmp	LBB0_15
LBB0_6:
	movl	%r12d, %edi
	callq	_close
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_GetStdHandle
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
LBB0_7:
	movq	%rax, %rdi
	callq	_CloseHandle
	jmp	LBB0_15
LBB0_10:
	movq	_STD_OUTPUT_HANDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_GetStdHandle
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r12d, %edi
	callq	_close
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_GetStdHandle
	cmpq	(%r14), %rax
	jne	LBB0_7
	jmp	LBB0_15
LBB0_12:
	movq	%rax, %rbx
	movq	_O_BINARY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	__open_osfhandle
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_SetStdHandle
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_dup2
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_OPEN_ALWAYS,8,3                ## @OPEN_ALWAYS
	.comm	_OPEN_EXISTING,8,3              ## @OPEN_EXISTING
	.comm	_MAX_PATH,4,2                   ## @MAX_PATH
	.section	__TEXT,__const
	.p2align	2                               ## @.str
l_.str:
	.long	111                             ## 0x6f
	.long	102                             ## 0x66
	.long	102                             ## 0x66
	.long	0                               ## 0x0

	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_STD_ERROR_HANDLE,8,3           ## @STD_ERROR_HANDLE
	.p2align	2                               ## @.str.1
l_.str.1:
	.long	50                              ## 0x32
	.long	62                              ## 0x3e
	.long	38                              ## 0x26
	.long	49                              ## 0x31
	.long	0                               ## 0x0

	.comm	_STD_OUTPUT_HANDLE,8,3          ## @STD_OUTPUT_HANDLE
	.comm	_O_BINARY,4,2                   ## @O_BINARY
	.no_dead_strip	_maybe_redirect_std_handle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function maybe_redirect_std_handle
_maybe_redirect_std_handle:             ; @maybe_redirect_std_handle
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x21, x4
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x25, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _OPEN_ALWAYS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OPEN_ALWAYS@GOTPAGEOFF]
Lloh5:
	adrp	x9, _OPEN_EXISTING@GOTPAGE
Lloh6:
	ldr	x9, [x9, _OPEN_EXISTING@GOTPAGEOFF]
	cmp	w2, #0
	csel	x8, x9, x8, eq
	ldr	x23, [x8]
Lloh7:
	adrp	x8, _MAX_PATH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX_PATH@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x24, x9, x8
	mov	sp, x24
	mov	x0, x24
	bl	_ARRAY_SIZE
	mov	x26, x0
	mov	x0, x25
	mov	x1, x24
	mov	x2, x26
	bl	_GetEnvironmentVariableW
	cmp	x0, #0
	ccmp	x0, x26, #0, ne
	b.ge	LBB0_11
; %bb.1:
	mov	x0, x25
	mov	x1, #0
	bl	_SetEnvironmentVariableW
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_wcscmp
	cbz	w0, LBB0_6
; %bb.2:
Lloh14:
	adrp	x8, _STD_ERROR_HANDLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STD_ERROR_HANDLE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_4
; %bb.3:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x24
	bl	_wcscmp
	cbz	w0, LBB0_8
LBB0_4:
	mov	x0, x24
	mov	x1, x22
	mov	w2, #0
	mov	x3, #0
	mov	x4, x23
	mov	x5, x21
	mov	x6, #0
	bl	_CreateFileW
Lloh19:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_11
; %bb.5:
	mov	x21, x0
Lloh22:
	adrp	x8, _O_BINARY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _O_BINARY@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	__open_osfhandle
	mov	x22, x0
	mov	x0, x20
	mov	x1, x21
	bl	_SetStdHandle
	mov	x0, x22
	mov	x1, x19
	bl	_dup2
	mov	x0, x22
	bl	_close
	b	LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_close
	mov	x0, x20
	bl	_GetStdHandle
Lloh25:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_11
LBB0_7:
	bl	_CloseHandle
	b	LBB0_11
LBB0_8:
Lloh28:
	adrp	x8, _STD_OUTPUT_HANDLE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _STD_OUTPUT_HANDLE@GOTPAGEOFF]
Lloh30:
	ldr	x0, [x8]
	bl	_GetStdHandle
Lloh31:
	adrp	x22, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh32:
	ldr	x22, [x22, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_close
	mov	x0, x20
	bl	_GetStdHandle
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_7
	b	LBB0_11
LBB0_10:
	mov	x21, x0
Lloh33:
	adrp	x8, _O_BINARY@GOTPAGE
Lloh34:
	ldr	x8, [x8, _O_BINARY@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	bl	__open_osfhandle
	mov	x22, x0
	mov	x0, x20
	mov	x1, x21
	bl	_SetStdHandle
	mov	x0, x22
	mov	x1, x19
	bl	_dup2
LBB0_11:
	ldur	x8, [x29, #-72]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_OPEN_ALWAYS,8,3                ; @OPEN_ALWAYS
	.comm	_OPEN_EXISTING,8,3              ; @OPEN_EXISTING
	.comm	_MAX_PATH,4,2                   ; @MAX_PATH
	.section	__TEXT,__const
	.p2align	2                               ; @.str
l_.str:
	.long	111                             ; 0x6f
	.long	102                             ; 0x66
	.long	102                             ; 0x66
	.long	0                               ; 0x0

	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_STD_ERROR_HANDLE,8,3           ; @STD_ERROR_HANDLE
	.p2align	2                               ; @.str.1
l_.str.1:
	.long	50                              ; 0x32
	.long	62                              ; 0x3e
	.long	38                              ; 0x26
	.long	49                              ; 0x31
	.long	0                               ; 0x0

	.comm	_STD_OUTPUT_HANDLE,8,3          ; @STD_OUTPUT_HANDLE
	.comm	_O_BINARY,4,2                   ; @O_BINARY
	.no_dead_strip	_maybe_redirect_std_handle
.subsections_via_symbols
