	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_trace_close                    ## -- Begin function trace_close
	.p2align	4, 0x90
_trace_close:                           ## @trace_close
	.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
	movl	%edi, %ebx
	movq	_stdout@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_fflush
	movq	_stderr@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_fflush
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.1:
	movq	_ftrace@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.2:
	cmpq	(%r14), %rdi
	je	LBB0_4
## %bb.3:
	callq	_fclose
LBB0_4:
	movq	$0, (%rbx)
	movq	__PATH_DEVNULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_13
## %bb.5:
	movl	%eax, %ebx
	movq	_STDIN_FILENO@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_dup2
LBB0_7:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_dup2
LBB0_9:
	movq	_STDERR_FILENO@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_dup2
LBB0_11:
	movl	%ebx, %edi
	callq	_close
LBB0_12:
	movq	_lastlog_time@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stdout,8,3                     ## @stdout
	.comm	_stderr,8,3                     ## @stderr
	.comm	_ftrace,8,3                     ## @ftrace
	.comm	__PATH_DEVNULL,4,2              ## @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
	.comm	_lastlog_time,8,3               ## @lastlog_time
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_trace_close                    ; -- Begin function trace_close
	.p2align	2
_trace_close:                           ; @trace_close
	.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	x20, _stdout@GOTPAGE
Lloh1:
	ldr	x20, [x20, _stdout@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_fflush
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
	bl	_fflush
	cbz	w19, LBB0_12
; %bb.1:
Lloh5:
	adrp	x19, _ftrace@GOTPAGE
Lloh6:
	ldr	x19, [x19, _ftrace@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_12
; %bb.2:
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	bl	_fclose
LBB0_4:
	str	xzr, [x19]
Lloh7:
	adrp	x8, __PATH_DEVNULL@GOTPAGE
Lloh8:
	ldr	x8, [x8, __PATH_DEVNULL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_13
; %bb.5:
	mov	x19, x0
Lloh13:
	adrp	x20, _STDIN_FILENO@GOTPAGE
Lloh14:
	ldr	x20, [x20, _STDIN_FILENO@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_isatty
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dup2
LBB0_7:
Lloh15:
	adrp	x20, _STDOUT_FILENO@GOTPAGE
Lloh16:
	ldr	x20, [x20, _STDOUT_FILENO@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_isatty
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dup2
LBB0_9:
Lloh17:
	adrp	x20, _STDERR_FILENO@GOTPAGE
Lloh18:
	ldr	x20, [x20, _STDERR_FILENO@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_isatty
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dup2
LBB0_11:
	mov	x0, x19
	bl	_close
LBB0_12:
Lloh19:
	adrp	x8, _lastlog_time@GOTPAGE
Lloh20:
	ldr	x8, [x8, _lastlog_time@GOTPAGEOFF]
Lloh21:
	str	xzr, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_stdout,8,3                     ; @stdout
	.comm	_stderr,8,3                     ; @stderr
	.comm	_ftrace,8,3                     ; @ftrace
	.comm	__PATH_DEVNULL,4,2              ; @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
	.comm	_lastlog_time,8,3               ; @lastlog_time
.subsections_via_symbols
