	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_remote_open                    ## -- Begin function remote_open
	.p2align	4, 0x90
_remote_open:                           ## @remote_open
	.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	%rdi, %rbx
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	incq	%rax
	movq	%rax, %rdi
	callq	_atoi
	movl	%eax, %r14d
	movq	_PF_INET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	_perror_with_name
LBB0_6:
	movl	$1, -44(%rbp)
	movq	_SOL_SOCKET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_SO_REUSEADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %r8d
	callq	_setsockopt
	movl	(%r12), %eax
	movl	%eax, -48(%rbp)
	movl	%r14d, %edi
	callq	_htons
	movl	%eax, -52(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	leaq	-56(%rbp), %rsi
	movl	%ebx, %edi
	movl	$12, %edx
	callq	_bind
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_listen
	testq	%rax, %rax
	je	LBB0_9
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	callq	_perror_with_name
LBB0_9:
	movq	_stderr@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$12, -44(%rbp)
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	callq	_accept
	movq	_remote_desc@GOTPCREL(%rip), %r13
	movl	%eax, (%r13)
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.5(%rip), %rdi
	callq	_perror_with_name
LBB0_11:
	movl	$1, -44(%rbp)
	movl	(%r15), %esi
	movq	_SO_KEEPALIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r14
	movl	%ebx, %edi
	movq	%r14, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	movl	$1, -44(%rbp)
	movl	(%r13), %edi
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TCP_NODELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rcx
	movl	$4, %r8d
	callq	_setsockopt
	movl	%ebx, %edi
	callq	_close
	movq	_SIGPIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SIG_IGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	movl	(%r12), %ebx
	movl	-56(%rbp), %edi
	callq	_inet_ntoa
	leaq	L_.str.6(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	jmp	LBB0_12
LBB0_1:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	movq	_remote_desc@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	jns	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_perror_with_name
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
LBB0_12:
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%eax, %eax
	callq	_disable_async_io
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_remote_desc,4,2                ## @remote_desc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not open remote device"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Remote debugging using %s\n"

	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
L_.str.2:                               ## @.str.2
	.asciz	"Can't open socket"

	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
L_.str.3:                               ## @.str.3
	.asciz	"Can't bind address"

L_.str.4:                               ## @.str.4
	.asciz	"Listening on port %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Accept failed"

	.comm	_SO_KEEPALIVE,4,2               ## @SO_KEEPALIVE
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
	.comm	_TCP_NODELAY,4,2                ## @TCP_NODELAY
	.comm	_SIGPIPE,4,2                    ## @SIGPIPE
	.comm	_SIG_IGN,4,2                    ## @SIG_IGN
L_.str.6:                               ## @.str.6
	.asciz	"Remote debugging from host %s\n"

	.comm	_CLOCAL,4,2                     ## @CLOCAL
	.comm	_CS8,4,2                        ## @CS8
	.comm	_CSIZE,4,2                      ## @CSIZE
	.comm	_FASYNC,4,2                     ## @FASYNC
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_F_SETOWN,4,2                   ## @F_SETOWN
	.comm	_PARENB,4,2                     ## @PARENB
	.comm	_RAW,4,2                        ## @RAW
	.comm	_TCGETA,4,2                     ## @TCGETA
	.comm	_TCSANOW,4,2                    ## @TCSANOW
	.comm	_TCSETA,4,2                     ## @TCSETA
	.comm	_TIOCGETP,4,2                   ## @TIOCGETP
	.comm	_TIOCSETP,4,2                   ## @TIOCSETP
	.comm	_VMIN,8,3                       ## @VMIN
	.comm	_VTIME,8,3                      ## @VTIME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_remote_open                    ; -- Begin function remote_open
	.p2align	2
_remote_open:                           ; @remote_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	mov	w1, #58
	bl	_strchr
	cbz	x0, LBB0_9
; %bb.1:
	add	x0, x0, #1
	bl	_atoi
	mov	x20, x0
Lloh0:
	adrp	x22, _PF_INET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PF_INET@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	tbz	w0, #31, LBB0_3
; %bb.2:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror_with_name
LBB0_3:
	mov	w8, #1
	str	w8, [sp, #12]
Lloh7:
	adrp	x21, _SOL_SOCKET@GOTPAGE
Lloh8:
	ldr	x21, [x21, _SOL_SOCKET@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh9:
	adrp	x8, _SO_REUSEADDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SO_REUSEADDR@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
	ldr	w8, [x22]
	str	w8, [sp, #24]
	mov	x0, x20
	bl	_htons
Lloh12:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	stp	w8, w0, [sp, #16]
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #12
	bl	_bind
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #1
	bl	_listen
	cbz	x0, LBB0_6
LBB0_5:
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror_with_name
LBB0_6:
Lloh17:
	adrp	x22, _stderr@GOTPAGE
Lloh18:
	ldr	x22, [x22, _stderr@GOTPAGEOFF]
	ldr	w0, [x22]
	str	x20, [sp]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	mov	w8, #12
	str	w8, [sp, #12]
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x19
	bl	_accept
Lloh21:
	adrp	x20, _remote_desc@GOTPAGE
Lloh22:
	ldr	x20, [x20, _remote_desc@GOTPAGEOFF]
	str	w0, [x20]
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_perror_with_name
LBB0_8:
	mov	w23, #1
	str	w23, [sp, #12]
	ldr	w1, [x21]
Lloh25:
	adrp	x8, _SO_KEEPALIVE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SO_KEEPALIVE@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w4, #4
	bl	_setsockopt
	str	w23, [sp, #12]
	ldr	w0, [x20]
Lloh28:
	adrp	x8, _IPPROTO_TCP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IPPROTO_TCP@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _TCP_NODELAY@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TCP_NODELAY@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	w4, #4
	bl	_setsockopt
	mov	x0, x19
	bl	_close
Lloh34:
	adrp	x8, _SIGPIPE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SIGPIPE@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x8, _SIG_IGN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SIG_IGN@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	bl	_signal
	ldr	w19, [x22]
	ldr	w0, [sp, #16]
	bl	_inet_ntoa
	str	x0, [sp]
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	b	LBB0_12
LBB0_9:
Lloh42:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh43:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
Lloh45:
	adrp	x8, _remote_desc@GOTPAGE
Lloh46:
	ldr	x8, [x8, _remote_desc@GOTPAGEOFF]
Lloh47:
	str	w0, [x8]
	tbz	w0, #31, LBB0_11
; %bb.10:
Lloh48:
	adrp	x0, l_.str@PAGE
Lloh49:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror_with_name
LBB0_11:
Lloh50:
	adrp	x8, _stderr@GOTPAGE
Lloh51:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh52:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh53:
	adrp	x1, l_.str.1@PAGE
Lloh54:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_12:
	bl	_fprintf
	bl	_disable_async_io
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_remote_desc,4,2                ; @remote_desc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not open remote device"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Remote debugging using %s\n"

	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
l_.str.2:                               ; @.str.2
	.asciz	"Can't open socket"

	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
l_.str.3:                               ; @.str.3
	.asciz	"Can't bind address"

l_.str.4:                               ; @.str.4
	.asciz	"Listening on port %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Accept failed"

	.comm	_SO_KEEPALIVE,4,2               ; @SO_KEEPALIVE
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
	.comm	_TCP_NODELAY,4,2                ; @TCP_NODELAY
	.comm	_SIGPIPE,4,2                    ; @SIGPIPE
	.comm	_SIG_IGN,4,2                    ; @SIG_IGN
l_.str.6:                               ; @.str.6
	.asciz	"Remote debugging from host %s\n"

	.comm	_CLOCAL,4,2                     ; @CLOCAL
	.comm	_CS8,4,2                        ; @CS8
	.comm	_CSIZE,4,2                      ; @CSIZE
	.comm	_FASYNC,4,2                     ; @FASYNC
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_F_SETOWN,4,2                   ; @F_SETOWN
	.comm	_PARENB,4,2                     ; @PARENB
	.comm	_RAW,4,2                        ; @RAW
	.comm	_TCGETA,4,2                     ; @TCGETA
	.comm	_TCSANOW,4,2                    ; @TCSANOW
	.comm	_TCSETA,4,2                     ; @TCSETA
	.comm	_TIOCGETP,4,2                   ; @TIOCGETP
	.comm	_TIOCSETP,4,2                   ; @TIOCSETP
	.comm	_VMIN,8,3                       ; @VMIN
	.comm	_VTIME,8,3                      ; @VTIME
.subsections_via_symbols
