	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remote_close_fd
_remote_close_fd:                       ## @remote_close_fd
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movl	%edi, %ebx
	leaq	-56(%rbp), %rsi
	callq	_getregs
	movq	%r14, -40(%rbp)
	movl	$6, -32(%rbp)
	movl	%r15d, -28(%rbp)
	leaq	-40(%rbp), %r14
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_setregs
	movl	%ebx, %edi
	callq	_step
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_getregs
	movl	-32(%rbp), %edi
	testl	%edi, %edi
	js	LBB0_1
## %bb.3:
	leaq	-40(%rbp), %rsi
	movl	%ebx, %edi
	callq	_setregs
LBB0_2:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	callq	_remote_close_fd.cold.1
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function remote_close_fd.cold.1
_remote_close_fd.cold.1:                ## @remote_close_fd.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	negl	%edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	leaq	L_.str(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"remote close fd"

	.no_dead_strip	_remote_close_fd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remote_close_fd
_remote_close_fd:                       ; @remote_close_fd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x1, sp, #16
	bl	_getregs
	str	x20, [sp]
	mov	w8, #6
	stp	w8, w21, [sp, #8]
	mov	x1, sp
	mov	x0, x19
	bl	_setregs
	mov	x0, x19
	bl	_step
	mov	x1, sp
	mov	x0, x19
	bl	_getregs
	ldr	w0, [sp, #8]
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x1, sp
	mov	x0, x19
	bl	_setregs
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	bl	_remote_close_fd.cold.1
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function remote_close_fd.cold.1
_remote_close_fd.cold.1:                ; @remote_close_fd.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	neg	w8, w0
Lloh0:
	adrp	x9, _errno@GOTPAGE
Lloh1:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh2:
	str	w8, [x9]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"remote close fd"

	.no_dead_strip	_remote_close_fd
.subsections_via_symbols
