	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pqSendSome
_pqSendSome:                            ## @pqSendSome
	.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, %r14
	xorl	%ebx, %ebx
	cmpl	$0, 12(%rdi)
	je	LBB0_2
## %bb.1:
	xorl	%r13d, %r13d
	jmp	LBB0_19
LBB0_2:
	movq	16(%r14), %rax
	movq	_PGINVALID_SOCKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	24(%r14), %r15
	leaq	L_.str(%rip), %rdi
	callq	_libpq_gettext
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_printfPQExpBuffer
	movl	$1, 12(%r14)
	movl	24(%r14), %edi
	callq	_strdup
	movq	%rax, 32(%r14)
	movq	%r15, %rdi
	callq	_resetPQExpBuffer
	xorl	%r13d, %r13d
	jmp	LBB0_19
LBB0_4:
	movl	%esi, %r12d
	movq	(%r14), %r15
	movl	8(%r14), %ebx
	testl	%esi, %esi
	jle	LBB0_16
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	%ebx, %r13d
	movq	_SOCK_ERRNO@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_pqsecure_write
	testl	%eax, %eax
	jns	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$128, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$130, %eax
	jne	LBB0_15
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r13d, %ebx
	jmp	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %ecx
	addq	%rcx, %r15
	movl	%r13d, %ebx
	subl	%eax, %ebx
	subl	%eax, %r12d
	jle	LBB0_16
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_pqReadData
	movl	$-1, %r13d
	testq	%rax, %rax
	js	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_pqIsnonblocking
	testq	%rax, %rax
	jne	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %edi
	movl	$1, %esi
	movq	%r14, %rdx
	callq	_pqWait
	testq	%rax, %rax
	je	LBB0_5
	jmp	LBB0_17
LBB0_15:
	movl	$1, 12(%r14)
	leaq	24(%r14), %rbx
	movl	24(%r14), %edi
	callq	_strdup
	movq	%rax, 32(%r14)
	movq	%rbx, %rdi
	callq	_resetPQExpBuffer
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_19
LBB0_16:
	xorl	%r13d, %r13d
LBB0_17:
	testl	%ebx, %ebx
	jle	LBB0_19
LBB0_18:
	movq	(%r14), %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_memmove
LBB0_19:
	movl	%ebx, 8(%r14)
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	$1, %r13d
	testl	%ebx, %ebx
	jg	LBB0_18
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_PGINVALID_SOCKET,8,3           ## @PGINVALID_SOCKET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connection not open\n"

	.comm	_SOCK_ERRNO,4,2                 ## @SOCK_ERRNO
	.no_dead_strip	_pqSendSome
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pqSendSome
_pqSendSome:                            ; @pqSendSome
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	w8, [x0, #12]
	cbnz	w8, LBB0_16
; %bb.1:
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x9, _PGINVALID_SOCKET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PGINVALID_SOCKET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	add	x20, x19, #24
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x20
	bl	_printfPQExpBuffer
	mov	w8, #1
	str	w8, [x19, #12]
	ldr	w0, [x19, #24]
	bl	_strdup
	str	x0, [x19, #32]
	b	LBB0_15
LBB0_3:
	mov	x22, x1
	ldr	x21, [x19]
	ldr	w20, [x19, #8]
	cmp	w1, #1
	b.lt	LBB0_18
; %bb.4:
Lloh5:
	adrp	x23, _SOCK_ERRNO@GOTPAGE
Lloh6:
	ldr	x23, [x23, _SOCK_ERRNO@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_pqsecure_write
	tbz	w0, #31, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x23]
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #130
	b.eq	LBB0_10
	b	LBB0_14
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, w0, uxtw
	sub	w22, w22, w0
	sub	w20, w20, w0
	cmp	w22, #0
	b.le	LBB0_18
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_pqReadData
	tbnz	x0, #63, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_pqIsnonblocking
	cbnz	x0, LBB0_20
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	mov	w1, #1
	mov	x2, x19
	bl	_pqWait
	cbz	x0, LBB0_5
LBB0_13:
	mov	w22, #-1
	cmp	w20, #1
	b.ge	LBB0_19
	b	LBB0_17
LBB0_14:
	mov	x20, x19
	ldr	w0, [x20, #24]!
	mov	w8, #1
	stur	w8, [x20, #-12]
	bl	_strdup
	str	x0, [x20, #8]
LBB0_15:
	mov	x0, x20
	bl	_resetPQExpBuffer
LBB0_16:
	mov	w20, #0
	mov	w22, #0
LBB0_17:
	str	w20, [x19, #8]
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
	mov	w22, #0
	cmp	w20, #1
	b.lt	LBB0_17
LBB0_19:
	ldr	x0, [x19]
	mov	x1, x21
	mov	x2, x20
	bl	_memmove
	b	LBB0_17
LBB0_20:
	mov	w22, #1
	cmp	w20, #1
	b.ge	LBB0_19
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PGINVALID_SOCKET,8,3           ; @PGINVALID_SOCKET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connection not open\n"

	.comm	_SOCK_ERRNO,4,2                 ; @SOCK_ERRNO
	.no_dead_strip	_pqSendSome
.subsections_via_symbols
