	.file	"extr_db-proxy.c_get_target_connection.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"checked connection %p (%d %s:%d): ready status = %d (connect status %d)\n"
	.text
	.p2align 4
	.globl	get_target_connection
	.type	get_target_connection, @function
get_target_connection:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR cr_notyet[rip]
	mov	DWORD PTR 12[rsp], eax
	test	rdi, rdi
	je	.L18
	mov	rbx, QWORD PTR 8[rdi]
	mov	r12, rdi
	cmp	rdi, rbx
	je	.L18
	mov	r14d, 10000
	xor	r13d, r13d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L23:
	cmp	DWORD PTR cr_stopped[rip], ebp
	je	.L20
.L7:
	mov	rbx, QWORD PTR 24[rbx]
	cmp	r12, rbx
	je	.L21
.L8:
	mov	rdi, rbx
	call	sqlp_check_ready@PLT
	cmp	DWORD PTR verbosity[rip], 1
	mov	ebp, eax
	jle	.L4
	mov	r9d, DWORD PTR 4[rbx]
	mov	r15d, DWORD PTR 8[rbx]
	mov	edi, DWORD PTR 16[rbx]
	mov	DWORD PTR 8[rsp], r9d
	call	show_ip@PLT
	push	r15
	.cfi_def_cfa_offset 88
	mov	edi, DWORD PTR stderr[rip]
	mov	rdx, rbx
	push	rbp
	.cfi_def_cfa_offset 96
	mov	r9d, DWORD PTR 24[rsp]
	mov	r8, rax
	lea	rsi, .LC0[rip]
	mov	ecx, DWORD PTR [rbx]
	call	fprintf@PLT
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
.L4:
	cmp	DWORD PTR cr_ok[rip], ebp
	je	.L22
	cmp	DWORD PTR cr_busy[rip], ebp
	jne	.L23
	mov	r13, rbx
	mov	rbx, QWORD PTR 24[rbx]
	mov	DWORD PTR 12[rsp], ebp
	mov	r14d, -1073741824
	cmp	r12, rbx
	jne	.L8
.L21:
	movsd	xmm0, QWORD PTR [r12]
	comisd	xmm0, QWORD PTR .LC1[rip]
	jbe	.L1
	mov	eax, DWORD PTR 12[rsp]
	cmp	DWORD PTR cr_notyet[rip], eax
	je	.L18
	cmp	DWORD PTR cr_busy[rip], eax
	jne	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	xor	r13d, r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR 12[rbx]
	cmp	eax, r14d
	jge	.L7
	mov	DWORD PTR 12[rsp], ebp
	mov	r14d, eax
	mov	r13, rbx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L22:
	cmp	QWORD PTR round_robin[rip], 0
	mov	r13, rbx
	jne	.L24
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r13
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	rsi, rbx
	mov	rdi, r12
	call	rotate_target@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	get_target_connection, .-get_target_connection
	.comm	verbosity,4,4
	.comm	stderr,4,4
	.comm	round_robin,8,8
	.comm	cr_stopped,4,4
	.comm	cr_ok,4,4
	.comm	cr_notyet,4,4
	.comm	cr_busy,4,4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1075052544
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_db-proxy.c_get_target_connection.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"checked connection %p (%d %s:%d): ready status = %d"
	.ascii	" (connect status %d)\012\000"
	.global	__aeabi_dcmpgt
	.text
	.align	2
	.global	get_target_connection
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_target_connection, %function
get_target_connection:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L23
	sub	sp, sp, #36
	ldr	r3, [r3]
	subs	r5, r0, #0
	str	r3, [sp, #16]
	beq	.L2
	ldr	r10, [r5, #8]
	cmp	r5, r10
	beq	.L3
	mov	r9, #0
	ldr	r3, .L23+4
	ldr	r7, .L23+8
	str	r3, [sp, #20]
	mov	r3, r9
	ldr	r6, .L23+12
	mov	r9, r10
	ldr	r8, .L23+16
	mov	r10, r3
	ldr	fp, .L23+20
	b	.L8
.L21:
	ldr	r3, [fp]
	cmp	r3, r4
	bne	.L7
	ldr	r3, [r9, #12]
	ldr	r2, [sp, #20]
	cmp	r3, r2
	movge	r3, r2
	str	r3, [sp, #20]
	ldr	r3, [sp, #16]
	movlt	r3, r4
	movlt	r10, r9
	str	r3, [sp, #16]
.L7:
	ldr	r9, [r9, #20]
	cmp	r5, r9
	beq	.L19
.L8:
	mov	r0, r9
	bl	sqlp_check_ready
	ldr	r3, [r7]
	mov	r4, r0
	cmp	r3, #1
	ble	.L4
	ldr	r3, .L23+24
	ldr	r0, [r9, #16]
	ldr	r1, [r3]
	ldr	r3, [r9]
	str	r1, [sp, #28]
	str	r3, [sp, #24]
	bl	show_ip
	mov	lr, r0
	ldr	r0, [r9, #8]
	str	r4, [sp, #8]
	str	r0, [sp, #12]
	ldr	ip, [r9, #4]
	ldr	r1, [sp, #28]
	mov	r2, r9
	mov	r0, r1
	ldr	r3, [sp, #24]
	ldr	r1, .L23+28
	str	lr, [sp]
	str	ip, [sp, #4]
	bl	fprintf
.L4:
	ldr	r3, [r6]
	cmp	r3, r4
	beq	.L20
	ldr	r3, [r8]
	cmp	r3, r4
	bne	.L21
	mov	r3, #-1073741824
	mov	r10, r9
	ldr	r9, [r9, #20]
	str	r4, [sp, #16]
	cmp	r5, r9
	str	r3, [sp, #20]
	bne	.L8
.L19:
	mov	r2, #0
	ldmia	r5, {r0-r1}
	ldr	r3, .L23+32
	bl	__aeabi_dcmpgt
	cmp	r0, #0
	mov	r9, r10
	beq	.L1
	ldr	r3, .L23
	ldr	r2, [sp, #16]
	ldr	r3, [r3]
	cmp	r3, r2
	beq	.L2
	ldr	r3, [r8]
	cmp	r3, r2
	bne	.L1
.L2:
	mov	r9, #0
	mov	r0, r9
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	ldr	r3, .L23+36
	mov	r10, r9
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L22
.L1:
	mov	r0, r9
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	mov	r9, r10
	mov	r0, r5
	mov	r1, r10
	bl	rotate_target
	mov	r0, r9
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r2, #0
	ldmia	r5, {r0-r1}
	ldr	r3, .L23+32
	bl	__aeabi_dcmpgt
	subs	r9, r0, #0
	beq	.L1
	b	.L2
.L24:
	.align	2
.L23:
	.word	cr_notyet
	.word	10000
	.word	verbosity
	.word	cr_ok
	.word	cr_busy
	.word	cr_stopped
	.word	stderr
	.word	.LC0
	.word	1075052544
	.word	round_robin
	.size	get_target_connection, .-get_target_connection
	.comm	verbosity,4,4
	.comm	stderr,4,4
	.comm	round_robin,4,4
	.comm	cr_stopped,4,4
	.comm	cr_ok,4,4
	.comm	cr_notyet,4,4
	.comm	cr_busy,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
