	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function io_close_src
_io_close_src:                          ## @io_close_src
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_restore_stdin_flags@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_3
## %bb.1:
	movl	(%rbx), %eax
	movq	_STDIN_FILENO@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	cmpl	(%r12), %eax
	sete	%dil
	callq	_assert
	movl	$0, (%r15)
	movl	(%r12), %edi
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_stdin_flags@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_fcntl
	cmpl	$-1, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_message_error
LBB0_3:
	movl	(%rbx), %edi
	cmpl	$-1, %edi
	je	LBB0_7
## %bb.4:
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	je	LBB0_7
## %bb.5:
	callq	_close
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	movq	_opt_keep_original@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_7
## %bb.8:
	movl	8(%rbx), %edi
	addq	$4, %rbx
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_io_unlink                      ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_restore_stdin_flags,4,2        ## @restore_stdin_flags
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_stdin_flags,4,2                ## @stdin_flags
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error restoring the status flags to standard input: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_opt_keep_original,4,2          ## @opt_keep_original
	.no_dead_strip	_io_close_src
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function io_close_src
_io_close_src:                          ; @io_close_src
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _restore_stdin_flags@GOTPAGE
Lloh1:
	ldr	x21, [x21, _restore_stdin_flags@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x22, _STDIN_FILENO@GOTPAGE
Lloh3:
	ldr	x22, [x22, _STDIN_FILENO@GOTPAGEOFF]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w8, [x19]
	ldr	w9, [x22]
	cmp	w8, w9
	cset	w0, eq
	bl	_assert
	str	wzr, [x21]
	ldr	w0, [x22]
Lloh4:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _stdin_flags@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stdin_flags@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	bl	_fcntl
	cmn	w0, #1
	b.ne	LBB0_3
; %bb.2:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x21, x0
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_strerror
	mov	x1, x0
	mov	x0, x21
	bl	_message_error
LBB0_3:
	ldr	w0, [x19]
	ldr	w8, [x22]
	cmn	w0, #1
	ccmp	w0, w8, #4, ne
	b.eq	LBB0_7
; %bb.4:
	bl	_close
	cbz	w20, LBB0_7
; %bb.5:
Lloh15:
	adrp	x8, _opt_keep_original@GOTPAGE
Lloh16:
	ldr	x8, [x8, _opt_keep_original@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cbnz	w8, LBB0_7
; %bb.6:
	ldr	w0, [x19, #8]
	add	x1, x19, #4
	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	_io_unlink
LBB0_7:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_restore_stdin_flags,4,2        ; @restore_stdin_flags
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_stdin_flags,4,2                ; @stdin_flags
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error restoring the status flags to standard input: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_opt_keep_original,4,2          ; @opt_keep_original
	.no_dead_strip	_io_close_src
.subsections_via_symbols
