	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function get_target_connection
LCPI0_0:
	.quad	0x4014000000000000              ## double 5
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_get_target_connection
	.p2align	4, 0x90
_get_target_connection:                 ## @get_target_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	%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, -64(%rbp)                 ## 8-byte Spill
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	_cr_notyet@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rbx
	cmpq	%rax, %rbx
	je	LBB0_3
## %bb.4:
	movl	$10000, -48(%rbp)               ## 4-byte Folded Spill
                                        ## imm = 0x2710
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_verbosity@GOTPCREL(%rip), %r14
	movq	_cr_ok@GOTPCREL(%rip), %r13
	movq	_cr_busy@GOTPCREL(%rip), %r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %eax
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	$-1073741824, -48(%rbp)         ## 4-byte Folded Spill
                                        ## imm = 0xC0000000
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%rbx), %rbx
	cmpq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_16
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_sqlp_check_ready
	movl	%eax, %r12d
	cmpl	$2, (%r14)
	jl	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movq	%r13, %r14
	movl	(%rax), %r13d
	movl	(%rbx), %r15d
	movl	16(%rbx), %edi
	callq	_show_ip
	movl	4(%rbx), %r9d
	movl	8(%rbx), %r10d
	movl	%r13d, %edi
	movq	%r14, %r13
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	movq	_cr_busy@GOTPCREL(%rip), %r15
	movq	_verbosity@GOTPCREL(%rip), %r14
	movq	%rax, %r8
	pushq	%r10
	pushq	%r12
	callq	_fprintf
	addq	$16, %rsp
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpl	(%r13), %r12d
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	(%r15), %r12d
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_cr_stopped@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	12(%rbx), %eax
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %ecx
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_15
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_3:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_16:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	ucomisd	LCPI0_0(%rip), %xmm0
	jbe	LBB0_19
## %bb.17:
	xorl	%ebx, %ebx
	movq	_cr_notyet@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	je	LBB0_20
## %bb.18:
	movq	_cr_busy@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_20
LBB0_19:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_8:
	movq	_round_robin@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.9:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_rotate_target
LBB0_20:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cr_notyet,4,2                  ## @cr_notyet
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"checked connection %p (%d %s:%d): ready status = %d (connect status %d)\n"

	.comm	_cr_ok,4,2                      ## @cr_ok
	.comm	_round_robin,8,3                ## @round_robin
	.comm	_cr_busy,4,2                    ## @cr_busy
	.comm	_cr_stopped,4,2                 ## @cr_stopped
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_target_connection          ; -- Begin function get_target_connection
	.p2align	2
_get_target_connection:                 ; @get_target_connection
	.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
	cbz	x0, LBB0_15
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _cr_notyet@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cr_notyet@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	x21, [x0, #8]
	cmp	x21, x0
	b.eq	LBB0_12
; %bb.2:
	mov	x19, #0
Lloh3:
	adrp	x28, _verbosity@GOTPAGE
Lloh4:
	ldr	x28, [x28, _verbosity@GOTPAGEOFF]
Lloh5:
	adrp	x26, _cr_ok@GOTPAGE
Lloh6:
	ldr	x26, [x26, _cr_ok@GOTPAGEOFF]
	mov	w23, #10000
Lloh7:
	adrp	x25, _cr_busy@GOTPAGE
Lloh8:
	ldr	x25, [x25, _cr_busy@GOTPAGEOFF]
	mov	x27, x22
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w23, #-1073741824
	mov	x19, x21
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x21, [x21, #24]
	mov	x27, x22
	cmp	x21, x20
	b.eq	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_sqlp_check_ready
	mov	x22, x0
	ldr	w8, [x28]
	cmp	w8, #2
	b.lt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w24, [x8]
	str	w23, [sp, #12]                  ; 4-byte Folded Spill
	mov	x23, x20
	mov	x20, x19
	mov	x19, x26
	mov	x26, x25
	ldr	w25, [x21]
	ldr	w0, [x21, #16]
	bl	_show_ip
	mov	x4, x0
	ldp	w5, w7, [x21, #4]
	mov	x0, x24
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x25
	mov	x25, x26
	mov	x26, x19
	mov	x19, x20
	mov	x20, x23
	ldr	w23, [sp, #12]                  ; 4-byte Folded Reload
	mov	x6, x22
	bl	_fprintf
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x26]
	cmp	w22, w8
	b.eq	LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	cmp	w22, w8
	b.eq	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x8, _cr_stopped@GOTPAGE
Lloh15:
	ldr	x8, [x8, _cr_stopped@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21, #12]
	cmp	w8, w23
	csel	w22, w27, w22, ge
	csel	x19, x19, x21, ge
	csel	w23, w23, w8, ge
	b	LBB0_4
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x27
	b	LBB0_4
LBB0_12:
	mov	x19, #0
LBB0_13:
	ldr	d0, [x20]
	fmov	d1, #5.00000000
	fcmp	d0, d1
	b.le	LBB0_19
; %bb.14:
Lloh17:
	adrp	x8, _cr_notyet@GOTPAGE
Lloh18:
	ldr	x8, [x8, _cr_notyet@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _cr_busy@GOTPAGE
Lloh21:
	ldr	x9, [x9, _cr_busy@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w22, w8
	ccmp	w22, w9, #4, ne
	b.ne	LBB0_19
LBB0_15:
	mov	x19, #0
	b	LBB0_19
LBB0_16:
Lloh23:
	adrp	x8, _round_robin@GOTPAGE
Lloh24:
	ldr	x8, [x8, _round_robin@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.17:
	mov	x0, x20
	mov	x1, x21
	bl	_rotate_target
LBB0_18:
	mov	x19, x21
LBB0_19:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_cr_notyet,4,2                  ; @cr_notyet
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"checked connection %p (%d %s:%d): ready status = %d (connect status %d)\n"

	.comm	_cr_ok,4,2                      ; @cr_ok
	.comm	_round_robin,8,3                ; @round_robin
	.comm	_cr_busy,4,2                    ; @cr_busy
	.comm	_cr_stopped,4,2                 ; @cr_stopped
.subsections_via_symbols
