	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_rdi_close
_arm_rdi_close:                         ## @arm_rdi_close
	.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	_closed_already@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_1
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	callq	_angel_RDI_close
	movq	_RDIError_NoError@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %edi
	callq	_rdi_error_message
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printf_filtered
LBB0_3:
	movl	$1, (%rbx)
	movq	_null_ptid@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_inferior_ptid@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_Adp_CloseDevice
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_generic_mourn_inferior         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_closed_already,4,2             ## @closed_already
	.comm	_RDIError_NoError,4,2           ## @RDIError_NoError
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RDI_close: %s\n"

	.comm	_null_ptid,4,2                  ## @null_ptid
	.comm	_inferior_ptid,4,2              ## @inferior_ptid
	.no_dead_strip	_arm_rdi_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_rdi_close
_arm_rdi_close:                         ; @arm_rdi_close
	.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, _closed_already@GOTPAGE
Lloh1:
	ldr	x19, [x19, _closed_already@GOTPAGEOFF]
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	bl	_angel_RDI_close
Lloh2:
	adrp	x8, _RDIError_NoError@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RDIError_NoError@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_4
; %bb.3:
	bl	_rdi_error_message
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf_filtered
LBB0_4:
	mov	w8, #1
	str	w8, [x19]
Lloh7:
	adrp	x8, _null_ptid@GOTPAGE
Lloh8:
	ldr	x8, [x8, _null_ptid@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _inferior_ptid@GOTPAGE
Lloh11:
	ldr	x9, [x9, _inferior_ptid@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
	bl	_Adp_CloseDevice
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_generic_mourn_inferior
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_closed_already,4,2             ; @closed_already
	.comm	_RDIError_NoError,4,2           ; @RDIError_NoError
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RDI_close: %s\n"

	.comm	_null_ptid,4,2                  ; @null_ptid
	.comm	_inferior_ptid,4,2              ; @inferior_ptid
	.no_dead_strip	_arm_rdi_close
.subsections_via_symbols
