	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function new_connection
_new_connection:                        ## @new_connection
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	_SOCK_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept4
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.3:
	movl	%eax, %ebx
	movl	$1, -36(%rbp)
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_NOSIGPIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %r8d
	callq	_setsockopt
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movq	_gdb_lock@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_lock
	movq	_cur_fd@GOTPCREL(%rip), %r15
	cmpl	$-1, (%r15)
	je	LBB0_7
## %bb.6:
	movl	%ebx, %edi
	callq	_close
	leaq	L_.str.2(%rip), %rdi
	callq	_warnx
LBB0_7:
	movq	_EVF_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_gdb_readable@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	callq	_mevent_add
	movq	_read_event@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	_EVF_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_gdb_writable@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	callq	_mevent_add
	movq	_write_event@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jne	LBB0_14
## %bb.11:
	testq	%r14, %r14
	je	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_13:
	movq	(%r12), %rdi
	callq	_mevent_delete_close
	movq	$0, (%r12)
LBB0_14:
	movl	%ebx, (%r15)
	movq	_cur_vcpu@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_stepping_vcpu@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	movq	_stopped_vcpu@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	movq	_stop_pending@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_first_stop@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	xorl	%eax, %eax
	callq	_gdb_suspend_vcpus
	jmp	LBB0_15
LBB0_1:
	testq	%r14, %r14
	je	LBB0_16
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_err                            ## TAILCALL
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
	movl	%ebx, %edi
	callq	_close
	jmp	LBB0_16
LBB0_8:
	testq	%r14, %r14
	je	LBB0_15
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_15:
	movq	_gdb_lock@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_unlock
LBB0_16:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_NONBLOCK,4,2              ## @SOCK_NONBLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed accepting initial GDB connection"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_NOSIGPIPE,4,2               ## @SO_NOSIGPIPE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to disable SIGPIPE for GDB connection"

	.comm	_gdb_lock,4,2                   ## @gdb_lock
	.comm	_cur_fd,4,2                     ## @cur_fd
L_.str.2:                               ## @.str.2
	.asciz	"Ignoring additional GDB connection."

	.comm	_EVF_READ,4,2                   ## @EVF_READ
	.comm	_gdb_readable,4,2               ## @gdb_readable
	.comm	_read_event,8,3                 ## @read_event
L_.str.3:                               ## @.str.3
	.asciz	"Failed to setup initial GDB connection"

	.comm	_EVF_WRITE,4,2                  ## @EVF_WRITE
	.comm	_gdb_writable,4,2               ## @gdb_writable
	.comm	_write_event,8,3                ## @write_event
	.comm	_cur_vcpu,8,3                   ## @cur_vcpu
	.comm	_stepping_vcpu,4,2              ## @stepping_vcpu
	.comm	_stopped_vcpu,4,2               ## @stopped_vcpu
	.comm	_stop_pending,4,2               ## @stop_pending
	.comm	_first_stop,4,2                 ## @first_stop
	.no_dead_strip	_new_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function new_connection
_new_connection:                        ; @new_connection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _SOCK_NONBLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOCK_NONBLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x1, #0
	mov	x2, #0
	bl	_accept4
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.1:
	mov	x19, x0
	mov	w8, #1
	str	w8, [sp, #12]
Lloh3:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SO_NOSIGPIPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SO_NOSIGPIPE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	w4, #4
	bl	_setsockopt
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.2:
Lloh9:
	adrp	x0, _gdb_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _gdb_lock@GOTPAGEOFF]
	bl	_pthread_mutex_lock
Lloh11:
	adrp	x21, _cur_fd@GOTPAGE
Lloh12:
	ldr	x21, [x21, _cur_fd@GOTPAGEOFF]
	ldr	w8, [x21]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_close
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
LBB0_4:
Lloh15:
	adrp	x8, _EVF_READ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EVF_READ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _gdb_readable@GOTPAGE
Lloh19:
	ldr	x8, [x8, _gdb_readable@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, #0
	bl	_mevent_add
Lloh21:
	adrp	x22, _read_event@GOTPAGE
Lloh22:
	ldr	x22, [x22, _read_event@GOTPAGEOFF]
	str	x0, [x22]
	cbz	x0, LBB0_13
; %bb.5:
Lloh23:
	adrp	x8, _EVF_WRITE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EVF_WRITE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _gdb_writable@GOTPAGE
Lloh27:
	ldr	x8, [x8, _gdb_writable@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, #0
	bl	_mevent_add
Lloh29:
	adrp	x8, _write_event@GOTPAGE
Lloh30:
	ldr	x8, [x8, _write_event@GOTPAGEOFF]
Lloh31:
	str	x0, [x8]
	cbnz	x0, LBB0_9
; %bb.6:
	cbz	x20, LBB0_8
; %bb.7:
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
	ldr	x0, [x22]
	bl	_mevent_delete_close
	str	xzr, [x22]
LBB0_9:
	str	w19, [x21]
Lloh34:
	adrp	x8, _cur_vcpu@GOTPAGE
Lloh35:
	ldr	x8, [x8, _cur_vcpu@GOTPAGEOFF]
Lloh36:
	str	xzr, [x8]
Lloh37:
	adrp	x8, _stepping_vcpu@GOTPAGE
Lloh38:
	ldr	x8, [x8, _stepping_vcpu@GOTPAGEOFF]
	mov	w9, #-1
Lloh39:
	str	w9, [x8]
Lloh40:
	adrp	x8, _stopped_vcpu@GOTPAGE
Lloh41:
	ldr	x8, [x8, _stopped_vcpu@GOTPAGEOFF]
Lloh42:
	adrp	x10, _stop_pending@GOTPAGE
Lloh43:
	ldr	x10, [x10, _stop_pending@GOTPAGEOFF]
Lloh44:
	str	w9, [x8]
Lloh45:
	str	wzr, [x10]
Lloh46:
	adrp	x8, _first_stop@GOTPAGE
Lloh47:
	ldr	x8, [x8, _first_stop@GOTPAGEOFF]
	mov	w9, #1
Lloh48:
	str	w9, [x8]
	bl	_gdb_suspend_vcpus
	b	LBB0_15
LBB0_10:
	cbz	x20, LBB0_16
; %bb.11:
Lloh49:
	adrp	x1, l_.str@PAGE
Lloh50:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_err
LBB0_12:
Lloh51:
	adrp	x0, l_.str.1@PAGE
Lloh52:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	mov	x0, x19
	bl	_close
	b	LBB0_16
LBB0_13:
	cbz	x20, LBB0_15
; %bb.14:
Lloh53:
	adrp	x1, l_.str.3@PAGE
Lloh54:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_15:
Lloh55:
	adrp	x0, _gdb_lock@GOTPAGE
Lloh56:
	ldr	x0, [x0, _gdb_lock@GOTPAGEOFF]
	bl	_pthread_mutex_unlock
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotStr	Lloh42, Lloh43, Lloh45
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh44
	.loh AdrpLdrGotStr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotStr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_NONBLOCK,4,2              ; @SOCK_NONBLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed accepting initial GDB connection"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_NOSIGPIPE,4,2               ; @SO_NOSIGPIPE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to disable SIGPIPE for GDB connection"

	.comm	_gdb_lock,4,2                   ; @gdb_lock
	.comm	_cur_fd,4,2                     ; @cur_fd
l_.str.2:                               ; @.str.2
	.asciz	"Ignoring additional GDB connection."

	.comm	_EVF_READ,4,2                   ; @EVF_READ
	.comm	_gdb_readable,4,2               ; @gdb_readable
	.comm	_read_event,8,3                 ; @read_event
l_.str.3:                               ; @.str.3
	.asciz	"Failed to setup initial GDB connection"

	.comm	_EVF_WRITE,4,2                  ; @EVF_WRITE
	.comm	_gdb_writable,4,2               ; @gdb_writable
	.comm	_write_event,8,3                ; @write_event
	.comm	_cur_vcpu,8,3                   ; @cur_vcpu
	.comm	_stepping_vcpu,4,2              ; @stepping_vcpu
	.comm	_stopped_vcpu,4,2               ; @stopped_vcpu
	.comm	_stop_pending,4,2               ; @stop_pending
	.comm	_first_stop,4,2                 ; @first_stop
	.no_dead_strip	_new_connection
.subsections_via_symbols
