	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_sbuf                      ## -- Begin function open_sbuf
	.p2align	4, 0x90
_open_sbuf:                             ## @open_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_newline_added@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_isbinary@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	$63, %edi
	callq	_umask
	movl	%eax, %r14d
	movq	_sfn@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movl	(%r15), %edi
	callq	_mkstemp
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_fdopen
	movq	_sfp@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movl	%r14d, %edi
	callq	_umask
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_2:
	movl	%ebx, %edi
	callq	_close
LBB0_3:
	movl	(%r15), %edi
	callq	_perror
	leaq	L_.str.2(%rip), %rax
	movq	_errmsg@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	%r14d, %edi
	callq	_umask
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_newline_added,8,3              ## @newline_added
	.comm	_isbinary,8,3                   ## @isbinary
	.comm	_sfn,4,2                        ## @sfn
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/tmp/ed.XXXXXX"

L_.str.1:                               ## @.str.1
	.asciz	"w+"

	.comm	_sfp,8,3                        ## @sfp
L_.str.2:                               ## @.str.2
	.asciz	"cannot open temp file"

	.comm	_errmsg,8,3                     ## @errmsg
	.comm	_ERR,4,2                        ## @ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_sbuf                      ; -- Begin function open_sbuf
	.p2align	2
_open_sbuf:                             ; @open_sbuf
	.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
Lloh0:
	adrp	x8, _newline_added@GOTPAGE
Lloh1:
	ldr	x8, [x8, _newline_added@GOTPAGEOFF]
Lloh2:
	str	xzr, [x8]
Lloh3:
	adrp	x8, _isbinary@GOTPAGE
Lloh4:
	ldr	x8, [x8, _isbinary@GOTPAGEOFF]
Lloh5:
	str	xzr, [x8]
	mov	w0, #63
	bl	_umask
	mov	x19, x0
Lloh6:
	adrp	x21, _sfn@GOTPAGE
Lloh7:
	ldr	x21, [x21, _sfn@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	ldr	w0, [x21]
	bl	_mkstemp
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x20, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fdopen
Lloh12:
	adrp	x8, _sfp@GOTPAGE
Lloh13:
	ldr	x8, [x8, _sfp@GOTPAGEOFF]
Lloh14:
	str	x0, [x8]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_umask
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_close
LBB0_4:
	ldr	w0, [x21]
	bl	_perror
Lloh15:
	adrp	x8, _errmsg@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errmsg@GOTPAGEOFF]
Lloh17:
	adrp	x9, l_.str.2@PAGE
Lloh18:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh19:
	str	x9, [x8]
	mov	x0, x19
	bl	_umask
Lloh20:
	adrp	x8, _ERR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
LBB0_5:
	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 AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_newline_added,8,3              ; @newline_added
	.comm	_isbinary,8,3                   ; @isbinary
	.comm	_sfn,4,2                        ; @sfn
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/tmp/ed.XXXXXX"

l_.str.1:                               ; @.str.1
	.asciz	"w+"

	.comm	_sfp,8,3                        ; @sfp
l_.str.2:                               ; @.str.2
	.asciz	"cannot open temp file"

	.comm	_errmsg,8,3                     ; @errmsg
	.comm	_ERR,4,2                        ; @ERR
.subsections_via_symbols
