	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_redirect                       ## -- Begin function redirect
	.p2align	4, 0x90
_redirect:                              ## @redirect
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -64(%rbp)
	movw	$0, -56(%rbp)
	movq	_REDIR_BACKQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	movb	%al, -63(%rbp)
	movq	_REDIR_PUSH@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_empty_redirs@GOTPCREL(%rip), %r12
	incq	(%r12)
	testq	%rbx, %rbx
	je	LBB0_20
## %bb.2:
	movl	$32, %edi
	callq	_ckmalloc
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_EMPTY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%rax)
	movl	(%rcx), %ecx
	movd	%ecx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqu	%xmm0, 4(%rax)
	movdqu	%xmm0, 20(%rax)
	movl	%ecx, 36(%rax)
	movq	_fd0_redirected@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	(%r12), %rax
	decq	%rax
	movq	%rax, 24(%r15)
	movq	_redirlist@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 16(%r15)
	movq	%r15, (%rax)
	movq	$0, (%r12)
	jmp	LBB0_5
LBB0_3:
	testq	%rbx, %rbx
	je	LBB0_20
## %bb.4:
	xorl	%r15d, %r15d
LBB0_5:
	movq	_NTOFD@GOTPCREL(%rip), %r12
	jmp	LBB0_6
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	callq	_error
	movl	$-1, %eax
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15), %rcx
	movl	%eax, (%rcx,%r13,4)
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	leaq	-64(%rbp), %rsi
	callq	_openredirect
LBB0_19:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_20
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%rbx), %r13
	testq	%r13, %r13
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_fd0_redirected@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rbx), %rax
	cmpq	(%r12), %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_NFROMFD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%r13d, (%rbx)
	je	LBB0_19
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_REDIR_PUSH@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15), %rax
	movl	(%rax,%r13,4), %eax
	movq	_EMPTY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_F_DUPFD_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	movl	$10, %edx
	callq	_fcntl
	cmpl	$-1, %eax
	jne	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	$128, %edi
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_20:
	cmpb	$0, -63(%rbp)
	je	LBB0_22
## %bb.21:
	movq	_memout@GOTPCREL(%rip), %rax
	movq	_out1@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_22:
	cmpb	$0, -62(%rbp)
	je	LBB0_24
## %bb.23:
	movq	_memout@GOTPCREL(%rip), %rax
	movq	_out2@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_INTOFF,4,2                     ## @INTOFF
	.comm	_REDIR_BACKQ,4,2                ## @REDIR_BACKQ
	.comm	_REDIR_PUSH,4,2                 ## @REDIR_PUSH
	.comm	_empty_redirs,8,3               ## @empty_redirs
	.comm	_EMPTY,4,2                      ## @EMPTY
	.comm	_fd0_redirected,4,2             ## @fd0_redirected
	.comm	_redirlist,8,3                  ## @redirlist
	.comm	_NTOFD,8,3                      ## @NTOFD
	.comm	_NFROMFD,8,3                    ## @NFROMFD
	.comm	_F_DUPFD_CLOEXEC,4,2            ## @F_DUPFD_CLOEXEC
	.comm	_errno,4,2                      ## @errno
	.comm	_CLOSED,4,2                     ## @CLOSED
	.comm	_INTON,4,2                      ## @INTON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d: %s"

	.comm	_memout,4,2                     ## @memout
	.comm	_out1,8,3                       ## @out1
	.comm	_out2,8,3                       ## @out2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_redirect                       ; -- Begin function redirect
	.p2align	2
_redirect:                              ; @redirect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	str	xzr, [sp, #8]
Lloh3:
	adrp	x8, _REDIR_BACKQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REDIR_BACKQ@GOTPAGEOFF]
	strh	wzr, [sp, #16]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w1
	strb	w8, [sp, #9]
Lloh6:
	adrp	x24, _REDIR_PUSH@GOTPAGE
Lloh7:
	ldr	x24, [x24, _REDIR_PUSH@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh8:
	adrp	x25, _fd0_redirected@GOTPAGE
Lloh9:
	ldr	x25, [x25, _fd0_redirected@GOTPAGEOFF]
Lloh10:
	adrp	x26, _EMPTY@GOTPAGE
Lloh11:
	ldr	x26, [x26, _EMPTY@GOTPAGEOFF]
	tst	w8, w1
	b.eq	LBB0_3
; %bb.1:
Lloh12:
	adrp	x22, _empty_redirs@GOTPAGE
Lloh13:
	ldr	x22, [x22, _empty_redirs@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x8, x8, #1
	str	x8, [x22]
	cbz	x20, LBB0_19
; %bb.2:
	mov	w0, #32
	bl	_ckmalloc
	mov	x21, x0
	ldr	x8, [x0]
	ldr	w9, [x26]
	str	w9, [x8]
	ldr	w9, [x26]
	dup.4s	v0, w9
	stur	q0, [x8, #4]
	stur	q0, [x8, #20]
	str	w9, [x8, #36]
	ldr	w8, [x25]
	str	w8, [x0, #8]
	ldr	x8, [x22]
Lloh14:
	adrp	x9, _redirlist@GOTPAGE
Lloh15:
	ldr	x9, [x9, _redirlist@GOTPAGEOFF]
	sub	x8, x8, #1
	ldr	x10, [x9]
	stp	x10, x8, [x0, #16]
	str	x0, [x9]
	str	xzr, [x22]
	b	LBB0_5
LBB0_3:
	cbz	x20, LBB0_19
; %bb.4:
	mov	x21, #0
LBB0_5:
	mov	w27, #1
Lloh16:
	adrp	x28, _NTOFD@GOTPAGE
Lloh17:
	ldr	x28, [x28, _NTOFD@GOTPAGEOFF]
Lloh18:
	adrp	x22, _NFROMFD@GOTPAGE
Lloh19:
	ldr	x22, [x22, _NFROMFD@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:                                 ;   in Loop: Header=BB0_10 Depth=1
	bl	_strerror
	mov	x2, x0
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_error
	mov	w0, #-1
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x21]
	str	w0, [x8, x23, lsl #2]
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	bl	_openredirect
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x20, [x20, #16]
	cbz	x20, LBB0_19
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x23, [x20]
	cbnz	w23, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	str	w27, [x25]
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x20, #8]
	ldr	x9, [x28]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x20]
	cmp	w8, w23
	b.eq	LBB0_9
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x24]
	tst	w8, w19
	b.eq	LBB0_8
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x21]
	ldr	w8, [x8, x23, lsl #2]
	ldr	w9, [x26]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh22:
	adrp	x8, _F_DUPFD_CLOEXEC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _F_DUPFD_CLOEXEC@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x23
	mov	w2, #10
	bl	_fcntl
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.17:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh25:
	adrp	x8, _errno@GOTPAGE
Lloh26:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	cmp	w0, #128
	b.ne	LBB0_6
; %bb.18:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh28:
	adrp	x8, _CLOSED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CLOSED@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_19:
	ldrb	w9, [sp, #9]
Lloh31:
	adrp	x8, _memout@GOTPAGE
Lloh32:
	ldr	x8, [x8, _memout@GOTPAGEOFF]
	cbz	w9, LBB0_21
; %bb.20:
Lloh33:
	adrp	x9, _out1@GOTPAGE
Lloh34:
	ldr	x9, [x9, _out1@GOTPAGEOFF]
Lloh35:
	str	x8, [x9]
LBB0_21:
	ldrb	w9, [sp, #10]
	cbz	w9, LBB0_23
; %bb.22:
Lloh36:
	adrp	x9, _out2@GOTPAGE
Lloh37:
	ldr	x9, [x9, _out2@GOTPAGEOFF]
Lloh38:
	str	x8, [x9]
LBB0_23:
	ldr	x8, [sp, #24]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_INTOFF,4,2                     ; @INTOFF
	.comm	_REDIR_BACKQ,4,2                ; @REDIR_BACKQ
	.comm	_REDIR_PUSH,4,2                 ; @REDIR_PUSH
	.comm	_empty_redirs,8,3               ; @empty_redirs
	.comm	_EMPTY,4,2                      ; @EMPTY
	.comm	_fd0_redirected,4,2             ; @fd0_redirected
	.comm	_redirlist,8,3                  ; @redirlist
	.comm	_NTOFD,8,3                      ; @NTOFD
	.comm	_NFROMFD,8,3                    ; @NFROMFD
	.comm	_F_DUPFD_CLOEXEC,4,2            ; @F_DUPFD_CLOEXEC
	.comm	_errno,4,2                      ; @errno
	.comm	_CLOSED,4,2                     ; @CLOSED
	.comm	_INTON,4,2                      ; @INTON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d: %s"

	.comm	_memout,4,2                     ; @memout
	.comm	_out1,8,3                       ; @out1
	.comm	_out2,8,3                       ; @out2
.subsections_via_symbols
