	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reopen_tempfile                ## -- Begin function reopen_tempfile
	.p2align	4, 0x90
_reopen_tempfile:                       ## @reopen_tempfile
	.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
	callq	_is_tempfile_active
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpq	$0, (%rbx)
	js	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_BUG
LBB0_4:
	movl	8(%rbx), %edi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_TRUNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_open
	movq	%rax, (%rbx)
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_BUG
	cmpq	$0, (%rbx)
	jns	LBB0_3
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reopen_tempfile called for an inactive object"

L_.str.1:                               ## @.str.1
	.asciz	"reopen_tempfile called for an open object"

	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reopen_tempfile                ; -- Begin function reopen_tempfile
	.p2align	2
_reopen_tempfile:                       ; @reopen_tempfile
	.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
	bl	_is_tempfile_active
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_3
LBB0_2:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BUG
LBB0_3:
Lloh2:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
	ldr	w0, [x19, #8]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_open
	str	x0, [x19]
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BUG
	ldr	x8, [x19]
	tbz	x8, #63, LBB0_2
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reopen_tempfile called for an inactive object"

l_.str.1:                               ; @.str.1
	.asciz	"reopen_tempfile called for an open object"

	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
.subsections_via_symbols
