	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function on_upgrade_complete
_on_upgrade_complete:                   ## @on_upgrade_complete
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rsi, (%rbx)
	movq	%rbx, 8(%rsi)
	movq	(%rsi), %rax
	movq	%rax, 8(%rbx)
	movq	_h2o_socket_buffer_prototype@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_h2o_buffer_init
	movq	(%rbx), %rdi
	movq	_on_read@GOTPCREL(%rip), %rsi
	callq	_h2o_socket_read_start
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_h2o_http2_conn_get_stream
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_execute_or_enqueue_request
	movq	8(%rbx), %rax
	movq	(%rax), %r12
	subq	%r15, %r12
	jbe	LBB0_2
## %bb.4:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_h2o_buffer_reserve
	movq	(%r14), %rax
	movq	8(%rax), %rdi
	movq	8(%rbx), %rax
	addq	8(%rax), %r15
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_memcpy
	movq	(%r14), %rax
	addq	%r12, (%rax)
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_on_read                        ## TAILCALL
LBB0_3:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close_connection               ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_h2o_socket_buffer_prototype,4,2 ## @h2o_socket_buffer_prototype
	.no_dead_strip	_on_upgrade_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function on_upgrade_complete
_on_upgrade_complete:                   ; @on_upgrade_complete
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	cbz	x1, LBB0_3
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	str	x19, [x1, #8]
	ldr	x8, [x1]
	stp	x1, x8, [x19]
Lloh0:
	adrp	x1, _h2o_socket_buffer_prototype@GOTPAGE
Lloh1:
	ldr	x1, [x1, _h2o_socket_buffer_prototype@GOTPAGEOFF]
	mov	x0, x20
	bl	_h2o_buffer_init
	ldr	x0, [x19]
Lloh2:
	adrp	x1, _on_read@GOTPAGE
Lloh3:
	ldr	x1, [x1, _on_read@GOTPAGEOFF]
	bl	_h2o_socket_read_start
	mov	x0, x19
	mov	w1, #1
	bl	_h2o_http2_conn_get_stream
	mov	x1, x0
	mov	x0, x19
	bl	_execute_or_enqueue_request
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	subs	x22, x8, x21
	b.ls	LBB0_4
; %bb.2:
	mov	x0, x20
	mov	x1, x22
	bl	_h2o_buffer_reserve
	ldr	x8, [x20]
	ldr	x0, [x8, #8]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	add	x1, x8, x21
	mov	x2, x22
	bl	_memcpy
	ldr	x8, [x20]
	ldr	x9, [x8]
	add	x9, x9, x22
	str	x9, [x8]
	ldr	x0, [x19]
	mov	x1, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_on_read
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_close_connection
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_h2o_socket_buffer_prototype,4,2 ; @h2o_socket_buffer_prototype
	.no_dead_strip	_on_upgrade_complete
.subsections_via_symbols
