	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_flopen_open               ## -- Begin function test_flopen_open
	.p2align	4, 0x90
_test_flopen_open:                      ## @test_flopen_open
	.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	_O_RDWR@GOTPCREL(%rip), %rbx
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	movl	$416, %edx                      ## imm = 0x1A0
	callq	_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %edi
	callq	_close
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_flopen
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%eax, %edi
	callq	_close
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movq	%rax, %rbx
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_unlink
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test_flopen_open"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_flopen_open               ; -- Begin function test_flopen_open
	.p2align	2
_test_flopen_open:                      ; @test_flopen_open
	.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, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x19, [x19, _O_RDWR@GOTPAGEOFF]
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #416
	bl	_open
	tbnz	w0, #31, LBB0_3
; %bb.1:
	bl	_close
	ldr	w1, [x19]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_flopen
	tbnz	w0, #31, LBB0_3
; %bb.2:
	bl	_close
	mov	x19, #0
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_strerror
	mov	x19, x0
LBB0_4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_unlink
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test_flopen_open"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
