	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_to_connection
_write_to_connection:                   ## @write_to_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	$40, %rsp
	.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
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpq	%rax, 8(%rbx)
	jle	LBB0_4
LBB0_2:
	movl	$1, 16(%rbx)
	movq	72(%rbx), %rax
	movl	$1, (%rax)
LBB0_3:
	movq	_APR_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_48
LBB0_4:
	leaq	40(%rbx), %r14
	leaq	84(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	_SERF_CONN_CONNECTED@GOTPCREL(%rip), %rdx
	movq	24(%rbx), %rcx
	movl	$1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	20(%rbx), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rbx), %rcx
	movslq	32(%rbx), %rdx
	subq	%rdx, %rcx
	cltq
	cmpq	%rax, %rcx
	jge	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, (%r14)
	je	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rdi
	callq	_socket_writev
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_APR_STATUS_IS_EAGAIN
	testq	%rax, %rax
	jne	LBB0_3
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r12, %rdi
	callq	_APR_STATUS_IS_EPIPE
	testq	%rax, %rax
	jne	LBB0_46
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r12, %rdi
	callq	_APR_STATUS_IS_ECONNRESET
	testq	%rax, %rax
	jne	LBB0_46
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r12, %rdi
	callq	_APR_STATUS_IS_ECONNABORTED
	testq	%rax, %rax
	jne	LBB0_46
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=2
	testq	%r12, %r12
	je	LBB0_9
	jmp	LBB0_48
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_request_or_data_pending
	testl	%eax, %eax
	je	LBB0_2
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leaq	-72(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	callq	_prepare_conn_streams
	testq	%rax, %rax
	jne	LBB0_47
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, 8(%rdi)
	jne	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_5 Depth=1
	callq	_setup_request
	testq	%rax, %rax
	jne	LBB0_47
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rdi
LBB0_21:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, (%rdi)
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, (%rdi)
	movq	-72(%rbp), %rax
	movq	8(%rdi), %rsi
	movq	%rax, %rdi
	callq	_serf_bucket_aggregate_append
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rdi
	movq	_SERF_READ_ALL_AVAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IOV_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	80(%rbx), %ecx
	movq	%r14, %r8
	callq	_serf_bucket_read_iovec
	movq	%rax, %r13
	movb	$1, %r15b
	cmpq	$0, 64(%rbx)
	jne	LBB0_30
## %bb.24:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	callq	_APR_STATUS_IS_EAGAIN
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r15d, %r15d
	jmp	LBB0_30
LBB0_26:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_SERF_ERROR_WAIT_CONN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, 48(%rbx)
	movl	$1, 16(%rbx)
	movq	72(%rbx), %rax
	movl	$1, (%rax)
	jmp	LBB0_30
LBB0_28:                                ##   in Loop: Header=BB0_5 Depth=1
	testq	%r13, %r13
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	callq	_APR_STATUS_IS_EOF
	testl	%eax, %eax
	je	LBB0_52
LBB0_30:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, (%r14)
	jle	LBB0_36
## %bb.31:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_socket_writev
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_APR_STATUS_IS_EAGAIN
	testq	%rax, %rax
	jne	LBB0_3
## %bb.32:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_APR_STATUS_IS_EPIPE
	testq	%rax, %rax
	jne	LBB0_46
## %bb.33:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_APR_STATUS_IS_ECONNRESET
	testq	%rax, %rax
	jne	LBB0_46
## %bb.34:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_APR_STATUS_IS_ECONNABORTED
	testq	%rax, %rax
	jne	LBB0_46
## %bb.35:                              ##   in Loop: Header=BB0_5 Depth=1
	testq	%r12, %r12
	jne	LBB0_48
LBB0_36:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_SERF_ERROR_WAIT_CONN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_50
## %bb.37:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_45
## %bb.38:                              ##   in Loop: Header=BB0_5 Depth=1
	testq	%r13, %r13
	je	LBB0_45
## %bb.39:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, 64(%rbx)
	je	LBB0_45
## %bb.40:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, (%r14)
	jne	LBB0_45
## %bb.41:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	$0, 64(%rbx)
	movq	8(%rax), %rdi
	callq	_serf_bucket_destroy
	movq	-48(%rbp), %rdi
	movq	$0, 8(%rdi)
	cmpq	$0, 56(%rbx)
	je	LBB0_43
## %bb.42:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%rdi), %eax
	movl	%eax, 52(%rbx)
	callq	_destroy_request
LBB0_43:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	leaq	1(%rcx), %rdx
	movq	%rdx, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_45
## %bb.44:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rax, %rcx
	jge	LBB0_3
LBB0_45:                                ##   in Loop: Header=BB0_5 Depth=1
	testb	%r15b, %r15b
	jne	LBB0_5
	jmp	LBB0_3
LBB0_46:
	movq	%rbx, %rdi
	callq	_no_more_writes
LBB0_47:
	movq	%rax, %r12
LBB0_48:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_50:
	movl	$1, 48(%rbx)
	jmp	LBB0_2
LBB0_52:
	movq	%r13, %r12
	jmp	LBB0_48
	.cfi_endproc
                                        ## -- End function
	.comm	_APR_SUCCESS,8,3                ## @APR_SUCCESS
	.comm	_SERF_CONN_CONNECTED,8,3        ## @SERF_CONN_CONNECTED
	.comm	_SERF_READ_ALL_AVAIL,4,2        ## @SERF_READ_ALL_AVAIL
	.comm	_IOV_MAX,4,2                    ## @IOV_MAX
	.comm	_SERF_ERROR_WAIT_CONN,8,3       ## @SERF_ERROR_WAIT_CONN
	.no_dead_strip	_write_to_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_to_connection
_write_to_connection:                   ; @write_to_connection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x24, _APR_SUCCESS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _APR_SUCCESS@GOTPAGEOFF]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x9, [x19, #8]
	cmp	x9, x8
	b.le	LBB0_5
LBB0_2:
	mov	w8, #1
LBB0_3:
	str	w8, [x19, #16]
	ldr	x9, [x19, #72]
	str	w8, [x9]
LBB0_4:
	ldr	x22, [x24]
	b	LBB0_49
LBB0_5:
	add	x20, x19, #40
Lloh2:
	adrp	x25, _SERF_CONN_CONNECTED@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SERF_CONN_CONNECTED@GOTPAGEOFF]
	add	x21, x19, #84
Lloh4:
	adrp	x27, _IOV_MAX@GOTPAGE
Lloh5:
	ldr	x27, [x27, _IOV_MAX@GOTPAGEOFF]
Lloh6:
	adrp	x28, _SERF_ERROR_WAIT_CONN@GOTPAGE
Lloh7:
	ldr	x28, [x28, _SERF_ERROR_WAIT_CONN@GOTPAGEOFF]
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	w8, [x19, #20]
	ldr	x9, [x19, #24]
	ldr	x10, [x25]
	cmp	x9, x10
	csinc	w8, w8, wzr, eq
	cbz	w8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19, #8]
	ldrsw	x10, [x19, #32]
	sub	x9, x9, x10
	cmp	x9, w8, sxtw
	b.ge	LBB0_4
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20]
	cbz	x8, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x19
	bl	_socket_writev
	mov	x22, x0
	bl	_APR_STATUS_IS_EAGAIN
	cbnz	x0, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x22
	bl	_APR_STATUS_IS_EPIPE
	cbnz	x0, LBB0_47
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x22
	bl	_APR_STATUS_IS_ECONNRESET
	cbnz	x0, LBB0_47
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x22
	bl	_APR_STATUS_IS_ECONNABORTED
	cbnz	x0, LBB0_47
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=2
	cbz	x22, LBB0_8
	b	LBB0_49
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #24
	mov	x1, x19
	bl	_request_or_data_pending
	cbz	w0, LBB0_2
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x21
	bl	_prepare_conn_streams
	cbnz	x0, LBB0_48
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	bl	_setup_request
	cbnz	x0, LBB0_48
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [sp, #24]
LBB0_20:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x0]
	cbnz	w8, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, #1
	str	w8, [x0]
	ldr	x8, [sp, #16]
	ldr	x1, [x0, #8]
	mov	x0, x8
	bl	_serf_bucket_aggregate_append
LBB0_22:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [sp, #8]
Lloh8:
	adrp	x8, _SERF_READ_ALL_AVAIL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SERF_READ_ALL_AVAIL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w2, [x27]
	ldr	w3, [x19, #80]
	mov	x4, x20
	bl	_serf_bucket_read_iovec
	mov	x23, x0
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w26, #1
	b	LBB0_28
LBB0_24:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_APR_STATUS_IS_EAGAIN
	cbz	x0, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w26, #0
	b	LBB0_28
LBB0_26:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x28]
	cmp	x23, x8
	b.ne	LBB0_44
; %bb.27:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w26, #1
	str	w26, [x19, #48]
	str	w26, [x19, #16]
	ldr	x8, [x19, #72]
	str	w26, [x8]
LBB0_28:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_34
; %bb.29:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_socket_writev
	mov	x22, x0
	bl	_APR_STATUS_IS_EAGAIN
	cbnz	x0, LBB0_4
; %bb.30:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_APR_STATUS_IS_EPIPE
	cbnz	x0, LBB0_47
; %bb.31:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_APR_STATUS_IS_ECONNRESET
	cbnz	x0, LBB0_47
; %bb.32:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_APR_STATUS_IS_ECONNABORTED
	cbnz	x0, LBB0_47
; %bb.33:                               ;   in Loop: Header=BB0_6 Depth=1
	cbnz	x22, LBB0_49
LBB0_34:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x28]
	cmp	x23, x8
	b.eq	LBB0_50
; %bb.35:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_43
; %bb.36:                               ;   in Loop: Header=BB0_6 Depth=1
	cbz	x23, LBB0_43
; %bb.37:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19, #64]
	cbz	x9, LBB0_43
; %bb.38:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x20]
	cbnz	x9, LBB0_43
; %bb.39:                               ;   in Loop: Header=BB0_6 Depth=1
	str	xzr, [x19, #64]
	ldr	x0, [x8, #8]
	bl	_serf_bucket_destroy
	ldr	x0, [sp, #24]
	str	xzr, [x0, #8]
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_41
; %bb.40:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x0, #4]
	str	w8, [x19, #52]
	bl	_destroy_request
LBB0_41:                                ;   in Loop: Header=BB0_6 Depth=1
	ldp	x9, x8, [x19]
	add	x10, x8, #1
	str	x10, [x19, #8]
	cbz	x9, LBB0_43
; %bb.42:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	x8, x9
	b.ge	LBB0_4
LBB0_43:                                ;   in Loop: Header=BB0_6 Depth=1
	tbnz	w26, #0, LBB0_6
	b	LBB0_4
LBB0_44:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x23, LBB0_23
; %bb.45:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_APR_STATUS_IS_EOF
	cbnz	w0, LBB0_23
; %bb.46:
	mov	x22, x23
	b	LBB0_49
LBB0_47:
	mov	x0, x19
	bl	_no_more_writes
LBB0_48:
	mov	x22, x0
LBB0_49:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_50:
	mov	w8, #1
	str	w8, [x19, #48]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_APR_SUCCESS,8,3                ; @APR_SUCCESS
	.comm	_SERF_CONN_CONNECTED,8,3        ; @SERF_CONN_CONNECTED
	.comm	_SERF_READ_ALL_AVAIL,4,2        ; @SERF_READ_ALL_AVAIL
	.comm	_IOV_MAX,4,2                    ; @IOV_MAX
	.comm	_SERF_ERROR_WAIT_CONN,8,3       ; @SERF_ERROR_WAIT_CONN
	.no_dead_strip	_write_to_connection
.subsections_via_symbols
