	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_query_io_buffer_write          ## -- Begin function query_io_buffer_write
	.p2align	4, 0x90
_query_io_buffer_write:                 ## @query_io_buffer_write
	.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	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	_query_io_buffer_write(%rip), %rdi
	callq	_TRACE_IN
	movq	(%r14), %rax
	movl	$-1, %ebx
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	24(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.2:
	leaq	(%rcx,%rax,4), %rax
	xorl	%edi, %edi
	cmpq	%rax, 32(%r14)
	setbe	%dil
	callq	_assert
	movq	%r15, %rsi
	movq	(%r14), %r15
	movq	32(%r14), %r13
	shlq	$2, %r15
	addq	24(%r14), %r15
	movq	%r15, %rbx
	subq	%r13, %rbx
	sarq	$2, %rbx
	cmpq	%r12, %rbx
	cmovaeq	%r12, %rbx
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_memcpy
	movslq	%ebx, %rax
	shlq	$2, %rax
	addq	%rax, 32(%r14)
	cmpq	%r13, %r15
	jne	LBB0_4
## %bb.3:
	movl	$1, 8(%r14)
	movq	24(%r14), %rax
	movq	%rax, 32(%r14)
	movq	_query_socket_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_query_socket_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
LBB0_4:
	leaq	_query_io_buffer_write(%rip), %rdi
	callq	_TRACE_OUT
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_query_socket_write,4,2         ## @query_socket_write
	.comm	_query_socket_read,4,2          ## @query_socket_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_query_io_buffer_write          ; -- Begin function query_io_buffer_write
	.p2align	2
_query_io_buffer_write:                 ; @query_io_buffer_write
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _query_io_buffer_write@PAGE
Lloh1:
	add	x0, x0, _query_io_buffer_write@PAGEOFF
	bl	_TRACE_IN
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x9, [x19, #24]
	cbz	x9, LBB0_5
; %bb.2:
	ldr	x10, [x19, #32]
	add	x8, x9, x8, lsl #2
	cmp	x10, x8
	cset	w0, ls
	bl	_assert
	ldr	x8, [x19]
	ldp	x9, x22, [x19, #24]
	add	x23, x9, x8, lsl #2
	subs	x8, x23, x22
	asr	x8, x8, #2
	cmp	x8, x20
	csel	x20, x8, x20, lo
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	ldr	x8, [x19, #32]
	lsl	x9, x20, #32
	add	x8, x8, x9, asr #30
	str	x8, [x19, #32]
	cmp	x23, x22
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #1
	ldr	x9, [x19, #24]
	str	x9, [x19, #32]
Lloh2:
	adrp	x9, _query_socket_write@GOTPAGE
Lloh3:
	ldr	x9, [x9, _query_socket_write@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	str	w9, [x19, #16]
Lloh5:
	adrp	x9, _query_socket_read@GOTPAGE
Lloh6:
	ldr	x9, [x9, _query_socket_read@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w8, w9, [x19, #8]
LBB0_4:
Lloh8:
	adrp	x0, _query_io_buffer_write@PAGE
Lloh9:
	add	x0, x0, _query_io_buffer_write@PAGEOFF
	bl	_TRACE_OUT
	b	LBB0_6
LBB0_5:
	mov	w20, #-1
LBB0_6:
	mov	x0, x20
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_query_socket_write,4,2         ; @query_socket_write
	.comm	_query_socket_read,4,2          ; @query_socket_read
.subsections_via_symbols
