	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_docloseopen                    ## -- Begin function docloseopen
	.p2align	4, 0x90
_docloseopen:                           ## @docloseopen
	.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	_testcalls@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_simulatedopcount@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jle	LBB0_6
## %bb.1:
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_prt
LBB0_3:
	movq	_fd@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_close
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_prterr
	movl	$180, %edi
	callq	_report_failure
LBB0_5:
	movq	_fname@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_open
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	_prterr
	movl	$181, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_report_failure                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_testcalls,8,3                  ## @testcalls
	.comm	_simulatedopcount,8,3           ## @simulatedopcount
	.comm	_debug,8,3                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%lu close/open\n"

	.comm	_fd,8,3                         ## @fd
L_.str.1:                               ## @.str.1
	.asciz	"docloseopen: close"

	.comm	_fname,4,2                      ## @fname
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.2:                               ## @.str.2
	.asciz	"docloseopen: open"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_docloseopen                    ; -- Begin function docloseopen
	.p2align	2
_docloseopen:                           ; @docloseopen
	.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	x8, _testcalls@GOTPAGE
Lloh1:
	ldr	x8, [x8, _testcalls@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
Lloh3:
	adrp	x8, _simulatedopcount@GOTPAGE
Lloh4:
	ldr	x8, [x8, _simulatedopcount@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x1, x8
	b.le	LBB0_6
; %bb.1:
Lloh6:
	adrp	x8, _debug@GOTPAGE
Lloh7:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_prt
LBB0_3:
Lloh11:
	adrp	x19, _fd@GOTPAGE
Lloh12:
	ldr	x19, [x19, _fd@GOTPAGEOFF]
	ldr	x0, [x19]
	bl	_close
	cbz	x0, LBB0_5
; %bb.4:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_prterr
	mov	w0, #180
	bl	_report_failure
LBB0_5:
Lloh15:
	adrp	x8, _fname@GOTPAGE
Lloh16:
	ldr	x8, [x8, _fname@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_open
	str	x0, [x19]
	tbnz	x0, #63, LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_prterr
	mov	w0, #181
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_report_failure
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_testcalls,8,3                  ; @testcalls
	.comm	_simulatedopcount,8,3           ; @simulatedopcount
	.comm	_debug,8,3                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%lu close/open\n"

	.comm	_fd,8,3                         ; @fd
l_.str.1:                               ; @.str.1
	.asciz	"docloseopen: close"

	.comm	_fname,4,2                      ; @fname
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.2:                               ; @.str.2
	.asciz	"docloseopen: open"

.subsections_via_symbols
