	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_http3_encode_priority_frame ## -- Begin function h2o_http3_encode_priority_frame
	.p2align	4, 0x90
_h2o_http3_encode_priority_frame:       ## @h2o_http3_encode_priority_frame
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	24(%rsi), %rax
	movq	_H2O_HTTP3_PRIORITY_ELEMENT_TYPE_ROOT@GOTPCREL(%rip), %r13
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	setne	%dil
	callq	_assert
	movq	_H2O_HTTP3_FRAME_TYPE_PRIORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	leaq	8(%r14), %r12
	movl	24(%r15), %eax
	shll	$6, %eax
	movl	(%r15), %ecx
	movl	8(%r15), %edx
	shll	$4, %edx
	orl	%eax, %edx
	shll	$3, %ecx
	orl	%edx, %ecx
	leaq	12(%r14), %rdi
	movl	%ecx, 8(%r14)
	movl	32(%r15), %esi
	callq	_quicly_encodev
	movq	%rax, %rbx
	movq	8(%r15), %rax
	cmpq	(%r13), %rax
	je	LBB0_2
## %bb.1:
	movl	16(%r15), %esi
	movq	%rbx, %rdi
	callq	_quicly_encodev
	movq	%rax, %rbx
LBB0_2:
	movl	4(%r15), %eax
	movl	%eax, (%rbx)
	addq	$4, %rbx
	movq	%rbx, %rax
	subq	%r12, %rax
	shrq	$2, %rax
	movl	%eax, 4(%r14)
	movq	%rbx, %rax
	subq	%r14, %rax
	sarq	$2, %rax
	movq	_H2O_HTTP3_PRIORITY_FRAME_CAPACITY@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setl	%dil
	callq	_assert
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_H2O_HTTP3_PRIORITY_ELEMENT_TYPE_ROOT,8,3 ## @H2O_HTTP3_PRIORITY_ELEMENT_TYPE_ROOT
	.comm	_H2O_HTTP3_FRAME_TYPE_PRIORITY,4,2 ## @H2O_HTTP3_FRAME_TYPE_PRIORITY
	.comm	_H2O_HTTP3_PRIORITY_FRAME_CAPACITY,4,2 ## @H2O_HTTP3_PRIORITY_FRAME_CAPACITY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_http3_encode_priority_frame ; -- Begin function h2o_http3_encode_priority_frame
	.p2align	2
_h2o_http3_encode_priority_frame:       ; @h2o_http3_encode_priority_frame
	.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, x1
	mov	x19, x0
	ldr	x8, [x1, #24]
Lloh0:
	adrp	x23, _H2O_HTTP3_PRIORITY_ELEMENT_TYPE_ROOT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _H2O_HTTP3_PRIORITY_ELEMENT_TYPE_ROOT@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	cset	w0, ne
	bl	_assert
Lloh2:
	adrp	x8, _H2O_HTTP3_FRAME_TYPE_PRIORITY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _H2O_HTTP3_FRAME_TYPE_PRIORITY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w8, [x20, #24]
	ldr	w9, [x20, #8]
	lsl	w9, w9, #4
	orr	w8, w9, w8, lsl #6
	ldr	w9, [x20]
	orr	w8, w8, w9, lsl #3
	mov	x22, x19
	str	w8, [x22, #8]!
	add	x0, x22, #4
	ldr	w1, [x20, #32]
	bl	_quicly_encodev
	mov	x21, x0
	ldr	x8, [x20, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x20, #16]
	mov	x0, x21
	bl	_quicly_encodev
	mov	x21, x0
LBB0_2:
	ldr	w8, [x20, #4]
	str	w8, [x21], #4
	sub	x8, x21, x22
	lsr	x8, x8, #2
	str	w8, [x19, #4]
	sub	x8, x21, x19
Lloh5:
	adrp	x9, _H2O_HTTP3_PRIORITY_FRAME_CAPACITY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _H2O_HTTP3_PRIORITY_FRAME_CAPACITY@GOTPAGEOFF]
Lloh7:
	ldrsw	x9, [x9]
	cmp	x9, x8, asr #2
	cset	w0, gt
	bl	_assert
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_H2O_HTTP3_PRIORITY_ELEMENT_TYPE_ROOT,8,3 ; @H2O_HTTP3_PRIORITY_ELEMENT_TYPE_ROOT
	.comm	_H2O_HTTP3_FRAME_TYPE_PRIORITY,4,2 ; @H2O_HTTP3_FRAME_TYPE_PRIORITY
	.comm	_H2O_HTTP3_PRIORITY_FRAME_CAPACITY,4,2 ; @H2O_HTTP3_PRIORITY_FRAME_CAPACITY
.subsections_via_symbols
