	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_close_sbuf                     ## -- Begin function close_sbuf
	.p2align	4, 0x90
_close_sbuf:                            ## @close_sbuf
	.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
	movq	_sfp@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	callq	_fclose
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	movq	$0, (%rbx)
	movq	_sfn@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_unlink
LBB0_4:
	movq	_seek_write@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_sfseek@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_sfn@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%r14, %rdx
	movq	%rax, %rcx
	callq	_fprintf
	leaq	L_.str.1(%rip), %rax
	movq	_errmsg@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sfp,8,3                        ## @sfp
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %s\n"

	.comm	_sfn,8,3                        ## @sfn
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"cannot close temp file"

	.comm	_errmsg,8,3                     ## @errmsg
	.comm	_ERR,4,2                        ## @ERR
	.comm	_seek_write,8,3                 ## @seek_write
	.comm	_sfseek,8,3                     ## @sfseek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_close_sbuf                     ; -- Begin function close_sbuf
	.p2align	2
_close_sbuf:                            ; @close_sbuf
	.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
Lloh0:
	adrp	x19, _sfp@GOTPAGE
Lloh1:
	ldr	x19, [x19, _sfp@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_3
; %bb.1:
	bl	_fclose
	tbnz	x0, #63, LBB0_4
; %bb.2:
	str	xzr, [x19]
Lloh2:
	adrp	x8, _sfn@GOTPAGE
Lloh3:
	ldr	x8, [x8, _sfn@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
	bl	_unlink
LBB0_3:
	mov	w0, #0
Lloh5:
	adrp	x8, _seek_write@GOTPAGE
Lloh6:
	ldr	x8, [x8, _seek_write@GOTPAGEOFF]
Lloh7:
	str	xzr, [x8]
Lloh8:
	adrp	x8, _sfseek@GOTPAGE
Lloh9:
	ldr	x8, [x8, _sfseek@GOTPAGEOFF]
Lloh10:
	str	xzr, [x8]
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
Lloh14:
	adrp	x8, _sfn@GOTPAGE
Lloh15:
	ldr	x8, [x8, _sfn@GOTPAGEOFF]
Lloh16:
	ldr	x20, [x8]
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_fprintf
Lloh22:
	adrp	x8, _errmsg@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errmsg@GOTPAGEOFF]
Lloh24:
	adrp	x9, l_.str.1@PAGE
Lloh25:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh26:
	str	x9, [x8]
Lloh27:
	adrp	x8, _ERR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh26
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_sfp,8,3                        ; @sfp
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %s\n"

	.comm	_sfn,8,3                        ; @sfn
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"cannot close temp file"

	.comm	_errmsg,8,3                     ; @errmsg
	.comm	_ERR,4,2                        ; @ERR
	.comm	_seek_write,8,3                 ; @seek_write
	.comm	_sfseek,8,3                     ; @sfseek
.subsections_via_symbols
