	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dbg_handler
_dbg_handler:                           ## @dbg_handler
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	$1, -52(%rbp)
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	je	LBB0_3
## %bb.1:
	cmpl	$2, %r8d
	jne	LBB0_3
## %bb.2:
	movq	_BVM_DBG_SIG@GOTPCREL(%rip), %rax
	movb	(%rax), %al
LBB0_16:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movb	%al, (%rcx)
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_3:
	movl	$-1, %eax
	cmpl	$4, %r8d
	jne	LBB0_22
## %bb.4:
	movq	_conn_fd@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_listen_fd@GOTPCREL(%rip), %r14
	movq	_SOCK_NONBLOCK@GOTPCREL(%rip), %r13
	leaq	-52(%rbp), %rbx
	movq	_TCP_NODELAY@GOTPCREL(%rip), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movb	(%rax), %al
	movb	%al, -41(%rbp)
	leaq	-41(%rbp), %rsi
	movl	$1, %edx
	callq	_write
	cmpl	$1, %eax
	je	LBB0_21
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %edi
	callq	_close
	movl	$-1, (%r15)
	movl	$-1, %edi
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	testl	%edi, %edi
	js	LBB0_6
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	-41(%rbp), %rsi
	movl	$1, %edx
	callq	_read
	cmpl	$-1, %eax
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$1, %eax
	jne	LBB0_19
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=2
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_SO_NOSIGPIPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movq	%rbx, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	movl	(%r15), %edi
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%rbx, %rcx
	movl	$4, %r8d
	callq	_setsockopt
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	(%r15), %edi
	testl	%edi, %edi
	jns	LBB0_12
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14), %edi
	movl	(%r13), %ecx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_accept4
	movl	%eax, (%r15)
	testl	%eax, %eax
	jns	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.18:
	movb	$-1, %al
	jmp	LBB0_16
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movb	-41(%rbp), %al
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_BVM_DBG_SIG,1,0                ## @BVM_DBG_SIG
	.comm	_conn_fd,4,2                    ## @conn_fd
	.comm	_listen_fd,4,2                  ## @listen_fd
	.comm	_SOCK_NONBLOCK,4,2              ## @SOCK_NONBLOCK
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_NOSIGPIPE,4,2               ## @SO_NOSIGPIPE
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
	.comm	_TCP_NODELAY,4,2                ## @TCP_NODELAY
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"accept"

	.comm	_EAGAIN,8,3                     ## @EAGAIN
L_str:                                  ## @str
	.asciz	"Waiting for connection from gdb\r"

	.no_dead_strip	_dbg_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dbg_handler
_dbg_handler:                           ; @dbg_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x5, [sp]                        ; 8-byte Folded Spill
	mov	x20, x2
	mov	w8, #1
	str	w8, [sp, #12]
	cbz	w2, LBB0_4
; %bb.1:
	cmp	w4, #2
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _BVM_DBG_SIG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BVM_DBG_SIG@GOTPAGEOFF]
	ldrb	w8, [x8]
LBB0_3:
	mov	w0, #0
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	strb	w8, [x9]
	b	LBB0_22
LBB0_4:
	cmp	w4, #4
	b.ne	LBB0_20
; %bb.5:
Lloh2:
	adrp	x23, _conn_fd@GOTPAGE
Lloh3:
	ldr	x23, [x23, _conn_fd@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh4:
	adrp	x24, _listen_fd@GOTPAGE
Lloh5:
	ldr	x24, [x24, _listen_fd@GOTPAGEOFF]
Lloh6:
	adrp	x25, _SOCK_NONBLOCK@GOTPAGE
Lloh7:
	ldr	x25, [x25, _SOCK_NONBLOCK@GOTPAGEOFF]
Lloh8:
	adrp	x26, _SOL_SOCKET@GOTPAGE
Lloh9:
	ldr	x26, [x26, _SOL_SOCKET@GOTPAGEOFF]
Lloh10:
	adrp	x27, _SO_NOSIGPIPE@GOTPAGE
Lloh11:
	ldr	x27, [x27, _SO_NOSIGPIPE@GOTPAGEOFF]
Lloh12:
	adrp	x28, _IPPROTO_TCP@GOTPAGE
Lloh13:
	ldr	x28, [x28, _IPPROTO_TCP@GOTPAGEOFF]
Lloh14:
	adrp	x22, _TCP_NODELAY@GOTPAGE
Lloh15:
	ldr	x22, [x22, _TCP_NODELAY@GOTPAGEOFF]
Lloh16:
	adrp	x21, _errno@GOTPAGE
Lloh17:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
Lloh18:
	adrp	x19, _EINTR@GOTPAGE
Lloh19:
	ldr	x19, [x19, _EINTR@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldrb	w8, [x8]
	strb	w8, [sp, #11]
	add	x1, sp, #11
	mov	w2, #1
	bl	_write
	cmp	w0, #1
	b.eq	LBB0_21
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x23]
	bl	_close
	mov	w0, #-1
	str	w0, [x23]
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	tbnz	w0, #31, LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_8 Depth=1
	cbz	w20, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x1, sp, #11
	mov	w2, #1
	bl	_read
	cmn	w0, #1
	b.eq	LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w0, #1
	b.ne	LBB0_7
	b	LBB0_23
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh20:
	adrp	x0, l_str@PAGE
Lloh21:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=2
	ldr	w1, [x26]
	ldr	w2, [x27]
	add	x3, sp, #12
	mov	w4, #4
	bl	_setsockopt
	ldr	w0, [x23]
	ldr	w1, [x28]
	ldr	w2, [x22]
	add	x3, sp, #12
	mov	w4, #4
	bl	_setsockopt
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=2
	ldr	w0, [x23]
	tbz	w0, #31, LBB0_9
LBB0_15:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24]
	ldr	w3, [x25]
	mov	x1, #0
	mov	x2, #0
	bl	_accept4
	str	w0, [x23]
	tbz	w0, #31, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	x8, [x21]
	ldr	x9, [x19]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=2
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	b	LBB0_14
LBB0_18:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x21]
Lloh24:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh25:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.19:
	mov	w8, #255
	b	LBB0_3
LBB0_20:
	mov	w0, #-1
	b	LBB0_22
LBB0_21:
	mov	w0, #0
LBB0_22:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_23:
	ldrb	w8, [sp, #11]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_BVM_DBG_SIG,1,0                ; @BVM_DBG_SIG
	.comm	_conn_fd,4,2                    ; @conn_fd
	.comm	_listen_fd,4,2                  ; @listen_fd
	.comm	_SOCK_NONBLOCK,4,2              ; @SOCK_NONBLOCK
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_NOSIGPIPE,4,2               ; @SO_NOSIGPIPE
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
	.comm	_TCP_NODELAY,4,2                ; @TCP_NODELAY
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"accept"

	.comm	_EAGAIN,8,3                     ; @EAGAIN
l_str:                                  ; @str
	.asciz	"Waiting for connection from gdb\r"

	.no_dead_strip	_dbg_handler
.subsections_via_symbols
