	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function redirect_fd_stream_init
_redirect_fd_stream_init:               ## @redirect_fd_stream_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %eax
	cmpl	$128, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_2
## %bb.4:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_5
LBB0_3:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
LBB0_5:
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	movl	%eax, (%rbx)
	jmp	LBB0_6
LBB0_2:
	movl	(%rbx), %eax
LBB0_6:
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_ATF_REQUIRE
	leaq	12(%rbx), %rdi
	movq	%rdi, 16(%rbx)
	movl	(%rbx), %esi
	callq	_atf_process_stream_init_redirect_fd
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_RE                             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stdout"

	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
L_.str.1:                               ## @.str.1
	.asciz	"stderr"

	.comm	_UNREACHABLE,4,2                ## @UNREACHABLE
	.no_dead_strip	_redirect_fd_stream_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function redirect_fd_stream_init
_redirect_fd_stream_init:               ; @redirect_fd_stream_init
	.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
	ldr	w8, [x0, #8]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_4
; %bb.2:
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_TRUNC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w8, w9
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w2, #420
	bl	_open
	str	w0, [x19]
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w8, w9
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #420
	bl	_open
	str	w0, [x19]
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19]
LBB0_5:
	cmn	w0, #1
	cset	w0, ne
	bl	_ATF_REQUIRE
	add	x0, x19, #12
	str	x0, [x19, #16]
	ldr	w1, [x19]
	bl	_atf_process_stream_init_redirect_fd
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_RE
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stdout"

	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
l_.str.1:                               ; @.str.1
	.asciz	"stderr"

	.comm	_UNREACHABLE,4,2                ; @UNREACHABLE
	.no_dead_strip	_redirect_fd_stream_init
.subsections_via_symbols
