	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function run_connect
_run_connect:                           ## @run_connect
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	(%rdi), %r15
	callq	_get_helper
	movl	(%rax), %edi
	callq	_dup
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_die_errno
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	callq	_xfdopen
	movq	%rax, %r14
	movq	__IONBF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_setvbuf
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_sendline
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_recvline_fh
	testq	%rax, %rax
	jne	LBB0_12
## %bb.3:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	(%r12), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	leaq	L_.str.6(%rip), %rdi
	callq	__
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_die
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_6:
	movl	$1, (%r15)
	movq	_debug@GOTPCREL(%rip), %rax
	movl	$1, %ebx
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_10
LBB0_8:
	movq	_debug@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
LBB0_10:
	callq	_fprintf
LBB0_11:
	movq	%r14, %rdi
	callq	_fclose
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	$128, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't dup helper output fd"

L_.str.1:                               ## @.str.1
	.asciz	"r"

	.comm	__IONBF,4,2                     ## @_IONBF
L_.str.2:                               ## @.str.2
	.space	1

	.comm	_debug,8,3                      ## @debug
	.comm	_stderr,4,2                     ## @stderr
L_.str.3:                               ## @.str.3
	.asciz	"Debug: Smart transport connection ready.\n"

L_.str.4:                               ## @.str.4
	.asciz	"fallback"

L_.str.5:                               ## @.str.5
	.asciz	"Debug: Falling back to dumb transport.\n"

L_.str.6:                               ## @.str.6
	.asciz	"unknown response to connect: %s"

	.no_dead_strip	_run_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function run_connect
_run_connect:                           ; @run_connect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	ldr	x21, [x0]
	bl	_get_helper
	ldr	w0, [x0]
	bl	_dup
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	bl	_die_errno
LBB0_2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_xfdopen
	mov	x19, x0
Lloh4:
	adrp	x8, __IONBF@GOTPAGE
Lloh5:
	ldr	x8, [x8, __IONBF@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x1, #0
	mov	w3, #0
	bl	_setvbuf
	mov	x0, x21
	mov	x1, x20
	bl	_sendline
	mov	x0, x19
	mov	x1, x20
	bl	_recvline_fh
	cbnz	x0, LBB0_12
; %bb.3:
	ldr	w0, [x20]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_6
; %bb.4:
	ldr	w0, [x20]
Lloh9:
	adrp	x1, l_.str.4@PAGE
Lloh10:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_8
; %bb.5:
Lloh11:
	adrp	x0, l_.str.6@PAGE
Lloh12:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	__
	ldr	w1, [x20]
	bl	_die
	b	LBB0_10
LBB0_6:
	mov	w20, #1
	str	w20, [x21]
Lloh13:
	adrp	x8, _debug@GOTPAGE
Lloh14:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.7:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	mov	w20, #1
	b	LBB0_11
LBB0_8:
Lloh21:
	adrp	x8, _debug@GOTPAGE
Lloh22:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str.5@PAGE
Lloh28:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
LBB0_10:
	mov	w20, #0
LBB0_11:
	mov	x0, x19
	bl	_fclose
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	w0, #128
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't dup helper output fd"

l_.str.1:                               ; @.str.1
	.asciz	"r"

	.comm	__IONBF,4,2                     ; @_IONBF
l_.str.2:                               ; @.str.2
	.space	1

	.comm	_debug,8,3                      ; @debug
	.comm	_stderr,4,2                     ; @stderr
l_.str.3:                               ; @.str.3
	.asciz	"Debug: Smart transport connection ready.\n"

l_.str.4:                               ; @.str.4
	.asciz	"fallback"

l_.str.5:                               ; @.str.5
	.asciz	"Debug: Falling back to dumb transport.\n"

l_.str.6:                               ; @.str.6
	.asciz	"unknown response to connect: %s"

	.no_dead_strip	_run_connect
.subsections_via_symbols
