	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_http2_decode_headers_payload ## -- Begin function h2o_http2_decode_headers_payload
	.p2align	4, 0x90
_h2o_http2_decode_headers_payload:      ## @h2o_http2_decode_headers_payload
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpq	$0, 8(%rsi)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r14
	movq	24(%rsi), %rax
	movslq	(%rsi), %rdi
	leaq	(%rax,%rdi,4), %rbx
	movl	16(%rsi), %ecx
	movq	_H2O_HTTP2_FRAME_FLAG_PADDED@GOTPCREL(%rip), %rsi
	testl	%ecx, (%rsi)
	je	LBB0_8
## %bb.4:
	testl	%edi, %edi
	je	LBB0_5
## %bb.6:
	movslq	(%rax), %rsi
	leaq	-4(,%rdi,4), %rdi
	sarq	$2, %rdi
	cmpq	%rsi, %rdi
	jge	LBB0_7
LBB0_5:
	leaq	L_.str.1(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rax
LBB0_2:
	movq	%rax, (%rdx)
	movq	_H2O_HTTP2_ERROR_PROTOCOL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_13
LBB0_7:
	addq	$4, %rax
	shlq	$2, %rsi
	subq	%rsi, %rbx
LBB0_8:
	movq	_H2O_HTTP2_FRAME_FLAG_PRIORITY@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_11
## %bb.9:
	movq	%rbx, %rdx
	subq	%rax, %rdx
	movl	$-1, %ecx
	cmpq	$20, %rdx
	jl	LBB0_13
## %bb.10:
	leaq	16(%r14), %rdi
	movq	%rax, %rsi
	callq	_decode_priority
	jmp	LBB0_12
LBB0_11:
	movq	_h2o_http2_default_priority@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r14)
LBB0_12:
	movq	%rax, 8(%r14)
	subq	%rax, %rbx
	shrq	$2, %rbx
	movl	%ebx, (%r14)
	xorl	%ecx, %ecx
LBB0_13:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid stream id in HEADERS frame"

	.comm	_H2O_HTTP2_ERROR_PROTOCOL,4,2   ## @H2O_HTTP2_ERROR_PROTOCOL
	.comm	_H2O_HTTP2_FRAME_FLAG_PADDED,4,2 ## @H2O_HTTP2_FRAME_FLAG_PADDED
L_.str.1:                               ## @.str.1
	.asciz	"invalid HEADERS frame"

	.comm	_H2O_HTTP2_FRAME_FLAG_PRIORITY,4,2 ## @H2O_HTTP2_FRAME_FLAG_PRIORITY
	.comm	_h2o_http2_default_priority,4,2 ## @h2o_http2_default_priority
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_http2_decode_headers_payload ; -- Begin function h2o_http2_decode_headers_payload
	.p2align	2
_h2o_http2_decode_headers_payload:      ; @h2o_http2_decode_headers_payload
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x8, [x1, #24]
	ldrsw	x10, [x1]
	add	x20, x8, x10, lsl #2
	ldr	w9, [x1, #16]
Lloh0:
	adrp	x11, _H2O_HTTP2_FRAME_FLAG_PADDED@GOTPAGE
Lloh1:
	ldr	x11, [x11, _H2O_HTTP2_FRAME_FLAG_PADDED@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	tst	w11, w9
	b.eq	LBB0_8
; %bb.2:
	cbz	w10, LBB0_4
; %bb.3:
	ldrsw	x11, [x8]
	lsl	x10, x10, #2
	sub	x10, x10, #4
	cmp	x11, x10, asr #2
	b.le	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, l_.str.1@PAGE
Lloh4:
	add	x8, x8, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, l_.str@PAGE
Lloh6:
	add	x8, x8, l_.str@PAGEOFF
LBB0_6:
	str	x8, [x2]
Lloh7:
	adrp	x8, _H2O_HTTP2_ERROR_PROTOCOL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _H2O_HTTP2_ERROR_PROTOCOL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_14
LBB0_7:
	add	x8, x8, #4
	sub	x20, x20, x11, lsl #2
LBB0_8:
Lloh10:
	adrp	x10, _H2O_HTTP2_FRAME_FLAG_PRIORITY@GOTPAGE
Lloh11:
	ldr	x10, [x10, _H2O_HTTP2_FRAME_FLAG_PRIORITY@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_11
; %bb.9:
	sub	x9, x20, x8
	cmp	x9, #20
	b.ge	LBB0_12
; %bb.10:
	mov	w0, #-1
	b	LBB0_14
LBB0_11:
Lloh13:
	adrp	x9, _h2o_http2_default_priority@GOTPAGE
Lloh14:
	ldr	x9, [x9, _h2o_http2_default_priority@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	str	w9, [x19, #16]
	b	LBB0_13
LBB0_12:
	add	x0, x19, #16
	mov	x1, x8
	bl	_decode_priority
	mov	x8, x0
LBB0_13:
	mov	w0, #0
	str	x8, [x19, #8]
	sub	x8, x20, x8
	lsr	x8, x8, #2
	str	w8, [x19]
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid stream id in HEADERS frame"

	.comm	_H2O_HTTP2_ERROR_PROTOCOL,4,2   ; @H2O_HTTP2_ERROR_PROTOCOL
	.comm	_H2O_HTTP2_FRAME_FLAG_PADDED,4,2 ; @H2O_HTTP2_FRAME_FLAG_PADDED
l_.str.1:                               ; @.str.1
	.asciz	"invalid HEADERS frame"

	.comm	_H2O_HTTP2_FRAME_FLAG_PRIORITY,4,2 ; @H2O_HTTP2_FRAME_FLAG_PRIORITY
	.comm	_h2o_http2_default_priority,4,2 ; @h2o_http2_default_priority
.subsections_via_symbols
