	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sqlp_check_ready               ## -- Begin function sqlp_check_ready
	.p2align	4, 0x90
_sqlp_check_ready:                      ## @sqlp_check_ready
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_conn_ready@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_3
## %bb.1:
	movq	48(%rbx), %rdx
	testq	%rdx, %rdx
	jle	LBB0_3
## %bb.2:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	8(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_conn_error@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	$-3, 12(%rbx)
	movq	%rbx, %rdi
	movl	$-3, %esi
	jmp	LBB0_5
LBB0_3:
	movq	_conn_error@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_6
## %bb.4:
	movl	$-4, 12(%rbx)
	movq	%rbx, %rdi
	movl	$-4, %esi
LBB0_5:
	callq	_fail_connection
	movq	_cr_failed@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_6:
	movq	_conn_wait_answer@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_8
## %bb.7:
	movq	_conn_reading_answer@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_13
LBB0_8:
	movq	_C_FAILED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 20(%rbx)
	jne	LBB0_13
## %bb.9:
	movq	_precise_now@GOTPCREL(%rip), %r13
	movq	_RESPONSE_FAIL_TIMEOUT@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	addq	32(%rbx), %rsi
	movq	(%r13), %rdx
	subq	%rsi, %rdx
	cmpq	%rdx, 24(%rbx)
	jge	LBB0_13
## %bb.10:
	cmpq	%rdx, 40(%rbx)
	jge	LBB0_13
## %bb.11:
	movq	%rbx, %rdi
	callq	_SQLC_DATA
	testb	$1, (%rax)
	jne	LBB0_12
## %bb.15:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_17
## %bb.16:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	8(%rbx), %r15d
	movq	(%rbx), %r12
	movq	%rbx, %rdi
	callq	_SQLC_DATA
	movl	4(%rax), %r8d
	movq	40(%rbx), %r9
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movq	%r12, %rcx
	xorl	%eax, %eax
	pushq	(%r13)
	pushq	24(%rbx)
	callq	_fprintf
	addq	$16, %rsp
LBB0_17:
	movl	$-5, 12(%rbx)
	movq	%rbx, %rdi
	movl	$-5, %esi
	jmp	LBB0_5
LBB0_12:
	movq	(%rbx), %rax
	movq	(%r14), %rcx
LBB0_13:
	cmpq	%rcx, %rax
	jne	LBB0_18
## %bb.14:
	movq	_cr_ok@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_18:
	movq	%rbx, %rdi
	callq	_SQLC_DATA
	movq	8(%rax), %rax
	movq	_sql_auth_ok@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.20:
	movq	_cr_stopped@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_19:
	movq	_cr_busy@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_conn_ready,8,3                 ## @conn_ready
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"have %d bytes in outbound sql connection %d in state ready, closing connection\n"

	.comm	_conn_error,8,3                 ## @conn_error
	.comm	_cr_failed,4,2                  ## @cr_failed
	.comm	_conn_wait_answer,8,3           ## @conn_wait_answer
	.comm	_conn_reading_answer,8,3        ## @conn_reading_answer
	.comm	_C_FAILED,4,2                   ## @C_FAILED
	.comm	_precise_now,8,3                ## @precise_now
	.comm	_RESPONSE_FAIL_TIMEOUT,8,3      ## @RESPONSE_FAIL_TIMEOUT
	.comm	_verbosity,8,3                  ## @verbosity
L_.str.1:                               ## @.str.1
	.asciz	"failing outbound connection %d, status=%d, response_status=%d, last_response=%.6f, last_query=%.6f, now=%.6f\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sqlp_check_ready               ; -- Begin function sqlp_check_ready
	.p2align	2
_sqlp_check_ready:                      ; @sqlp_check_ready
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x20, _conn_ready@GOTPAGE
Lloh1:
	ldr	x20, [x20, _conn_ready@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x2, [x19, #48]
	cmp	x2, #1
	b.lt	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldrsw	x3, [x19, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_fprintf
Lloh7:
	adrp	x8, _conn_error@GOTPAGE
Lloh8:
	ldr	x8, [x8, _conn_error@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	w8, #-3
	str	w8, [x19, #12]
	mov	x0, x19
	mov	w1, #-3
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x10, _conn_error@GOTPAGE
Lloh11:
	ldr	x10, [x10, _conn_error@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_6
; %bb.4:
	mov	w8, #-4
	str	w8, [x19, #12]
	mov	x0, x19
	mov	w1, #-4
LBB0_5:
	bl	_fail_connection
Lloh13:
	adrp	x8, _cr_failed@GOTPAGE
Lloh14:
	ldr	x8, [x8, _cr_failed@GOTPAGEOFF]
	b	LBB0_18
LBB0_6:
Lloh15:
	adrp	x10, _conn_wait_answer@GOTPAGE
Lloh16:
	ldr	x10, [x10, _conn_wait_answer@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
Lloh18:
	adrp	x11, _conn_reading_answer@GOTPAGE
Lloh19:
	ldr	x11, [x11, _conn_reading_answer@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x11]
	cmp	x8, x10
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_15
; %bb.7:
	ldr	w10, [x19, #20]
Lloh21:
	adrp	x11, _C_FAILED@GOTPAGE
Lloh22:
	ldr	x11, [x11, _C_FAILED@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
	tst	w11, w10
	b.ne	LBB0_15
; %bb.8:
Lloh24:
	adrp	x23, _precise_now@GOTPAGE
Lloh25:
	ldr	x23, [x23, _precise_now@GOTPAGEOFF]
	ldr	x10, [x23]
Lloh26:
	adrp	x11, _RESPONSE_FAIL_TIMEOUT@GOTPAGE
Lloh27:
	ldr	x11, [x11, _RESPONSE_FAIL_TIMEOUT@GOTPAGEOFF]
Lloh28:
	ldr	x11, [x11]
	ldp	x12, x13, [x19, #24]
	add	x11, x11, x13
	sub	x10, x10, x11
	cmp	x12, x10
	b.ge	LBB0_15
; %bb.9:
	ldr	x11, [x19, #40]
	cmp	x11, x10
	b.ge	LBB0_15
; %bb.10:
	mov	x0, x19
	bl	_SQLC_DATA
	ldrb	w8, [x0]
	tbnz	w8, #0, LBB0_14
; %bb.11:
Lloh29:
	adrp	x8, _verbosity@GOTPAGE
Lloh30:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_13
; %bb.12:
Lloh32:
	adrp	x8, _stderr@GOTPAGE
Lloh33:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh34:
	ldr	w20, [x8]
	ldr	w21, [x19, #8]
	ldr	x22, [x19]
	mov	x0, x19
	bl	_SQLC_DATA
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #24]
	ldr	x10, [x23]
	ldr	w11, [x0, #4]
	stp	x9, x10, [sp, #16]
	stp	x11, x8, [sp]
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	bl	_fprintf
LBB0_13:
	mov	w8, #-5
	str	w8, [x19, #12]
	mov	x0, x19
	mov	w1, #-5
	b	LBB0_5
LBB0_14:
	ldr	x8, [x19]
	ldr	x9, [x20]
LBB0_15:
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
Lloh37:
	adrp	x8, _cr_ok@GOTPAGE
Lloh38:
	ldr	x8, [x8, _cr_ok@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
	mov	x0, x19
	bl	_SQLC_DATA
	ldr	x8, [x0, #8]
Lloh39:
	adrp	x9, _sql_auth_ok@GOTPAGE
Lloh40:
	ldr	x9, [x9, _sql_auth_ok@GOTPAGEOFF]
Lloh41:
	adrp	x10, _cr_stopped@GOTPAGE
Lloh42:
	ldr	x10, [x10, _cr_stopped@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
Lloh44:
	adrp	x11, _cr_busy@GOTPAGE
Lloh45:
	ldr	x11, [x11, _cr_busy@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
LBB0_18:
	ldr	w0, [x8]
	str	w0, [x19, #16]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_conn_ready,8,3                 ; @conn_ready
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"have %d bytes in outbound sql connection %d in state ready, closing connection\n"

	.comm	_conn_error,8,3                 ; @conn_error
	.comm	_cr_failed,4,2                  ; @cr_failed
	.comm	_conn_wait_answer,8,3           ; @conn_wait_answer
	.comm	_conn_reading_answer,8,3        ; @conn_reading_answer
	.comm	_C_FAILED,4,2                   ; @C_FAILED
	.comm	_precise_now,8,3                ; @precise_now
	.comm	_RESPONSE_FAIL_TIMEOUT,8,3      ; @RESPONSE_FAIL_TIMEOUT
	.comm	_verbosity,8,3                  ; @verbosity
l_.str.1:                               ; @.str.1
	.asciz	"failing outbound connection %d, status=%d, response_status=%d, last_response=%.6f, last_query=%.6f, now=%.6f\n"

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