Apply PIE to nghttpx
[platform/upstream/nghttp2.git] / third-party / llhttp / src / llhttp.c
1 #include <stdlib.h>
2 #include <stdint.h>
3 #include <string.h>
4
5 #ifdef __SSE4_2__
6  #ifdef _MSC_VER
7   #include <nmmintrin.h>
8  #else  /* !_MSC_VER */
9   #include <x86intrin.h>
10  #endif  /* _MSC_VER */
11 #endif  /* __SSE4_2__ */
12
13 #ifdef _MSC_VER
14  #define ALIGN(n) _declspec(align(n))
15 #else  /* !_MSC_VER */
16  #define ALIGN(n) __attribute__((aligned(n)))
17 #endif  /* _MSC_VER */
18
19 #include "llhttp.h"
20
21 typedef int (*llhttp__internal__span_cb)(
22              llhttp__internal_t*, const char*, const char*);
23
24 static const unsigned char llparse_blob0[] = {
25   'C', 'L'
26 };
27 #ifdef __SSE4_2__
28 static const unsigned char ALIGN(16) llparse_blob1[] = {
29   0x9, 0x9, 0xc, 0xc, '!', '"', '$', '>', '@', '~', 0x80,
30   0xff, 0x0, 0x0, 0x0, 0x0
31 };
32 #endif  /* __SSE4_2__ */
33 static const unsigned char llparse_blob2[] = {
34   'o', 'n'
35 };
36 static const unsigned char llparse_blob3[] = {
37   'e', 'c', 't', 'i', 'o', 'n'
38 };
39 static const unsigned char llparse_blob4[] = {
40   'l', 'o', 's', 'e'
41 };
42 static const unsigned char llparse_blob5[] = {
43   'e', 'e', 'p', '-', 'a', 'l', 'i', 'v', 'e'
44 };
45 static const unsigned char llparse_blob6[] = {
46   'p', 'g', 'r', 'a', 'd', 'e'
47 };
48 #ifdef __SSE4_2__
49 static const unsigned char ALIGN(16) llparse_blob7[] = {
50   0x9, 0x9, ' ', '~', 0x80, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0,
51   0x0, 0x0, 0x0, 0x0, 0x0
52 };
53 #endif  /* __SSE4_2__ */
54 static const unsigned char llparse_blob8[] = {
55   'c', 'h', 'u', 'n', 'k', 'e', 'd'
56 };
57 #ifdef __SSE4_2__
58 static const unsigned char ALIGN(16) llparse_blob9[] = {
59   ' ', '!', '#', '\'', '*', '+', '-', '.', '0', '9', 'A',
60   'Z', '^', 'z', '|', '|'
61 };
62 #endif  /* __SSE4_2__ */
63 #ifdef __SSE4_2__
64 static const unsigned char ALIGN(16) llparse_blob10[] = {
65   '~', '~', 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
66   0x0, 0x0, 0x0, 0x0, 0x0
67 };
68 #endif  /* __SSE4_2__ */
69 static const unsigned char llparse_blob11[] = {
70   'e', 'n', 't', '-', 'l', 'e', 'n', 'g', 't', 'h'
71 };
72 static const unsigned char llparse_blob12[] = {
73   'r', 'o', 'x', 'y', '-', 'c', 'o', 'n', 'n', 'e', 'c',
74   't', 'i', 'o', 'n'
75 };
76 static const unsigned char llparse_blob13[] = {
77   'r', 'a', 'n', 's', 'f', 'e', 'r', '-', 'e', 'n', 'c',
78   'o', 'd', 'i', 'n', 'g'
79 };
80 static const unsigned char llparse_blob14[] = {
81   'p', 'g', 'r', 'a', 'd', 'e'
82 };
83 static const unsigned char llparse_blob15[] = {
84   0xd, 0xa
85 };
86 static const unsigned char llparse_blob16[] = {
87   'T', 'T', 'P', '/'
88 };
89 static const unsigned char llparse_blob17[] = {
90   'C', 'E', '/'
91 };
92 static const unsigned char llparse_blob18[] = {
93   'I', 'N', 'D'
94 };
95 static const unsigned char llparse_blob19[] = {
96   'E', 'C', 'K', 'O', 'U', 'T'
97 };
98 static const unsigned char llparse_blob20[] = {
99   'N', 'E', 'C', 'T'
100 };
101 static const unsigned char llparse_blob21[] = {
102   'E', 'L', 'E', 'T', 'E'
103 };
104 static const unsigned char llparse_blob22[] = {
105   'E', 'T'
106 };
107 static const unsigned char llparse_blob23[] = {
108   'E', 'A', 'D'
109 };
110 static const unsigned char llparse_blob24[] = {
111   'N', 'K'
112 };
113 static const unsigned char llparse_blob25[] = {
114   'C', 'K'
115 };
116 static const unsigned char llparse_blob26[] = {
117   'S', 'E', 'A', 'R', 'C', 'H'
118 };
119 static const unsigned char llparse_blob27[] = {
120   'R', 'G', 'E'
121 };
122 static const unsigned char llparse_blob28[] = {
123   'C', 'T', 'I', 'V', 'I', 'T', 'Y'
124 };
125 static const unsigned char llparse_blob29[] = {
126   'L', 'E', 'N', 'D', 'A', 'R'
127 };
128 static const unsigned char llparse_blob30[] = {
129   'V', 'E'
130 };
131 static const unsigned char llparse_blob31[] = {
132   'O', 'T', 'I', 'F', 'Y'
133 };
134 static const unsigned char llparse_blob32[] = {
135   'P', 'T', 'I', 'O', 'N', 'S'
136 };
137 static const unsigned char llparse_blob33[] = {
138   'T', 'C', 'H'
139 };
140 static const unsigned char llparse_blob34[] = {
141   'S', 'T'
142 };
143 static const unsigned char llparse_blob35[] = {
144   'O', 'P'
145 };
146 static const unsigned char llparse_blob36[] = {
147   'I', 'N', 'D'
148 };
149 static const unsigned char llparse_blob37[] = {
150   'A', 'T', 'C', 'H'
151 };
152 static const unsigned char llparse_blob38[] = {
153   'G', 'E'
154 };
155 static const unsigned char llparse_blob39[] = {
156   'I', 'N', 'D'
157 };
158 static const unsigned char llparse_blob40[] = {
159   'O', 'R', 'T'
160 };
161 static const unsigned char llparse_blob41[] = {
162   'A', 'R', 'C', 'H'
163 };
164 static const unsigned char llparse_blob42[] = {
165   'U', 'R', 'C', 'E'
166 };
167 static const unsigned char llparse_blob43[] = {
168   'B', 'S', 'C', 'R', 'I', 'B', 'E'
169 };
170 static const unsigned char llparse_blob44[] = {
171   'R', 'A', 'C', 'E'
172 };
173 static const unsigned char llparse_blob45[] = {
174   'I', 'N', 'D'
175 };
176 static const unsigned char llparse_blob46[] = {
177   'N', 'K'
178 };
179 static const unsigned char llparse_blob47[] = {
180   'C', 'K'
181 };
182 static const unsigned char llparse_blob48[] = {
183   'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E'
184 };
185 static const unsigned char llparse_blob49[] = {
186   'H', 'T', 'T', 'P', '/'
187 };
188 static const unsigned char llparse_blob50[] = {
189   'A', 'D'
190 };
191 static const unsigned char llparse_blob51[] = {
192   'T', 'P', '/'
193 };
194
195 enum llparse_match_status_e {
196   kMatchComplete,
197   kMatchPause,
198   kMatchMismatch
199 };
200 typedef enum llparse_match_status_e llparse_match_status_t;
201
202 struct llparse_match_s {
203   llparse_match_status_t status;
204   const unsigned char* current;
205 };
206 typedef struct llparse_match_s llparse_match_t;
207
208 static llparse_match_t llparse__match_sequence_id(
209     llhttp__internal_t* s, const unsigned char* p,
210     const unsigned char* endp,
211     const unsigned char* seq, uint32_t seq_len) {
212   uint32_t index;
213   llparse_match_t res;
214
215   index = s->_index;
216   for (; p != endp; p++) {
217     unsigned char current;
218
219     current = *p;
220     if (current == seq[index]) {
221       if (++index == seq_len) {
222         res.status = kMatchComplete;
223         goto reset;
224       }
225     } else {
226       res.status = kMatchMismatch;
227       goto reset;
228     }
229   }
230   s->_index = index;
231   res.status = kMatchPause;
232   res.current = p;
233   return res;
234 reset:
235   s->_index = 0;
236   res.current = p;
237   return res;
238 }
239
240 static llparse_match_t llparse__match_sequence_to_lower_unsafe(
241     llhttp__internal_t* s, const unsigned char* p,
242     const unsigned char* endp,
243     const unsigned char* seq, uint32_t seq_len) {
244   uint32_t index;
245   llparse_match_t res;
246
247   index = s->_index;
248   for (; p != endp; p++) {
249     unsigned char current;
250
251     current = ((*p) | 0x20);
252     if (current == seq[index]) {
253       if (++index == seq_len) {
254         res.status = kMatchComplete;
255         goto reset;
256       }
257     } else {
258       res.status = kMatchMismatch;
259       goto reset;
260     }
261   }
262   s->_index = index;
263   res.status = kMatchPause;
264   res.current = p;
265   return res;
266 reset:
267   s->_index = 0;
268   res.current = p;
269   return res;
270 }
271
272 enum llparse_state_e {
273   s_error,
274   s_n_llhttp__internal__n_invoke_llhttp__after_message_complete,
275   s_n_llhttp__internal__n_pause_1,
276   s_n_llhttp__internal__n_invoke_is_equal_upgrade,
277   s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2,
278   s_n_llhttp__internal__n_chunk_data_almost_done_skip,
279   s_n_llhttp__internal__n_chunk_data_almost_done,
280   s_n_llhttp__internal__n_consume_content_length,
281   s_n_llhttp__internal__n_span_start_llhttp__on_body,
282   s_n_llhttp__internal__n_invoke_is_equal_content_length,
283   s_n_llhttp__internal__n_chunk_size_almost_done,
284   s_n_llhttp__internal__n_chunk_parameters,
285   s_n_llhttp__internal__n_chunk_size_otherwise,
286   s_n_llhttp__internal__n_chunk_size,
287   s_n_llhttp__internal__n_chunk_size_digit,
288   s_n_llhttp__internal__n_invoke_update_content_length,
289   s_n_llhttp__internal__n_consume_content_length_1,
290   s_n_llhttp__internal__n_span_start_llhttp__on_body_1,
291   s_n_llhttp__internal__n_eof,
292   s_n_llhttp__internal__n_span_start_llhttp__on_body_2,
293   s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete,
294   s_n_llhttp__internal__n_headers_almost_done,
295   s_n_llhttp__internal__n_span_start_llhttp__on_header_value,
296   s_n_llhttp__internal__n_header_value_discard_lws,
297   s_n_llhttp__internal__n_header_value_discard_ws_almost_done,
298   s_n_llhttp__internal__n_header_value_lws,
299   s_n_llhttp__internal__n_header_value_almost_done,
300   s_n_llhttp__internal__n_header_value_lenient,
301   s_n_llhttp__internal__n_header_value_otherwise,
302   s_n_llhttp__internal__n_header_value_connection_token,
303   s_n_llhttp__internal__n_header_value_connection_ws,
304   s_n_llhttp__internal__n_header_value_connection_1,
305   s_n_llhttp__internal__n_header_value_connection_2,
306   s_n_llhttp__internal__n_header_value_connection_3,
307   s_n_llhttp__internal__n_header_value_connection,
308   s_n_llhttp__internal__n_error_18,
309   s_n_llhttp__internal__n_header_value,
310   s_n_llhttp__internal__n_header_value_discard_rws,
311   s_n_llhttp__internal__n_error_19,
312   s_n_llhttp__internal__n_header_value_content_length_ws,
313   s_n_llhttp__internal__n_header_value_content_length,
314   s_n_llhttp__internal__n_header_value_te_chunked_last,
315   s_n_llhttp__internal__n_header_value_te_token_ows,
316   s_n_llhttp__internal__n_header_value_te_token,
317   s_n_llhttp__internal__n_header_value_te_chunked,
318   s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1,
319   s_n_llhttp__internal__n_header_value_discard_ws,
320   s_n_llhttp__internal__n_header_field_general_otherwise,
321   s_n_llhttp__internal__n_header_field_general,
322   s_n_llhttp__internal__n_header_field_colon,
323   s_n_llhttp__internal__n_header_field_3,
324   s_n_llhttp__internal__n_header_field_4,
325   s_n_llhttp__internal__n_header_field_2,
326   s_n_llhttp__internal__n_header_field_1,
327   s_n_llhttp__internal__n_header_field_5,
328   s_n_llhttp__internal__n_header_field_6,
329   s_n_llhttp__internal__n_header_field_7,
330   s_n_llhttp__internal__n_header_field,
331   s_n_llhttp__internal__n_span_start_llhttp__on_header_field,
332   s_n_llhttp__internal__n_header_field_start,
333   s_n_llhttp__internal__n_url_skip_to_http09,
334   s_n_llhttp__internal__n_url_skip_lf_to_http09,
335   s_n_llhttp__internal__n_req_http_end_1,
336   s_n_llhttp__internal__n_req_http_end,
337   s_n_llhttp__internal__n_req_http_minor,
338   s_n_llhttp__internal__n_req_http_dot,
339   s_n_llhttp__internal__n_req_http_major,
340   s_n_llhttp__internal__n_req_http_start_1,
341   s_n_llhttp__internal__n_req_http_start_2,
342   s_n_llhttp__internal__n_req_http_start,
343   s_n_llhttp__internal__n_url_skip_to_http,
344   s_n_llhttp__internal__n_url_fragment,
345   s_n_llhttp__internal__n_span_end_stub_query_3,
346   s_n_llhttp__internal__n_url_query,
347   s_n_llhttp__internal__n_url_query_or_fragment,
348   s_n_llhttp__internal__n_url_path,
349   s_n_llhttp__internal__n_span_start_stub_path_2,
350   s_n_llhttp__internal__n_span_start_stub_path,
351   s_n_llhttp__internal__n_span_start_stub_path_1,
352   s_n_llhttp__internal__n_url_server_with_at,
353   s_n_llhttp__internal__n_url_server,
354   s_n_llhttp__internal__n_url_schema_delim_1,
355   s_n_llhttp__internal__n_url_schema_delim,
356   s_n_llhttp__internal__n_span_end_stub_schema,
357   s_n_llhttp__internal__n_url_schema,
358   s_n_llhttp__internal__n_url_start,
359   s_n_llhttp__internal__n_span_start_llhttp__on_url_1,
360   s_n_llhttp__internal__n_span_start_llhttp__on_url,
361   s_n_llhttp__internal__n_req_spaces_before_url,
362   s_n_llhttp__internal__n_req_first_space_before_url,
363   s_n_llhttp__internal__n_start_req_1,
364   s_n_llhttp__internal__n_start_req_2,
365   s_n_llhttp__internal__n_start_req_4,
366   s_n_llhttp__internal__n_start_req_6,
367   s_n_llhttp__internal__n_start_req_7,
368   s_n_llhttp__internal__n_start_req_5,
369   s_n_llhttp__internal__n_start_req_3,
370   s_n_llhttp__internal__n_start_req_8,
371   s_n_llhttp__internal__n_start_req_9,
372   s_n_llhttp__internal__n_start_req_10,
373   s_n_llhttp__internal__n_start_req_12,
374   s_n_llhttp__internal__n_start_req_13,
375   s_n_llhttp__internal__n_start_req_11,
376   s_n_llhttp__internal__n_start_req_15,
377   s_n_llhttp__internal__n_start_req_16,
378   s_n_llhttp__internal__n_start_req_18,
379   s_n_llhttp__internal__n_start_req_20,
380   s_n_llhttp__internal__n_start_req_21,
381   s_n_llhttp__internal__n_start_req_19,
382   s_n_llhttp__internal__n_start_req_17,
383   s_n_llhttp__internal__n_start_req_22,
384   s_n_llhttp__internal__n_start_req_14,
385   s_n_llhttp__internal__n_start_req_23,
386   s_n_llhttp__internal__n_start_req_24,
387   s_n_llhttp__internal__n_start_req_26,
388   s_n_llhttp__internal__n_start_req_27,
389   s_n_llhttp__internal__n_start_req_30,
390   s_n_llhttp__internal__n_start_req_31,
391   s_n_llhttp__internal__n_start_req_29,
392   s_n_llhttp__internal__n_start_req_28,
393   s_n_llhttp__internal__n_start_req_33,
394   s_n_llhttp__internal__n_start_req_32,
395   s_n_llhttp__internal__n_start_req_25,
396   s_n_llhttp__internal__n_start_req_36,
397   s_n_llhttp__internal__n_start_req_37,
398   s_n_llhttp__internal__n_start_req_35,
399   s_n_llhttp__internal__n_start_req_34,
400   s_n_llhttp__internal__n_start_req_39,
401   s_n_llhttp__internal__n_start_req_40,
402   s_n_llhttp__internal__n_start_req_41,
403   s_n_llhttp__internal__n_start_req_38,
404   s_n_llhttp__internal__n_start_req_42,
405   s_n_llhttp__internal__n_start_req_45,
406   s_n_llhttp__internal__n_start_req_47,
407   s_n_llhttp__internal__n_start_req_48,
408   s_n_llhttp__internal__n_start_req_46,
409   s_n_llhttp__internal__n_start_req_49,
410   s_n_llhttp__internal__n_start_req_44,
411   s_n_llhttp__internal__n_start_req_43,
412   s_n_llhttp__internal__n_start_req,
413   s_n_llhttp__internal__n_res_line_almost_done,
414   s_n_llhttp__internal__n_res_status,
415   s_n_llhttp__internal__n_span_start_llhttp__on_status,
416   s_n_llhttp__internal__n_res_status_start,
417   s_n_llhttp__internal__n_res_status_code_otherwise,
418   s_n_llhttp__internal__n_res_status_code,
419   s_n_llhttp__internal__n_res_http_end,
420   s_n_llhttp__internal__n_res_http_minor,
421   s_n_llhttp__internal__n_res_http_dot,
422   s_n_llhttp__internal__n_res_http_major,
423   s_n_llhttp__internal__n_start_res,
424   s_n_llhttp__internal__n_req_or_res_method_2,
425   s_n_llhttp__internal__n_req_or_res_method_3,
426   s_n_llhttp__internal__n_req_or_res_method_1,
427   s_n_llhttp__internal__n_req_or_res_method,
428   s_n_llhttp__internal__n_start_req_or_res,
429   s_n_llhttp__internal__n_invoke_load_type,
430   s_n_llhttp__internal__n_start,
431 };
432 typedef enum llparse_state_e llparse_state_t;
433
434 int llhttp__on_url(
435     llhttp__internal_t* s, const unsigned char* p,
436     const unsigned char* endp);
437
438 int llhttp__on_header_field(
439     llhttp__internal_t* s, const unsigned char* p,
440     const unsigned char* endp);
441
442 int llhttp__on_header_value(
443     llhttp__internal_t* s, const unsigned char* p,
444     const unsigned char* endp);
445
446 int llhttp__on_body(
447     llhttp__internal_t* s, const unsigned char* p,
448     const unsigned char* endp);
449
450 int llhttp__on_status(
451     llhttp__internal_t* s, const unsigned char* p,
452     const unsigned char* endp);
453
454 int llhttp__internal__c_update_finish(
455     llhttp__internal_t* state,
456     const unsigned char* p,
457     const unsigned char* endp) {
458   state->finish = 2;
459   return 0;
460 }
461
462 int llhttp__on_message_begin(
463     llhttp__internal_t* s, const unsigned char* p,
464     const unsigned char* endp);
465
466 int llhttp__internal__c_load_type(
467     llhttp__internal_t* state,
468     const unsigned char* p,
469     const unsigned char* endp) {
470   return state->type;
471 }
472
473 int llhttp__internal__c_store_method(
474     llhttp__internal_t* state,
475     const unsigned char* p,
476     const unsigned char* endp,
477     int match) {
478   state->method = match;
479   return 0;
480 }
481
482 int llhttp__internal__c_is_equal_method(
483     llhttp__internal_t* state,
484     const unsigned char* p,
485     const unsigned char* endp) {
486   return state->method == 5;
487 }
488
489 int llhttp__internal__c_update_http_major(
490     llhttp__internal_t* state,
491     const unsigned char* p,
492     const unsigned char* endp) {
493   state->http_major = 0;
494   return 0;
495 }
496
497 int llhttp__internal__c_update_http_minor(
498     llhttp__internal_t* state,
499     const unsigned char* p,
500     const unsigned char* endp) {
501   state->http_minor = 9;
502   return 0;
503 }
504
505 int llhttp__internal__c_test_flags(
506     llhttp__internal_t* state,
507     const unsigned char* p,
508     const unsigned char* endp) {
509   return (state->flags & 128) == 128;
510 }
511
512 int llhttp__on_chunk_complete(
513     llhttp__internal_t* s, const unsigned char* p,
514     const unsigned char* endp);
515
516 int llhttp__on_message_complete(
517     llhttp__internal_t* s, const unsigned char* p,
518     const unsigned char* endp);
519
520 int llhttp__internal__c_is_equal_upgrade(
521     llhttp__internal_t* state,
522     const unsigned char* p,
523     const unsigned char* endp) {
524   return state->upgrade == 1;
525 }
526
527 int llhttp__after_message_complete(
528     llhttp__internal_t* s, const unsigned char* p,
529     const unsigned char* endp);
530
531 int llhttp__internal__c_update_finish_1(
532     llhttp__internal_t* state,
533     const unsigned char* p,
534     const unsigned char* endp) {
535   state->finish = 0;
536   return 0;
537 }
538
539 int llhttp__internal__c_test_flags_1(
540     llhttp__internal_t* state,
541     const unsigned char* p,
542     const unsigned char* endp) {
543   return (state->flags & 544) == 544;
544 }
545
546 int llhttp__internal__c_test_flags_2(
547     llhttp__internal_t* state,
548     const unsigned char* p,
549     const unsigned char* endp) {
550   return (state->flags & 256) == 256;
551 }
552
553 int llhttp__internal__c_test_flags_3(
554     llhttp__internal_t* state,
555     const unsigned char* p,
556     const unsigned char* endp) {
557   return (state->flags & 40) == 40;
558 }
559
560 int llhttp__before_headers_complete(
561     llhttp__internal_t* s, const unsigned char* p,
562     const unsigned char* endp);
563
564 int llhttp__on_headers_complete(
565     llhttp__internal_t* s, const unsigned char* p,
566     const unsigned char* endp);
567
568 int llhttp__after_headers_complete(
569     llhttp__internal_t* s, const unsigned char* p,
570     const unsigned char* endp);
571
572 int llhttp__internal__c_update_content_length(
573     llhttp__internal_t* state,
574     const unsigned char* p,
575     const unsigned char* endp) {
576   state->content_length = 0;
577   return 0;
578 }
579
580 int llhttp__internal__c_mul_add_content_length(
581     llhttp__internal_t* state,
582     const unsigned char* p,
583     const unsigned char* endp,
584     int match) {
585   /* Multiplication overflow */
586   if (state->content_length > 0xffffffffffffffffULL / 16) {
587     return 1;
588   }
589   
590   state->content_length *= 16;
591   
592   /* Addition overflow */
593   if (match >= 0) {
594     if (state->content_length > 0xffffffffffffffffULL - match) {
595       return 1;
596     }
597   } else {
598     if (state->content_length < 0ULL - match) {
599       return 1;
600     }
601   }
602   state->content_length += match;
603   return 0;
604 }
605
606 int llhttp__on_chunk_header(
607     llhttp__internal_t* s, const unsigned char* p,
608     const unsigned char* endp);
609
610 int llhttp__internal__c_is_equal_content_length(
611     llhttp__internal_t* state,
612     const unsigned char* p,
613     const unsigned char* endp) {
614   return state->content_length == 0;
615 }
616
617 int llhttp__internal__c_or_flags(
618     llhttp__internal_t* state,
619     const unsigned char* p,
620     const unsigned char* endp) {
621   state->flags |= 128;
622   return 0;
623 }
624
625 int llhttp__internal__c_update_finish_2(
626     llhttp__internal_t* state,
627     const unsigned char* p,
628     const unsigned char* endp) {
629   state->finish = 1;
630   return 0;
631 }
632
633 int llhttp__internal__c_or_flags_1(
634     llhttp__internal_t* state,
635     const unsigned char* p,
636     const unsigned char* endp) {
637   state->flags |= 64;
638   return 0;
639 }
640
641 int llhttp__internal__c_update_upgrade(
642     llhttp__internal_t* state,
643     const unsigned char* p,
644     const unsigned char* endp) {
645   state->upgrade = 1;
646   return 0;
647 }
648
649 int llhttp__internal__c_store_header_state(
650     llhttp__internal_t* state,
651     const unsigned char* p,
652     const unsigned char* endp,
653     int match) {
654   state->header_state = match;
655   return 0;
656 }
657
658 int llhttp__internal__c_load_header_state(
659     llhttp__internal_t* state,
660     const unsigned char* p,
661     const unsigned char* endp) {
662   return state->header_state;
663 }
664
665 int llhttp__internal__c_or_flags_3(
666     llhttp__internal_t* state,
667     const unsigned char* p,
668     const unsigned char* endp) {
669   state->flags |= 1;
670   return 0;
671 }
672
673 int llhttp__internal__c_update_header_state(
674     llhttp__internal_t* state,
675     const unsigned char* p,
676     const unsigned char* endp) {
677   state->header_state = 1;
678   return 0;
679 }
680
681 int llhttp__internal__c_or_flags_4(
682     llhttp__internal_t* state,
683     const unsigned char* p,
684     const unsigned char* endp) {
685   state->flags |= 2;
686   return 0;
687 }
688
689 int llhttp__internal__c_or_flags_5(
690     llhttp__internal_t* state,
691     const unsigned char* p,
692     const unsigned char* endp) {
693   state->flags |= 4;
694   return 0;
695 }
696
697 int llhttp__internal__c_or_flags_6(
698     llhttp__internal_t* state,
699     const unsigned char* p,
700     const unsigned char* endp) {
701   state->flags |= 8;
702   return 0;
703 }
704
705 int llhttp__internal__c_update_header_state_2(
706     llhttp__internal_t* state,
707     const unsigned char* p,
708     const unsigned char* endp) {
709   state->header_state = 6;
710   return 0;
711 }
712
713 int llhttp__internal__c_update_header_state_4(
714     llhttp__internal_t* state,
715     const unsigned char* p,
716     const unsigned char* endp) {
717   state->header_state = 0;
718   return 0;
719 }
720
721 int llhttp__internal__c_update_header_state_5(
722     llhttp__internal_t* state,
723     const unsigned char* p,
724     const unsigned char* endp) {
725   state->header_state = 5;
726   return 0;
727 }
728
729 int llhttp__internal__c_update_header_state_6(
730     llhttp__internal_t* state,
731     const unsigned char* p,
732     const unsigned char* endp) {
733   state->header_state = 7;
734   return 0;
735 }
736
737 int llhttp__internal__c_test_flags_5(
738     llhttp__internal_t* state,
739     const unsigned char* p,
740     const unsigned char* endp) {
741   return (state->flags & 32) == 32;
742 }
743
744 int llhttp__internal__c_mul_add_content_length_1(
745     llhttp__internal_t* state,
746     const unsigned char* p,
747     const unsigned char* endp,
748     int match) {
749   /* Multiplication overflow */
750   if (state->content_length > 0xffffffffffffffffULL / 10) {
751     return 1;
752   }
753   
754   state->content_length *= 10;
755   
756   /* Addition overflow */
757   if (match >= 0) {
758     if (state->content_length > 0xffffffffffffffffULL - match) {
759       return 1;
760     }
761   } else {
762     if (state->content_length < 0ULL - match) {
763       return 1;
764     }
765   }
766   state->content_length += match;
767   return 0;
768 }
769
770 int llhttp__internal__c_or_flags_15(
771     llhttp__internal_t* state,
772     const unsigned char* p,
773     const unsigned char* endp) {
774   state->flags |= 32;
775   return 0;
776 }
777
778 int llhttp__internal__c_or_flags_16(
779     llhttp__internal_t* state,
780     const unsigned char* p,
781     const unsigned char* endp) {
782   state->flags |= 512;
783   return 0;
784 }
785
786 int llhttp__internal__c_update_header_state_8(
787     llhttp__internal_t* state,
788     const unsigned char* p,
789     const unsigned char* endp) {
790   state->header_state = 8;
791   return 0;
792 }
793
794 int llhttp__internal__c_or_flags_17(
795     llhttp__internal_t* state,
796     const unsigned char* p,
797     const unsigned char* endp) {
798   state->flags |= 16;
799   return 0;
800 }
801
802 int llhttp__internal__c_store_http_major(
803     llhttp__internal_t* state,
804     const unsigned char* p,
805     const unsigned char* endp,
806     int match) {
807   state->http_major = match;
808   return 0;
809 }
810
811 int llhttp__internal__c_store_http_minor(
812     llhttp__internal_t* state,
813     const unsigned char* p,
814     const unsigned char* endp,
815     int match) {
816   state->http_minor = match;
817   return 0;
818 }
819
820 int llhttp__internal__c_is_equal_method_1(
821     llhttp__internal_t* state,
822     const unsigned char* p,
823     const unsigned char* endp) {
824   return state->method == 33;
825 }
826
827 int llhttp__internal__c_update_status_code(
828     llhttp__internal_t* state,
829     const unsigned char* p,
830     const unsigned char* endp) {
831   state->status_code = 0;
832   return 0;
833 }
834
835 int llhttp__internal__c_mul_add_status_code(
836     llhttp__internal_t* state,
837     const unsigned char* p,
838     const unsigned char* endp,
839     int match) {
840   /* Multiplication overflow */
841   if (state->status_code > 0xffff / 10) {
842     return 1;
843   }
844   
845   state->status_code *= 10;
846   
847   /* Addition overflow */
848   if (match >= 0) {
849     if (state->status_code > 0xffff - match) {
850       return 1;
851     }
852   } else {
853     if (state->status_code < 0 - match) {
854       return 1;
855     }
856   }
857   state->status_code += match;
858   
859   /* Enforce maximum */
860   if (state->status_code > 999) {
861     return 1;
862   }
863   return 0;
864 }
865
866 int llhttp__internal__c_update_type(
867     llhttp__internal_t* state,
868     const unsigned char* p,
869     const unsigned char* endp) {
870   state->type = 1;
871   return 0;
872 }
873
874 int llhttp__internal__c_update_type_1(
875     llhttp__internal_t* state,
876     const unsigned char* p,
877     const unsigned char* endp) {
878   state->type = 2;
879   return 0;
880 }
881
882 int llhttp__internal_init(llhttp__internal_t* state) {
883   memset(state, 0, sizeof(*state));
884   state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_start;
885   return 0;
886 }
887
888 static llparse_state_t llhttp__internal__run(
889     llhttp__internal_t* state,
890     const unsigned char* p,
891     const unsigned char* endp) {
892   int match;
893   switch ((llparse_state_t) (intptr_t) state->_current) {
894     case s_n_llhttp__internal__n_invoke_llhttp__after_message_complete:
895     s_n_llhttp__internal__n_invoke_llhttp__after_message_complete: {
896       switch (llhttp__after_message_complete(state, p, endp)) {
897         default:
898           goto s_n_llhttp__internal__n_invoke_update_finish_1;
899       }
900       /* UNREACHABLE */;
901       abort();
902     }
903     case s_n_llhttp__internal__n_pause_1:
904     s_n_llhttp__internal__n_pause_1: {
905       state->error = 0x16;
906       state->reason = "Pause on CONNECT/Upgrade";
907       state->error_pos = (const char*) p;
908       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_message_complete;
909       return s_error;
910       /* UNREACHABLE */;
911       abort();
912     }
913     case s_n_llhttp__internal__n_invoke_is_equal_upgrade:
914     s_n_llhttp__internal__n_invoke_is_equal_upgrade: {
915       switch (llhttp__internal__c_is_equal_upgrade(state, p, endp)) {
916         case 0:
917           goto s_n_llhttp__internal__n_invoke_llhttp__after_message_complete;
918         default:
919           goto s_n_llhttp__internal__n_pause_1;
920       }
921       /* UNREACHABLE */;
922       abort();
923     }
924     case s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2:
925     s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2: {
926       switch (llhttp__on_message_complete(state, p, endp)) {
927         case 0:
928           goto s_n_llhttp__internal__n_invoke_is_equal_upgrade;
929         case 21:
930           goto s_n_llhttp__internal__n_pause_5;
931         default:
932           goto s_n_llhttp__internal__n_error_9;
933       }
934       /* UNREACHABLE */;
935       abort();
936     }
937     case s_n_llhttp__internal__n_chunk_data_almost_done_skip:
938     s_n_llhttp__internal__n_chunk_data_almost_done_skip: {
939       if (p == endp) {
940         return s_n_llhttp__internal__n_chunk_data_almost_done_skip;
941       }
942       p++;
943       goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete;
944       /* UNREACHABLE */;
945       abort();
946     }
947     case s_n_llhttp__internal__n_chunk_data_almost_done:
948     s_n_llhttp__internal__n_chunk_data_almost_done: {
949       if (p == endp) {
950         return s_n_llhttp__internal__n_chunk_data_almost_done;
951       }
952       p++;
953       goto s_n_llhttp__internal__n_chunk_data_almost_done_skip;
954       /* UNREACHABLE */;
955       abort();
956     }
957     case s_n_llhttp__internal__n_consume_content_length:
958     s_n_llhttp__internal__n_consume_content_length: {
959       size_t avail;
960       size_t need;
961       
962       avail = endp - p;
963       need = state->content_length;
964       if (avail >= need) {
965         p += need;
966         state->content_length = 0;
967         goto s_n_llhttp__internal__n_span_end_llhttp__on_body;
968       }
969       
970       state->content_length -= avail;
971       return s_n_llhttp__internal__n_consume_content_length;
972       /* UNREACHABLE */;
973       abort();
974     }
975     case s_n_llhttp__internal__n_span_start_llhttp__on_body:
976     s_n_llhttp__internal__n_span_start_llhttp__on_body: {
977       if (p == endp) {
978         return s_n_llhttp__internal__n_span_start_llhttp__on_body;
979       }
980       state->_span_pos0 = (void*) p;
981       state->_span_cb0 = llhttp__on_body;
982       goto s_n_llhttp__internal__n_consume_content_length;
983       /* UNREACHABLE */;
984       abort();
985     }
986     case s_n_llhttp__internal__n_invoke_is_equal_content_length:
987     s_n_llhttp__internal__n_invoke_is_equal_content_length: {
988       switch (llhttp__internal__c_is_equal_content_length(state, p, endp)) {
989         case 0:
990           goto s_n_llhttp__internal__n_span_start_llhttp__on_body;
991         default:
992           goto s_n_llhttp__internal__n_invoke_or_flags;
993       }
994       /* UNREACHABLE */;
995       abort();
996     }
997     case s_n_llhttp__internal__n_chunk_size_almost_done:
998     s_n_llhttp__internal__n_chunk_size_almost_done: {
999       if (p == endp) {
1000         return s_n_llhttp__internal__n_chunk_size_almost_done;
1001       }
1002       p++;
1003       goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header;
1004       /* UNREACHABLE */;
1005       abort();
1006     }
1007     case s_n_llhttp__internal__n_chunk_parameters:
1008     s_n_llhttp__internal__n_chunk_parameters: {
1009       if (p == endp) {
1010         return s_n_llhttp__internal__n_chunk_parameters;
1011       }
1012       switch (*p) {
1013         case 13: {
1014           p++;
1015           goto s_n_llhttp__internal__n_chunk_size_almost_done;
1016         }
1017         default: {
1018           p++;
1019           goto s_n_llhttp__internal__n_chunk_parameters;
1020         }
1021       }
1022       /* UNREACHABLE */;
1023       abort();
1024     }
1025     case s_n_llhttp__internal__n_chunk_size_otherwise:
1026     s_n_llhttp__internal__n_chunk_size_otherwise: {
1027       if (p == endp) {
1028         return s_n_llhttp__internal__n_chunk_size_otherwise;
1029       }
1030       switch (*p) {
1031         case 13: {
1032           p++;
1033           goto s_n_llhttp__internal__n_chunk_size_almost_done;
1034         }
1035         case ' ': {
1036           p++;
1037           goto s_n_llhttp__internal__n_chunk_parameters;
1038         }
1039         case ';': {
1040           p++;
1041           goto s_n_llhttp__internal__n_chunk_parameters;
1042         }
1043         default: {
1044           goto s_n_llhttp__internal__n_error_6;
1045         }
1046       }
1047       /* UNREACHABLE */;
1048       abort();
1049     }
1050     case s_n_llhttp__internal__n_chunk_size:
1051     s_n_llhttp__internal__n_chunk_size: {
1052       if (p == endp) {
1053         return s_n_llhttp__internal__n_chunk_size;
1054       }
1055       switch (*p) {
1056         case '0': {
1057           p++;
1058           match = 0;
1059           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1060         }
1061         case '1': {
1062           p++;
1063           match = 1;
1064           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1065         }
1066         case '2': {
1067           p++;
1068           match = 2;
1069           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1070         }
1071         case '3': {
1072           p++;
1073           match = 3;
1074           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1075         }
1076         case '4': {
1077           p++;
1078           match = 4;
1079           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1080         }
1081         case '5': {
1082           p++;
1083           match = 5;
1084           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1085         }
1086         case '6': {
1087           p++;
1088           match = 6;
1089           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1090         }
1091         case '7': {
1092           p++;
1093           match = 7;
1094           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1095         }
1096         case '8': {
1097           p++;
1098           match = 8;
1099           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1100         }
1101         case '9': {
1102           p++;
1103           match = 9;
1104           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1105         }
1106         case 'A': {
1107           p++;
1108           match = 10;
1109           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1110         }
1111         case 'B': {
1112           p++;
1113           match = 11;
1114           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1115         }
1116         case 'C': {
1117           p++;
1118           match = 12;
1119           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1120         }
1121         case 'D': {
1122           p++;
1123           match = 13;
1124           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1125         }
1126         case 'E': {
1127           p++;
1128           match = 14;
1129           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1130         }
1131         case 'F': {
1132           p++;
1133           match = 15;
1134           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1135         }
1136         case 'a': {
1137           p++;
1138           match = 10;
1139           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1140         }
1141         case 'b': {
1142           p++;
1143           match = 11;
1144           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1145         }
1146         case 'c': {
1147           p++;
1148           match = 12;
1149           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1150         }
1151         case 'd': {
1152           p++;
1153           match = 13;
1154           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1155         }
1156         case 'e': {
1157           p++;
1158           match = 14;
1159           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1160         }
1161         case 'f': {
1162           p++;
1163           match = 15;
1164           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1165         }
1166         default: {
1167           goto s_n_llhttp__internal__n_chunk_size_otherwise;
1168         }
1169       }
1170       /* UNREACHABLE */;
1171       abort();
1172     }
1173     case s_n_llhttp__internal__n_chunk_size_digit:
1174     s_n_llhttp__internal__n_chunk_size_digit: {
1175       if (p == endp) {
1176         return s_n_llhttp__internal__n_chunk_size_digit;
1177       }
1178       switch (*p) {
1179         case '0': {
1180           p++;
1181           match = 0;
1182           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1183         }
1184         case '1': {
1185           p++;
1186           match = 1;
1187           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1188         }
1189         case '2': {
1190           p++;
1191           match = 2;
1192           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1193         }
1194         case '3': {
1195           p++;
1196           match = 3;
1197           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1198         }
1199         case '4': {
1200           p++;
1201           match = 4;
1202           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1203         }
1204         case '5': {
1205           p++;
1206           match = 5;
1207           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1208         }
1209         case '6': {
1210           p++;
1211           match = 6;
1212           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1213         }
1214         case '7': {
1215           p++;
1216           match = 7;
1217           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1218         }
1219         case '8': {
1220           p++;
1221           match = 8;
1222           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1223         }
1224         case '9': {
1225           p++;
1226           match = 9;
1227           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1228         }
1229         case 'A': {
1230           p++;
1231           match = 10;
1232           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1233         }
1234         case 'B': {
1235           p++;
1236           match = 11;
1237           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1238         }
1239         case 'C': {
1240           p++;
1241           match = 12;
1242           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1243         }
1244         case 'D': {
1245           p++;
1246           match = 13;
1247           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1248         }
1249         case 'E': {
1250           p++;
1251           match = 14;
1252           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1253         }
1254         case 'F': {
1255           p++;
1256           match = 15;
1257           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1258         }
1259         case 'a': {
1260           p++;
1261           match = 10;
1262           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1263         }
1264         case 'b': {
1265           p++;
1266           match = 11;
1267           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1268         }
1269         case 'c': {
1270           p++;
1271           match = 12;
1272           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1273         }
1274         case 'd': {
1275           p++;
1276           match = 13;
1277           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1278         }
1279         case 'e': {
1280           p++;
1281           match = 14;
1282           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1283         }
1284         case 'f': {
1285           p++;
1286           match = 15;
1287           goto s_n_llhttp__internal__n_invoke_mul_add_content_length;
1288         }
1289         default: {
1290           goto s_n_llhttp__internal__n_error_8;
1291         }
1292       }
1293       /* UNREACHABLE */;
1294       abort();
1295     }
1296     case s_n_llhttp__internal__n_invoke_update_content_length:
1297     s_n_llhttp__internal__n_invoke_update_content_length: {
1298       switch (llhttp__internal__c_update_content_length(state, p, endp)) {
1299         default:
1300           goto s_n_llhttp__internal__n_chunk_size_digit;
1301       }
1302       /* UNREACHABLE */;
1303       abort();
1304     }
1305     case s_n_llhttp__internal__n_consume_content_length_1:
1306     s_n_llhttp__internal__n_consume_content_length_1: {
1307       size_t avail;
1308       size_t need;
1309       
1310       avail = endp - p;
1311       need = state->content_length;
1312       if (avail >= need) {
1313         p += need;
1314         state->content_length = 0;
1315         goto s_n_llhttp__internal__n_span_end_llhttp__on_body_1;
1316       }
1317       
1318       state->content_length -= avail;
1319       return s_n_llhttp__internal__n_consume_content_length_1;
1320       /* UNREACHABLE */;
1321       abort();
1322     }
1323     case s_n_llhttp__internal__n_span_start_llhttp__on_body_1:
1324     s_n_llhttp__internal__n_span_start_llhttp__on_body_1: {
1325       if (p == endp) {
1326         return s_n_llhttp__internal__n_span_start_llhttp__on_body_1;
1327       }
1328       state->_span_pos0 = (void*) p;
1329       state->_span_cb0 = llhttp__on_body;
1330       goto s_n_llhttp__internal__n_consume_content_length_1;
1331       /* UNREACHABLE */;
1332       abort();
1333     }
1334     case s_n_llhttp__internal__n_eof:
1335     s_n_llhttp__internal__n_eof: {
1336       if (p == endp) {
1337         return s_n_llhttp__internal__n_eof;
1338       }
1339       p++;
1340       goto s_n_llhttp__internal__n_eof;
1341       /* UNREACHABLE */;
1342       abort();
1343     }
1344     case s_n_llhttp__internal__n_span_start_llhttp__on_body_2:
1345     s_n_llhttp__internal__n_span_start_llhttp__on_body_2: {
1346       if (p == endp) {
1347         return s_n_llhttp__internal__n_span_start_llhttp__on_body_2;
1348       }
1349       state->_span_pos0 = (void*) p;
1350       state->_span_cb0 = llhttp__on_body;
1351       goto s_n_llhttp__internal__n_eof;
1352       /* UNREACHABLE */;
1353       abort();
1354     }
1355     case s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete:
1356     s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete: {
1357       switch (llhttp__after_headers_complete(state, p, endp)) {
1358         case 1:
1359           goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_1;
1360         case 2:
1361           goto s_n_llhttp__internal__n_invoke_update_content_length;
1362         case 3:
1363           goto s_n_llhttp__internal__n_span_start_llhttp__on_body_1;
1364         case 4:
1365           goto s_n_llhttp__internal__n_invoke_update_finish_2;
1366         case 5:
1367           goto s_n_llhttp__internal__n_error_10;
1368         default:
1369           goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete;
1370       }
1371       /* UNREACHABLE */;
1372       abort();
1373     }
1374     case s_n_llhttp__internal__n_headers_almost_done:
1375     s_n_llhttp__internal__n_headers_almost_done: {
1376       if (p == endp) {
1377         return s_n_llhttp__internal__n_headers_almost_done;
1378       }
1379       p++;
1380       goto s_n_llhttp__internal__n_invoke_test_flags;
1381       /* UNREACHABLE */;
1382       abort();
1383     }
1384     case s_n_llhttp__internal__n_span_start_llhttp__on_header_value:
1385     s_n_llhttp__internal__n_span_start_llhttp__on_header_value: {
1386       if (p == endp) {
1387         return s_n_llhttp__internal__n_span_start_llhttp__on_header_value;
1388       }
1389       state->_span_pos0 = (void*) p;
1390       state->_span_cb0 = llhttp__on_header_value;
1391       goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value;
1392       /* UNREACHABLE */;
1393       abort();
1394     }
1395     case s_n_llhttp__internal__n_header_value_discard_lws:
1396     s_n_llhttp__internal__n_header_value_discard_lws: {
1397       if (p == endp) {
1398         return s_n_llhttp__internal__n_header_value_discard_lws;
1399       }
1400       switch (*p) {
1401         case 9: {
1402           p++;
1403           goto s_n_llhttp__internal__n_header_value_discard_ws;
1404         }
1405         case ' ': {
1406           p++;
1407           goto s_n_llhttp__internal__n_header_value_discard_ws;
1408         }
1409         default: {
1410           goto s_n_llhttp__internal__n_invoke_load_header_state;
1411         }
1412       }
1413       /* UNREACHABLE */;
1414       abort();
1415     }
1416     case s_n_llhttp__internal__n_header_value_discard_ws_almost_done:
1417     s_n_llhttp__internal__n_header_value_discard_ws_almost_done: {
1418       if (p == endp) {
1419         return s_n_llhttp__internal__n_header_value_discard_ws_almost_done;
1420       }
1421       p++;
1422       goto s_n_llhttp__internal__n_header_value_discard_lws;
1423       /* UNREACHABLE */;
1424       abort();
1425     }
1426     case s_n_llhttp__internal__n_header_value_lws:
1427     s_n_llhttp__internal__n_header_value_lws: {
1428       if (p == endp) {
1429         return s_n_llhttp__internal__n_header_value_lws;
1430       }
1431       switch (*p) {
1432         case 9: {
1433           goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
1434         }
1435         case ' ': {
1436           goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
1437         }
1438         default: {
1439           goto s_n_llhttp__internal__n_invoke_load_header_state_3;
1440         }
1441       }
1442       /* UNREACHABLE */;
1443       abort();
1444     }
1445     case s_n_llhttp__internal__n_header_value_almost_done:
1446     s_n_llhttp__internal__n_header_value_almost_done: {
1447       if (p == endp) {
1448         return s_n_llhttp__internal__n_header_value_almost_done;
1449       }
1450       switch (*p) {
1451         case 10: {
1452           p++;
1453           goto s_n_llhttp__internal__n_header_value_lws;
1454         }
1455         default: {
1456           goto s_n_llhttp__internal__n_error_15;
1457         }
1458       }
1459       /* UNREACHABLE */;
1460       abort();
1461     }
1462     case s_n_llhttp__internal__n_header_value_lenient:
1463     s_n_llhttp__internal__n_header_value_lenient: {
1464       if (p == endp) {
1465         return s_n_llhttp__internal__n_header_value_lenient;
1466       }
1467       switch (*p) {
1468         case 10: {
1469           goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1;
1470         }
1471         case 13: {
1472           goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3;
1473         }
1474         default: {
1475           p++;
1476           goto s_n_llhttp__internal__n_header_value_lenient;
1477         }
1478       }
1479       /* UNREACHABLE */;
1480       abort();
1481     }
1482     case s_n_llhttp__internal__n_header_value_otherwise:
1483     s_n_llhttp__internal__n_header_value_otherwise: {
1484       if (p == endp) {
1485         return s_n_llhttp__internal__n_header_value_otherwise;
1486       }
1487       switch (*p) {
1488         case 10: {
1489           goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1;
1490         }
1491         case 13: {
1492           goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2;
1493         }
1494         default: {
1495           goto s_n_llhttp__internal__n_invoke_test_flags_4;
1496         }
1497       }
1498       /* UNREACHABLE */;
1499       abort();
1500     }
1501     case s_n_llhttp__internal__n_header_value_connection_token:
1502     s_n_llhttp__internal__n_header_value_connection_token: {
1503       static uint8_t lookup_table[] = {
1504         0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
1505         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1506         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
1507         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1508         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1509         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1510         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1511         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1512         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1513         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1514         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1515         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1516         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1517         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1518         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1519         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
1520       };
1521       if (p == endp) {
1522         return s_n_llhttp__internal__n_header_value_connection_token;
1523       }
1524       switch (lookup_table[(uint8_t) *p]) {
1525         case 1: {
1526           p++;
1527           goto s_n_llhttp__internal__n_header_value_connection_token;
1528         }
1529         case 2: {
1530           p++;
1531           goto s_n_llhttp__internal__n_header_value_connection;
1532         }
1533         default: {
1534           goto s_n_llhttp__internal__n_header_value_otherwise;
1535         }
1536       }
1537       /* UNREACHABLE */;
1538       abort();
1539     }
1540     case s_n_llhttp__internal__n_header_value_connection_ws:
1541     s_n_llhttp__internal__n_header_value_connection_ws: {
1542       if (p == endp) {
1543         return s_n_llhttp__internal__n_header_value_connection_ws;
1544       }
1545       switch (*p) {
1546         case 10: {
1547           goto s_n_llhttp__internal__n_header_value_otherwise;
1548         }
1549         case 13: {
1550           goto s_n_llhttp__internal__n_header_value_otherwise;
1551         }
1552         case ' ': {
1553           p++;
1554           goto s_n_llhttp__internal__n_header_value_connection_ws;
1555         }
1556         case ',': {
1557           p++;
1558           goto s_n_llhttp__internal__n_invoke_load_header_state_4;
1559         }
1560         default: {
1561           goto s_n_llhttp__internal__n_invoke_update_header_state_4;
1562         }
1563       }
1564       /* UNREACHABLE */;
1565       abort();
1566     }
1567     case s_n_llhttp__internal__n_header_value_connection_1:
1568     s_n_llhttp__internal__n_header_value_connection_1: {
1569       llparse_match_t match_seq;
1570       
1571       if (p == endp) {
1572         return s_n_llhttp__internal__n_header_value_connection_1;
1573       }
1574       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob4, 4);
1575       p = match_seq.current;
1576       switch (match_seq.status) {
1577         case kMatchComplete: {
1578           p++;
1579           goto s_n_llhttp__internal__n_invoke_update_header_state_2;
1580         }
1581         case kMatchPause: {
1582           return s_n_llhttp__internal__n_header_value_connection_1;
1583         }
1584         case kMatchMismatch: {
1585           goto s_n_llhttp__internal__n_header_value_connection_token;
1586         }
1587       }
1588       /* UNREACHABLE */;
1589       abort();
1590     }
1591     case s_n_llhttp__internal__n_header_value_connection_2:
1592     s_n_llhttp__internal__n_header_value_connection_2: {
1593       llparse_match_t match_seq;
1594       
1595       if (p == endp) {
1596         return s_n_llhttp__internal__n_header_value_connection_2;
1597       }
1598       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob5, 9);
1599       p = match_seq.current;
1600       switch (match_seq.status) {
1601         case kMatchComplete: {
1602           p++;
1603           goto s_n_llhttp__internal__n_invoke_update_header_state_5;
1604         }
1605         case kMatchPause: {
1606           return s_n_llhttp__internal__n_header_value_connection_2;
1607         }
1608         case kMatchMismatch: {
1609           goto s_n_llhttp__internal__n_header_value_connection_token;
1610         }
1611       }
1612       /* UNREACHABLE */;
1613       abort();
1614     }
1615     case s_n_llhttp__internal__n_header_value_connection_3:
1616     s_n_llhttp__internal__n_header_value_connection_3: {
1617       llparse_match_t match_seq;
1618       
1619       if (p == endp) {
1620         return s_n_llhttp__internal__n_header_value_connection_3;
1621       }
1622       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob6, 6);
1623       p = match_seq.current;
1624       switch (match_seq.status) {
1625         case kMatchComplete: {
1626           p++;
1627           goto s_n_llhttp__internal__n_invoke_update_header_state_6;
1628         }
1629         case kMatchPause: {
1630           return s_n_llhttp__internal__n_header_value_connection_3;
1631         }
1632         case kMatchMismatch: {
1633           goto s_n_llhttp__internal__n_header_value_connection_token;
1634         }
1635       }
1636       /* UNREACHABLE */;
1637       abort();
1638     }
1639     case s_n_llhttp__internal__n_header_value_connection:
1640     s_n_llhttp__internal__n_header_value_connection: {
1641       if (p == endp) {
1642         return s_n_llhttp__internal__n_header_value_connection;
1643       }
1644       switch (((*p) | 0x20)) {
1645         case 9: {
1646           p++;
1647           goto s_n_llhttp__internal__n_header_value_connection;
1648         }
1649         case ' ': {
1650           p++;
1651           goto s_n_llhttp__internal__n_header_value_connection;
1652         }
1653         case 'c': {
1654           p++;
1655           goto s_n_llhttp__internal__n_header_value_connection_1;
1656         }
1657         case 'k': {
1658           p++;
1659           goto s_n_llhttp__internal__n_header_value_connection_2;
1660         }
1661         case 'u': {
1662           p++;
1663           goto s_n_llhttp__internal__n_header_value_connection_3;
1664         }
1665         default: {
1666           goto s_n_llhttp__internal__n_header_value_connection_token;
1667         }
1668       }
1669       /* UNREACHABLE */;
1670       abort();
1671     }
1672     case s_n_llhttp__internal__n_error_18:
1673     s_n_llhttp__internal__n_error_18: {
1674       state->error = 0xb;
1675       state->reason = "Content-Length overflow";
1676       state->error_pos = (const char*) p;
1677       state->_current = (void*) (intptr_t) s_error;
1678       return s_error;
1679       /* UNREACHABLE */;
1680       abort();
1681     }
1682     case s_n_llhttp__internal__n_header_value:
1683     s_n_llhttp__internal__n_header_value: {
1684       static uint8_t lookup_table[] = {
1685         0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
1686         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1687         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1688         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1689         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1690         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1691         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1692         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1693         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1694         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1695         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1696         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1697         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1698         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1699         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1700         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
1701       };
1702       if (p == endp) {
1703         return s_n_llhttp__internal__n_header_value;
1704       }
1705       #ifdef __SSE4_2__
1706       if (endp - p >= 16) {
1707         __m128i ranges;
1708         __m128i input;
1709         int avail;
1710         int match_len;
1711       
1712         /* Load input */
1713         input = _mm_loadu_si128((__m128i const*) p);
1714         ranges = _mm_loadu_si128((__m128i const*) llparse_blob7);
1715       
1716         /* Find first character that does not match `ranges` */
1717         match_len = _mm_cmpestri(ranges, 6,
1718             input, 16,
1719             _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
1720               _SIDD_NEGATIVE_POLARITY);
1721       
1722         if (match_len != 0) {
1723           p += match_len;
1724           goto s_n_llhttp__internal__n_header_value;
1725         }
1726         goto s_n_llhttp__internal__n_header_value_otherwise;
1727       }
1728       #endif  /* __SSE4_2__ */
1729       switch (lookup_table[(uint8_t) *p]) {
1730         case 1: {
1731           p++;
1732           goto s_n_llhttp__internal__n_header_value;
1733         }
1734         default: {
1735           goto s_n_llhttp__internal__n_header_value_otherwise;
1736         }
1737       }
1738       /* UNREACHABLE */;
1739       abort();
1740     }
1741     case s_n_llhttp__internal__n_header_value_discard_rws:
1742     s_n_llhttp__internal__n_header_value_discard_rws: {
1743       if (p == endp) {
1744         return s_n_llhttp__internal__n_header_value_discard_rws;
1745       }
1746       switch (*p) {
1747         case 10: {
1748           goto s_n_llhttp__internal__n_header_value_otherwise;
1749         }
1750         case 13: {
1751           goto s_n_llhttp__internal__n_header_value_otherwise;
1752         }
1753         case ' ': {
1754           p++;
1755           goto s_n_llhttp__internal__n_header_value_discard_rws;
1756         }
1757         default: {
1758           goto s_n_llhttp__internal__n_invoke_update_header_state_7;
1759         }
1760       }
1761       /* UNREACHABLE */;
1762       abort();
1763     }
1764     case s_n_llhttp__internal__n_error_19:
1765     s_n_llhttp__internal__n_error_19: {
1766       state->error = 0xb;
1767       state->reason = "Invalid character in Content-Length";
1768       state->error_pos = (const char*) p;
1769       state->_current = (void*) (intptr_t) s_error;
1770       return s_error;
1771       /* UNREACHABLE */;
1772       abort();
1773     }
1774     case s_n_llhttp__internal__n_header_value_content_length_ws:
1775     s_n_llhttp__internal__n_header_value_content_length_ws: {
1776       if (p == endp) {
1777         return s_n_llhttp__internal__n_header_value_content_length_ws;
1778       }
1779       switch (*p) {
1780         case 10: {
1781           goto s_n_llhttp__internal__n_invoke_or_flags_15;
1782         }
1783         case 13: {
1784           goto s_n_llhttp__internal__n_invoke_or_flags_15;
1785         }
1786         case ' ': {
1787           p++;
1788           goto s_n_llhttp__internal__n_header_value_content_length_ws;
1789         }
1790         default: {
1791           goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5;
1792         }
1793       }
1794       /* UNREACHABLE */;
1795       abort();
1796     }
1797     case s_n_llhttp__internal__n_header_value_content_length:
1798     s_n_llhttp__internal__n_header_value_content_length: {
1799       if (p == endp) {
1800         return s_n_llhttp__internal__n_header_value_content_length;
1801       }
1802       switch (*p) {
1803         case '0': {
1804           p++;
1805           match = 0;
1806           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1807         }
1808         case '1': {
1809           p++;
1810           match = 1;
1811           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1812         }
1813         case '2': {
1814           p++;
1815           match = 2;
1816           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1817         }
1818         case '3': {
1819           p++;
1820           match = 3;
1821           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1822         }
1823         case '4': {
1824           p++;
1825           match = 4;
1826           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1827         }
1828         case '5': {
1829           p++;
1830           match = 5;
1831           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1832         }
1833         case '6': {
1834           p++;
1835           match = 6;
1836           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1837         }
1838         case '7': {
1839           p++;
1840           match = 7;
1841           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1842         }
1843         case '8': {
1844           p++;
1845           match = 8;
1846           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1847         }
1848         case '9': {
1849           p++;
1850           match = 9;
1851           goto s_n_llhttp__internal__n_invoke_mul_add_content_length_1;
1852         }
1853         default: {
1854           goto s_n_llhttp__internal__n_header_value_content_length_ws;
1855         }
1856       }
1857       /* UNREACHABLE */;
1858       abort();
1859     }
1860     case s_n_llhttp__internal__n_header_value_te_chunked_last:
1861     s_n_llhttp__internal__n_header_value_te_chunked_last: {
1862       if (p == endp) {
1863         return s_n_llhttp__internal__n_header_value_te_chunked_last;
1864       }
1865       switch (*p) {
1866         case 10: {
1867           goto s_n_llhttp__internal__n_invoke_update_header_state_8;
1868         }
1869         case 13: {
1870           goto s_n_llhttp__internal__n_invoke_update_header_state_8;
1871         }
1872         case ' ': {
1873           p++;
1874           goto s_n_llhttp__internal__n_header_value_te_chunked_last;
1875         }
1876         default: {
1877           goto s_n_llhttp__internal__n_header_value_te_chunked;
1878         }
1879       }
1880       /* UNREACHABLE */;
1881       abort();
1882     }
1883     case s_n_llhttp__internal__n_header_value_te_token_ows:
1884     s_n_llhttp__internal__n_header_value_te_token_ows: {
1885       if (p == endp) {
1886         return s_n_llhttp__internal__n_header_value_te_token_ows;
1887       }
1888       switch (*p) {
1889         case 9: {
1890           p++;
1891           goto s_n_llhttp__internal__n_header_value_te_token_ows;
1892         }
1893         case ' ': {
1894           p++;
1895           goto s_n_llhttp__internal__n_header_value_te_token_ows;
1896         }
1897         default: {
1898           goto s_n_llhttp__internal__n_header_value_te_chunked;
1899         }
1900       }
1901       /* UNREACHABLE */;
1902       abort();
1903     }
1904     case s_n_llhttp__internal__n_header_value_te_token:
1905     s_n_llhttp__internal__n_header_value_te_token: {
1906       static uint8_t lookup_table[] = {
1907         0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
1908         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1909         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
1910         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1911         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1912         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1913         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1914         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1915         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1916         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1917         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1918         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1919         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1920         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1921         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1922         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
1923       };
1924       if (p == endp) {
1925         return s_n_llhttp__internal__n_header_value_te_token;
1926       }
1927       switch (lookup_table[(uint8_t) *p]) {
1928         case 1: {
1929           p++;
1930           goto s_n_llhttp__internal__n_header_value_te_token;
1931         }
1932         case 2: {
1933           p++;
1934           goto s_n_llhttp__internal__n_header_value_te_token_ows;
1935         }
1936         default: {
1937           goto s_n_llhttp__internal__n_invoke_update_header_state_7;
1938         }
1939       }
1940       /* UNREACHABLE */;
1941       abort();
1942     }
1943     case s_n_llhttp__internal__n_header_value_te_chunked:
1944     s_n_llhttp__internal__n_header_value_te_chunked: {
1945       llparse_match_t match_seq;
1946       
1947       if (p == endp) {
1948         return s_n_llhttp__internal__n_header_value_te_chunked;
1949       }
1950       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob8, 7);
1951       p = match_seq.current;
1952       switch (match_seq.status) {
1953         case kMatchComplete: {
1954           p++;
1955           goto s_n_llhttp__internal__n_header_value_te_chunked_last;
1956         }
1957         case kMatchPause: {
1958           return s_n_llhttp__internal__n_header_value_te_chunked;
1959         }
1960         case kMatchMismatch: {
1961           goto s_n_llhttp__internal__n_header_value_te_token;
1962         }
1963       }
1964       /* UNREACHABLE */;
1965       abort();
1966     }
1967     case s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1:
1968     s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1: {
1969       if (p == endp) {
1970         return s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
1971       }
1972       state->_span_pos0 = (void*) p;
1973       state->_span_cb0 = llhttp__on_header_value;
1974       goto s_n_llhttp__internal__n_invoke_load_header_state_2;
1975       /* UNREACHABLE */;
1976       abort();
1977     }
1978     case s_n_llhttp__internal__n_header_value_discard_ws:
1979     s_n_llhttp__internal__n_header_value_discard_ws: {
1980       if (p == endp) {
1981         return s_n_llhttp__internal__n_header_value_discard_ws;
1982       }
1983       switch (*p) {
1984         case 9: {
1985           p++;
1986           goto s_n_llhttp__internal__n_header_value_discard_ws;
1987         }
1988         case 10: {
1989           p++;
1990           goto s_n_llhttp__internal__n_header_value_discard_lws;
1991         }
1992         case 13: {
1993           p++;
1994           goto s_n_llhttp__internal__n_header_value_discard_ws_almost_done;
1995         }
1996         case ' ': {
1997           p++;
1998           goto s_n_llhttp__internal__n_header_value_discard_ws;
1999         }
2000         default: {
2001           goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value_1;
2002         }
2003       }
2004       /* UNREACHABLE */;
2005       abort();
2006     }
2007     case s_n_llhttp__internal__n_header_field_general_otherwise:
2008     s_n_llhttp__internal__n_header_field_general_otherwise: {
2009       if (p == endp) {
2010         return s_n_llhttp__internal__n_header_field_general_otherwise;
2011       }
2012       switch (*p) {
2013         case ':': {
2014           goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1;
2015         }
2016         default: {
2017           goto s_n_llhttp__internal__n_error_20;
2018         }
2019       }
2020       /* UNREACHABLE */;
2021       abort();
2022     }
2023     case s_n_llhttp__internal__n_header_field_general:
2024     s_n_llhttp__internal__n_header_field_general: {
2025       static uint8_t lookup_table[] = {
2026         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2027         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2028         1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0,
2029         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
2030         0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2031         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
2032         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2033         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0,
2034         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2035         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2036         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2037         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2038         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2039         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2040         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2041         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
2042       };
2043       if (p == endp) {
2044         return s_n_llhttp__internal__n_header_field_general;
2045       }
2046       #ifdef __SSE4_2__
2047       if (endp - p >= 16) {
2048         __m128i ranges;
2049         __m128i input;
2050         int avail;
2051         int match_len;
2052       
2053         /* Load input */
2054         input = _mm_loadu_si128((__m128i const*) p);
2055         ranges = _mm_loadu_si128((__m128i const*) llparse_blob9);
2056       
2057         /* Find first character that does not match `ranges` */
2058         match_len = _mm_cmpestri(ranges, 16,
2059             input, 16,
2060             _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
2061               _SIDD_NEGATIVE_POLARITY);
2062       
2063         if (match_len != 0) {
2064           p += match_len;
2065           goto s_n_llhttp__internal__n_header_field_general;
2066         }
2067         ranges = _mm_loadu_si128((__m128i const*) llparse_blob10);
2068       
2069         /* Find first character that does not match `ranges` */
2070         match_len = _mm_cmpestri(ranges, 2,
2071             input, 16,
2072             _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
2073               _SIDD_NEGATIVE_POLARITY);
2074       
2075         if (match_len != 0) {
2076           p += match_len;
2077           goto s_n_llhttp__internal__n_header_field_general;
2078         }
2079         goto s_n_llhttp__internal__n_header_field_general_otherwise;
2080       }
2081       #endif  /* __SSE4_2__ */
2082       switch (lookup_table[(uint8_t) *p]) {
2083         case 1: {
2084           p++;
2085           goto s_n_llhttp__internal__n_header_field_general;
2086         }
2087         default: {
2088           goto s_n_llhttp__internal__n_header_field_general_otherwise;
2089         }
2090       }
2091       /* UNREACHABLE */;
2092       abort();
2093     }
2094     case s_n_llhttp__internal__n_header_field_colon:
2095     s_n_llhttp__internal__n_header_field_colon: {
2096       if (p == endp) {
2097         return s_n_llhttp__internal__n_header_field_colon;
2098       }
2099       switch (*p) {
2100         case ' ': {
2101           p++;
2102           goto s_n_llhttp__internal__n_header_field_colon;
2103         }
2104         case ':': {
2105           goto s_n_llhttp__internal__n_span_end_llhttp__on_header_field;
2106         }
2107         default: {
2108           goto s_n_llhttp__internal__n_invoke_update_header_state_9;
2109         }
2110       }
2111       /* UNREACHABLE */;
2112       abort();
2113     }
2114     case s_n_llhttp__internal__n_header_field_3:
2115     s_n_llhttp__internal__n_header_field_3: {
2116       llparse_match_t match_seq;
2117       
2118       if (p == endp) {
2119         return s_n_llhttp__internal__n_header_field_3;
2120       }
2121       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob3, 6);
2122       p = match_seq.current;
2123       switch (match_seq.status) {
2124         case kMatchComplete: {
2125           p++;
2126           match = 1;
2127           goto s_n_llhttp__internal__n_invoke_store_header_state;
2128         }
2129         case kMatchPause: {
2130           return s_n_llhttp__internal__n_header_field_3;
2131         }
2132         case kMatchMismatch: {
2133           goto s_n_llhttp__internal__n_invoke_update_header_state_10;
2134         }
2135       }
2136       /* UNREACHABLE */;
2137       abort();
2138     }
2139     case s_n_llhttp__internal__n_header_field_4:
2140     s_n_llhttp__internal__n_header_field_4: {
2141       llparse_match_t match_seq;
2142       
2143       if (p == endp) {
2144         return s_n_llhttp__internal__n_header_field_4;
2145       }
2146       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob11, 10);
2147       p = match_seq.current;
2148       switch (match_seq.status) {
2149         case kMatchComplete: {
2150           p++;
2151           match = 2;
2152           goto s_n_llhttp__internal__n_invoke_store_header_state;
2153         }
2154         case kMatchPause: {
2155           return s_n_llhttp__internal__n_header_field_4;
2156         }
2157         case kMatchMismatch: {
2158           goto s_n_llhttp__internal__n_invoke_update_header_state_10;
2159         }
2160       }
2161       /* UNREACHABLE */;
2162       abort();
2163     }
2164     case s_n_llhttp__internal__n_header_field_2:
2165     s_n_llhttp__internal__n_header_field_2: {
2166       if (p == endp) {
2167         return s_n_llhttp__internal__n_header_field_2;
2168       }
2169       switch (((*p) | 0x20)) {
2170         case 'n': {
2171           p++;
2172           goto s_n_llhttp__internal__n_header_field_3;
2173         }
2174         case 't': {
2175           p++;
2176           goto s_n_llhttp__internal__n_header_field_4;
2177         }
2178         default: {
2179           goto s_n_llhttp__internal__n_invoke_update_header_state_10;
2180         }
2181       }
2182       /* UNREACHABLE */;
2183       abort();
2184     }
2185     case s_n_llhttp__internal__n_header_field_1:
2186     s_n_llhttp__internal__n_header_field_1: {
2187       llparse_match_t match_seq;
2188       
2189       if (p == endp) {
2190         return s_n_llhttp__internal__n_header_field_1;
2191       }
2192       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob2, 2);
2193       p = match_seq.current;
2194       switch (match_seq.status) {
2195         case kMatchComplete: {
2196           p++;
2197           goto s_n_llhttp__internal__n_header_field_2;
2198         }
2199         case kMatchPause: {
2200           return s_n_llhttp__internal__n_header_field_1;
2201         }
2202         case kMatchMismatch: {
2203           goto s_n_llhttp__internal__n_invoke_update_header_state_10;
2204         }
2205       }
2206       /* UNREACHABLE */;
2207       abort();
2208     }
2209     case s_n_llhttp__internal__n_header_field_5:
2210     s_n_llhttp__internal__n_header_field_5: {
2211       llparse_match_t match_seq;
2212       
2213       if (p == endp) {
2214         return s_n_llhttp__internal__n_header_field_5;
2215       }
2216       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob12, 15);
2217       p = match_seq.current;
2218       switch (match_seq.status) {
2219         case kMatchComplete: {
2220           p++;
2221           match = 1;
2222           goto s_n_llhttp__internal__n_invoke_store_header_state;
2223         }
2224         case kMatchPause: {
2225           return s_n_llhttp__internal__n_header_field_5;
2226         }
2227         case kMatchMismatch: {
2228           goto s_n_llhttp__internal__n_invoke_update_header_state_10;
2229         }
2230       }
2231       /* UNREACHABLE */;
2232       abort();
2233     }
2234     case s_n_llhttp__internal__n_header_field_6:
2235     s_n_llhttp__internal__n_header_field_6: {
2236       llparse_match_t match_seq;
2237       
2238       if (p == endp) {
2239         return s_n_llhttp__internal__n_header_field_6;
2240       }
2241       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob13, 16);
2242       p = match_seq.current;
2243       switch (match_seq.status) {
2244         case kMatchComplete: {
2245           p++;
2246           match = 3;
2247           goto s_n_llhttp__internal__n_invoke_store_header_state;
2248         }
2249         case kMatchPause: {
2250           return s_n_llhttp__internal__n_header_field_6;
2251         }
2252         case kMatchMismatch: {
2253           goto s_n_llhttp__internal__n_invoke_update_header_state_10;
2254         }
2255       }
2256       /* UNREACHABLE */;
2257       abort();
2258     }
2259     case s_n_llhttp__internal__n_header_field_7:
2260     s_n_llhttp__internal__n_header_field_7: {
2261       llparse_match_t match_seq;
2262       
2263       if (p == endp) {
2264         return s_n_llhttp__internal__n_header_field_7;
2265       }
2266       match_seq = llparse__match_sequence_to_lower_unsafe(state, p, endp, llparse_blob14, 6);
2267       p = match_seq.current;
2268       switch (match_seq.status) {
2269         case kMatchComplete: {
2270           p++;
2271           match = 4;
2272           goto s_n_llhttp__internal__n_invoke_store_header_state;
2273         }
2274         case kMatchPause: {
2275           return s_n_llhttp__internal__n_header_field_7;
2276         }
2277         case kMatchMismatch: {
2278           goto s_n_llhttp__internal__n_invoke_update_header_state_10;
2279         }
2280       }
2281       /* UNREACHABLE */;
2282       abort();
2283     }
2284     case s_n_llhttp__internal__n_header_field:
2285     s_n_llhttp__internal__n_header_field: {
2286       if (p == endp) {
2287         return s_n_llhttp__internal__n_header_field;
2288       }
2289       switch (((*p) | 0x20)) {
2290         case 'c': {
2291           p++;
2292           goto s_n_llhttp__internal__n_header_field_1;
2293         }
2294         case 'p': {
2295           p++;
2296           goto s_n_llhttp__internal__n_header_field_5;
2297         }
2298         case 't': {
2299           p++;
2300           goto s_n_llhttp__internal__n_header_field_6;
2301         }
2302         case 'u': {
2303           p++;
2304           goto s_n_llhttp__internal__n_header_field_7;
2305         }
2306         default: {
2307           goto s_n_llhttp__internal__n_invoke_update_header_state_10;
2308         }
2309       }
2310       /* UNREACHABLE */;
2311       abort();
2312     }
2313     case s_n_llhttp__internal__n_span_start_llhttp__on_header_field:
2314     s_n_llhttp__internal__n_span_start_llhttp__on_header_field: {
2315       if (p == endp) {
2316         return s_n_llhttp__internal__n_span_start_llhttp__on_header_field;
2317       }
2318       state->_span_pos0 = (void*) p;
2319       state->_span_cb0 = llhttp__on_header_field;
2320       goto s_n_llhttp__internal__n_header_field;
2321       /* UNREACHABLE */;
2322       abort();
2323     }
2324     case s_n_llhttp__internal__n_header_field_start:
2325     s_n_llhttp__internal__n_header_field_start: {
2326       if (p == endp) {
2327         return s_n_llhttp__internal__n_header_field_start;
2328       }
2329       switch (*p) {
2330         case 10: {
2331           goto s_n_llhttp__internal__n_headers_almost_done;
2332         }
2333         case 13: {
2334           p++;
2335           goto s_n_llhttp__internal__n_headers_almost_done;
2336         }
2337         default: {
2338           goto s_n_llhttp__internal__n_span_start_llhttp__on_header_field;
2339         }
2340       }
2341       /* UNREACHABLE */;
2342       abort();
2343     }
2344     case s_n_llhttp__internal__n_url_skip_to_http09:
2345     s_n_llhttp__internal__n_url_skip_to_http09: {
2346       if (p == endp) {
2347         return s_n_llhttp__internal__n_url_skip_to_http09;
2348       }
2349       p++;
2350       goto s_n_llhttp__internal__n_invoke_update_http_major;
2351       /* UNREACHABLE */;
2352       abort();
2353     }
2354     case s_n_llhttp__internal__n_url_skip_lf_to_http09:
2355     s_n_llhttp__internal__n_url_skip_lf_to_http09: {
2356       llparse_match_t match_seq;
2357       
2358       if (p == endp) {
2359         return s_n_llhttp__internal__n_url_skip_lf_to_http09;
2360       }
2361       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob15, 2);
2362       p = match_seq.current;
2363       switch (match_seq.status) {
2364         case kMatchComplete: {
2365           p++;
2366           goto s_n_llhttp__internal__n_invoke_update_http_major;
2367         }
2368         case kMatchPause: {
2369           return s_n_llhttp__internal__n_url_skip_lf_to_http09;
2370         }
2371         case kMatchMismatch: {
2372           goto s_n_llhttp__internal__n_error_21;
2373         }
2374       }
2375       /* UNREACHABLE */;
2376       abort();
2377     }
2378     case s_n_llhttp__internal__n_req_http_end_1:
2379     s_n_llhttp__internal__n_req_http_end_1: {
2380       if (p == endp) {
2381         return s_n_llhttp__internal__n_req_http_end_1;
2382       }
2383       switch (*p) {
2384         case 10: {
2385           p++;
2386           goto s_n_llhttp__internal__n_header_field_start;
2387         }
2388         default: {
2389           goto s_n_llhttp__internal__n_error_22;
2390         }
2391       }
2392       /* UNREACHABLE */;
2393       abort();
2394     }
2395     case s_n_llhttp__internal__n_req_http_end:
2396     s_n_llhttp__internal__n_req_http_end: {
2397       if (p == endp) {
2398         return s_n_llhttp__internal__n_req_http_end;
2399       }
2400       switch (*p) {
2401         case 10: {
2402           p++;
2403           goto s_n_llhttp__internal__n_header_field_start;
2404         }
2405         case 13: {
2406           p++;
2407           goto s_n_llhttp__internal__n_req_http_end_1;
2408         }
2409         default: {
2410           goto s_n_llhttp__internal__n_error_22;
2411         }
2412       }
2413       /* UNREACHABLE */;
2414       abort();
2415     }
2416     case s_n_llhttp__internal__n_req_http_minor:
2417     s_n_llhttp__internal__n_req_http_minor: {
2418       if (p == endp) {
2419         return s_n_llhttp__internal__n_req_http_minor;
2420       }
2421       switch (*p) {
2422         case '0': {
2423           p++;
2424           match = 0;
2425           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2426         }
2427         case '1': {
2428           p++;
2429           match = 1;
2430           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2431         }
2432         case '2': {
2433           p++;
2434           match = 2;
2435           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2436         }
2437         case '3': {
2438           p++;
2439           match = 3;
2440           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2441         }
2442         case '4': {
2443           p++;
2444           match = 4;
2445           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2446         }
2447         case '5': {
2448           p++;
2449           match = 5;
2450           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2451         }
2452         case '6': {
2453           p++;
2454           match = 6;
2455           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2456         }
2457         case '7': {
2458           p++;
2459           match = 7;
2460           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2461         }
2462         case '8': {
2463           p++;
2464           match = 8;
2465           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2466         }
2467         case '9': {
2468           p++;
2469           match = 9;
2470           goto s_n_llhttp__internal__n_invoke_store_http_minor;
2471         }
2472         default: {
2473           goto s_n_llhttp__internal__n_error_23;
2474         }
2475       }
2476       /* UNREACHABLE */;
2477       abort();
2478     }
2479     case s_n_llhttp__internal__n_req_http_dot:
2480     s_n_llhttp__internal__n_req_http_dot: {
2481       if (p == endp) {
2482         return s_n_llhttp__internal__n_req_http_dot;
2483       }
2484       switch (*p) {
2485         case '.': {
2486           p++;
2487           goto s_n_llhttp__internal__n_req_http_minor;
2488         }
2489         default: {
2490           goto s_n_llhttp__internal__n_error_24;
2491         }
2492       }
2493       /* UNREACHABLE */;
2494       abort();
2495     }
2496     case s_n_llhttp__internal__n_req_http_major:
2497     s_n_llhttp__internal__n_req_http_major: {
2498       if (p == endp) {
2499         return s_n_llhttp__internal__n_req_http_major;
2500       }
2501       switch (*p) {
2502         case '0': {
2503           p++;
2504           match = 0;
2505           goto s_n_llhttp__internal__n_invoke_store_http_major;
2506         }
2507         case '1': {
2508           p++;
2509           match = 1;
2510           goto s_n_llhttp__internal__n_invoke_store_http_major;
2511         }
2512         case '2': {
2513           p++;
2514           match = 2;
2515           goto s_n_llhttp__internal__n_invoke_store_http_major;
2516         }
2517         case '3': {
2518           p++;
2519           match = 3;
2520           goto s_n_llhttp__internal__n_invoke_store_http_major;
2521         }
2522         case '4': {
2523           p++;
2524           match = 4;
2525           goto s_n_llhttp__internal__n_invoke_store_http_major;
2526         }
2527         case '5': {
2528           p++;
2529           match = 5;
2530           goto s_n_llhttp__internal__n_invoke_store_http_major;
2531         }
2532         case '6': {
2533           p++;
2534           match = 6;
2535           goto s_n_llhttp__internal__n_invoke_store_http_major;
2536         }
2537         case '7': {
2538           p++;
2539           match = 7;
2540           goto s_n_llhttp__internal__n_invoke_store_http_major;
2541         }
2542         case '8': {
2543           p++;
2544           match = 8;
2545           goto s_n_llhttp__internal__n_invoke_store_http_major;
2546         }
2547         case '9': {
2548           p++;
2549           match = 9;
2550           goto s_n_llhttp__internal__n_invoke_store_http_major;
2551         }
2552         default: {
2553           goto s_n_llhttp__internal__n_error_25;
2554         }
2555       }
2556       /* UNREACHABLE */;
2557       abort();
2558     }
2559     case s_n_llhttp__internal__n_req_http_start_1:
2560     s_n_llhttp__internal__n_req_http_start_1: {
2561       llparse_match_t match_seq;
2562       
2563       if (p == endp) {
2564         return s_n_llhttp__internal__n_req_http_start_1;
2565       }
2566       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob16, 4);
2567       p = match_seq.current;
2568       switch (match_seq.status) {
2569         case kMatchComplete: {
2570           p++;
2571           goto s_n_llhttp__internal__n_req_http_major;
2572         }
2573         case kMatchPause: {
2574           return s_n_llhttp__internal__n_req_http_start_1;
2575         }
2576         case kMatchMismatch: {
2577           goto s_n_llhttp__internal__n_error_27;
2578         }
2579       }
2580       /* UNREACHABLE */;
2581       abort();
2582     }
2583     case s_n_llhttp__internal__n_req_http_start_2:
2584     s_n_llhttp__internal__n_req_http_start_2: {
2585       llparse_match_t match_seq;
2586       
2587       if (p == endp) {
2588         return s_n_llhttp__internal__n_req_http_start_2;
2589       }
2590       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob17, 3);
2591       p = match_seq.current;
2592       switch (match_seq.status) {
2593         case kMatchComplete: {
2594           p++;
2595           goto s_n_llhttp__internal__n_invoke_is_equal_method_1;
2596         }
2597         case kMatchPause: {
2598           return s_n_llhttp__internal__n_req_http_start_2;
2599         }
2600         case kMatchMismatch: {
2601           goto s_n_llhttp__internal__n_error_27;
2602         }
2603       }
2604       /* UNREACHABLE */;
2605       abort();
2606     }
2607     case s_n_llhttp__internal__n_req_http_start:
2608     s_n_llhttp__internal__n_req_http_start: {
2609       if (p == endp) {
2610         return s_n_llhttp__internal__n_req_http_start;
2611       }
2612       switch (*p) {
2613         case ' ': {
2614           p++;
2615           goto s_n_llhttp__internal__n_req_http_start;
2616         }
2617         case 'H': {
2618           p++;
2619           goto s_n_llhttp__internal__n_req_http_start_1;
2620         }
2621         case 'I': {
2622           p++;
2623           goto s_n_llhttp__internal__n_req_http_start_2;
2624         }
2625         default: {
2626           goto s_n_llhttp__internal__n_error_27;
2627         }
2628       }
2629       /* UNREACHABLE */;
2630       abort();
2631     }
2632     case s_n_llhttp__internal__n_url_skip_to_http:
2633     s_n_llhttp__internal__n_url_skip_to_http: {
2634       if (p == endp) {
2635         return s_n_llhttp__internal__n_url_skip_to_http;
2636       }
2637       p++;
2638       goto s_n_llhttp__internal__n_req_http_start;
2639       /* UNREACHABLE */;
2640       abort();
2641     }
2642     case s_n_llhttp__internal__n_url_fragment:
2643     s_n_llhttp__internal__n_url_fragment: {
2644       static uint8_t lookup_table[] = {
2645         0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0,
2646         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2647         4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2648         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2649         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2650         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2651         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2652         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2653         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2654         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2655         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2656         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2657         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2658         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2659         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2660         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2661       };
2662       if (p == endp) {
2663         return s_n_llhttp__internal__n_url_fragment;
2664       }
2665       switch (lookup_table[(uint8_t) *p]) {
2666         case 1: {
2667           p++;
2668           goto s_n_llhttp__internal__n_url_fragment;
2669         }
2670         case 2: {
2671           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_6;
2672         }
2673         case 3: {
2674           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_7;
2675         }
2676         case 4: {
2677           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_8;
2678         }
2679         default: {
2680           goto s_n_llhttp__internal__n_error_28;
2681         }
2682       }
2683       /* UNREACHABLE */;
2684       abort();
2685     }
2686     case s_n_llhttp__internal__n_span_end_stub_query_3:
2687     s_n_llhttp__internal__n_span_end_stub_query_3: {
2688       if (p == endp) {
2689         return s_n_llhttp__internal__n_span_end_stub_query_3;
2690       }
2691       p++;
2692       goto s_n_llhttp__internal__n_url_fragment;
2693       /* UNREACHABLE */;
2694       abort();
2695     }
2696     case s_n_llhttp__internal__n_url_query:
2697     s_n_llhttp__internal__n_url_query: {
2698       static uint8_t lookup_table[] = {
2699         0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 3, 0, 0,
2700         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2701         4, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2702         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2703         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2704         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2705         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2706         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2707         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2708         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2709         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2710         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2711         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2712         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2713         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2714         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2715       };
2716       if (p == endp) {
2717         return s_n_llhttp__internal__n_url_query;
2718       }
2719       switch (lookup_table[(uint8_t) *p]) {
2720         case 1: {
2721           p++;
2722           goto s_n_llhttp__internal__n_url_query;
2723         }
2724         case 2: {
2725           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_9;
2726         }
2727         case 3: {
2728           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_10;
2729         }
2730         case 4: {
2731           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_11;
2732         }
2733         case 5: {
2734           goto s_n_llhttp__internal__n_span_end_stub_query_3;
2735         }
2736         default: {
2737           goto s_n_llhttp__internal__n_error_29;
2738         }
2739       }
2740       /* UNREACHABLE */;
2741       abort();
2742     }
2743     case s_n_llhttp__internal__n_url_query_or_fragment:
2744     s_n_llhttp__internal__n_url_query_or_fragment: {
2745       if (p == endp) {
2746         return s_n_llhttp__internal__n_url_query_or_fragment;
2747       }
2748       switch (*p) {
2749         case 10: {
2750           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_3;
2751         }
2752         case 13: {
2753           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_4;
2754         }
2755         case ' ': {
2756           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_5;
2757         }
2758         case '#': {
2759           p++;
2760           goto s_n_llhttp__internal__n_url_fragment;
2761         }
2762         case '?': {
2763           p++;
2764           goto s_n_llhttp__internal__n_url_query;
2765         }
2766         default: {
2767           goto s_n_llhttp__internal__n_error_30;
2768         }
2769       }
2770       /* UNREACHABLE */;
2771       abort();
2772     }
2773     case s_n_llhttp__internal__n_url_path:
2774     s_n_llhttp__internal__n_url_path: {
2775       static uint8_t lookup_table[] = {
2776         0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,
2777         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2778         0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2779         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2780         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2781         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2782         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2783         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2784         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2785         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2786         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2787         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2788         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2789         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2790         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2791         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2792       };
2793       if (p == endp) {
2794         return s_n_llhttp__internal__n_url_path;
2795       }
2796       #ifdef __SSE4_2__
2797       if (endp - p >= 16) {
2798         __m128i ranges;
2799         __m128i input;
2800         int avail;
2801         int match_len;
2802       
2803         /* Load input */
2804         input = _mm_loadu_si128((__m128i const*) p);
2805         ranges = _mm_loadu_si128((__m128i const*) llparse_blob1);
2806       
2807         /* Find first character that does not match `ranges` */
2808         match_len = _mm_cmpestri(ranges, 12,
2809             input, 16,
2810             _SIDD_UBYTE_OPS | _SIDD_CMP_RANGES |
2811               _SIDD_NEGATIVE_POLARITY);
2812       
2813         if (match_len != 0) {
2814           p += match_len;
2815           goto s_n_llhttp__internal__n_url_path;
2816         }
2817         goto s_n_llhttp__internal__n_url_query_or_fragment;
2818       }
2819       #endif  /* __SSE4_2__ */
2820       switch (lookup_table[(uint8_t) *p]) {
2821         case 1: {
2822           p++;
2823           goto s_n_llhttp__internal__n_url_path;
2824         }
2825         default: {
2826           goto s_n_llhttp__internal__n_url_query_or_fragment;
2827         }
2828       }
2829       /* UNREACHABLE */;
2830       abort();
2831     }
2832     case s_n_llhttp__internal__n_span_start_stub_path_2:
2833     s_n_llhttp__internal__n_span_start_stub_path_2: {
2834       if (p == endp) {
2835         return s_n_llhttp__internal__n_span_start_stub_path_2;
2836       }
2837       p++;
2838       goto s_n_llhttp__internal__n_url_path;
2839       /* UNREACHABLE */;
2840       abort();
2841     }
2842     case s_n_llhttp__internal__n_span_start_stub_path:
2843     s_n_llhttp__internal__n_span_start_stub_path: {
2844       if (p == endp) {
2845         return s_n_llhttp__internal__n_span_start_stub_path;
2846       }
2847       p++;
2848       goto s_n_llhttp__internal__n_url_path;
2849       /* UNREACHABLE */;
2850       abort();
2851     }
2852     case s_n_llhttp__internal__n_span_start_stub_path_1:
2853     s_n_llhttp__internal__n_span_start_stub_path_1: {
2854       if (p == endp) {
2855         return s_n_llhttp__internal__n_span_start_stub_path_1;
2856       }
2857       p++;
2858       goto s_n_llhttp__internal__n_url_path;
2859       /* UNREACHABLE */;
2860       abort();
2861     }
2862     case s_n_llhttp__internal__n_url_server_with_at:
2863     s_n_llhttp__internal__n_url_server_with_at: {
2864       static uint8_t lookup_table[] = {
2865         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0,
2866         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2867         3, 4, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
2868         4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 0, 6,
2869         7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
2870         4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 0, 4,
2871         0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
2872         4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 4, 0,
2873         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2874         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2875         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2876         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2877         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2878         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2879         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2880         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
2881       };
2882       if (p == endp) {
2883         return s_n_llhttp__internal__n_url_server_with_at;
2884       }
2885       switch (lookup_table[(uint8_t) *p]) {
2886         case 1: {
2887           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_12;
2888         }
2889         case 2: {
2890           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_13;
2891         }
2892         case 3: {
2893           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_14;
2894         }
2895         case 4: {
2896           p++;
2897           goto s_n_llhttp__internal__n_url_server;
2898         }
2899         case 5: {
2900           goto s_n_llhttp__internal__n_span_start_stub_path_1;
2901         }
2902         case 6: {
2903           p++;
2904           goto s_n_llhttp__internal__n_url_query;
2905         }
2906         case 7: {
2907           p++;
2908           goto s_n_llhttp__internal__n_error_31;
2909         }
2910         default: {
2911           goto s_n_llhttp__internal__n_error_32;
2912         }
2913       }
2914       /* UNREACHABLE */;
2915       abort();
2916     }
2917     case s_n_llhttp__internal__n_url_server:
2918     s_n_llhttp__internal__n_url_server: {
2919       static uint8_t lookup_table[] = {
2920         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0,
2921         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2922         3, 4, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
2923         4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 0, 6,
2924         7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
2925         4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 0, 4,
2926         0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
2927         4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 4, 0,
2928         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2929         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2930         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2931         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2932         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2933         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2934         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2935         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
2936       };
2937       if (p == endp) {
2938         return s_n_llhttp__internal__n_url_server;
2939       }
2940       switch (lookup_table[(uint8_t) *p]) {
2941         case 1: {
2942           goto s_n_llhttp__internal__n_span_end_llhttp__on_url;
2943         }
2944         case 2: {
2945           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_1;
2946         }
2947         case 3: {
2948           goto s_n_llhttp__internal__n_span_end_llhttp__on_url_2;
2949         }
2950         case 4: {
2951           p++;
2952           goto s_n_llhttp__internal__n_url_server;
2953         }
2954         case 5: {
2955           goto s_n_llhttp__internal__n_span_start_stub_path;
2956         }
2957         case 6: {
2958           p++;
2959           goto s_n_llhttp__internal__n_url_query;
2960         }
2961         case 7: {
2962           p++;
2963           goto s_n_llhttp__internal__n_url_server_with_at;
2964         }
2965         default: {
2966           goto s_n_llhttp__internal__n_error_33;
2967         }
2968       }
2969       /* UNREACHABLE */;
2970       abort();
2971     }
2972     case s_n_llhttp__internal__n_url_schema_delim_1:
2973     s_n_llhttp__internal__n_url_schema_delim_1: {
2974       if (p == endp) {
2975         return s_n_llhttp__internal__n_url_schema_delim_1;
2976       }
2977       switch (*p) {
2978         case '/': {
2979           p++;
2980           goto s_n_llhttp__internal__n_url_server;
2981         }
2982         default: {
2983           goto s_n_llhttp__internal__n_error_35;
2984         }
2985       }
2986       /* UNREACHABLE */;
2987       abort();
2988     }
2989     case s_n_llhttp__internal__n_url_schema_delim:
2990     s_n_llhttp__internal__n_url_schema_delim: {
2991       if (p == endp) {
2992         return s_n_llhttp__internal__n_url_schema_delim;
2993       }
2994       switch (*p) {
2995         case 10: {
2996           p++;
2997           goto s_n_llhttp__internal__n_error_34;
2998         }
2999         case 13: {
3000           p++;
3001           goto s_n_llhttp__internal__n_error_34;
3002         }
3003         case ' ': {
3004           p++;
3005           goto s_n_llhttp__internal__n_error_34;
3006         }
3007         case '/': {
3008           p++;
3009           goto s_n_llhttp__internal__n_url_schema_delim_1;
3010         }
3011         default: {
3012           goto s_n_llhttp__internal__n_error_35;
3013         }
3014       }
3015       /* UNREACHABLE */;
3016       abort();
3017     }
3018     case s_n_llhttp__internal__n_span_end_stub_schema:
3019     s_n_llhttp__internal__n_span_end_stub_schema: {
3020       if (p == endp) {
3021         return s_n_llhttp__internal__n_span_end_stub_schema;
3022       }
3023       p++;
3024       goto s_n_llhttp__internal__n_url_schema_delim;
3025       /* UNREACHABLE */;
3026       abort();
3027     }
3028     case s_n_llhttp__internal__n_url_schema:
3029     s_n_llhttp__internal__n_url_schema: {
3030       static uint8_t lookup_table[] = {
3031         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
3032         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3033         1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3034         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
3035         0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3036         3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3037         0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3038         3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3039         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3040         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3041         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3042         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3043         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3044         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3045         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3046         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
3047       };
3048       if (p == endp) {
3049         return s_n_llhttp__internal__n_url_schema;
3050       }
3051       switch (lookup_table[(uint8_t) *p]) {
3052         case 1: {
3053           p++;
3054           goto s_n_llhttp__internal__n_error_34;
3055         }
3056         case 2: {
3057           goto s_n_llhttp__internal__n_span_end_stub_schema;
3058         }
3059         case 3: {
3060           p++;
3061           goto s_n_llhttp__internal__n_url_schema;
3062         }
3063         default: {
3064           goto s_n_llhttp__internal__n_error_36;
3065         }
3066       }
3067       /* UNREACHABLE */;
3068       abort();
3069     }
3070     case s_n_llhttp__internal__n_url_start:
3071     s_n_llhttp__internal__n_url_start: {
3072       static uint8_t lookup_table[] = {
3073         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
3074         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3075         1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2,
3076         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3077         0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3078         3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3079         0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3080         3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3081         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3082         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3083         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3084         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3085         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3086         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3087         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3088         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
3089       };
3090       if (p == endp) {
3091         return s_n_llhttp__internal__n_url_start;
3092       }
3093       switch (lookup_table[(uint8_t) *p]) {
3094         case 1: {
3095           p++;
3096           goto s_n_llhttp__internal__n_error_34;
3097         }
3098         case 2: {
3099           goto s_n_llhttp__internal__n_span_start_stub_path_2;
3100         }
3101         case 3: {
3102           goto s_n_llhttp__internal__n_url_schema;
3103         }
3104         default: {
3105           goto s_n_llhttp__internal__n_error_37;
3106         }
3107       }
3108       /* UNREACHABLE */;
3109       abort();
3110     }
3111     case s_n_llhttp__internal__n_span_start_llhttp__on_url_1:
3112     s_n_llhttp__internal__n_span_start_llhttp__on_url_1: {
3113       if (p == endp) {
3114         return s_n_llhttp__internal__n_span_start_llhttp__on_url_1;
3115       }
3116       state->_span_pos0 = (void*) p;
3117       state->_span_cb0 = llhttp__on_url;
3118       goto s_n_llhttp__internal__n_url_start;
3119       /* UNREACHABLE */;
3120       abort();
3121     }
3122     case s_n_llhttp__internal__n_span_start_llhttp__on_url:
3123     s_n_llhttp__internal__n_span_start_llhttp__on_url: {
3124       if (p == endp) {
3125         return s_n_llhttp__internal__n_span_start_llhttp__on_url;
3126       }
3127       state->_span_pos0 = (void*) p;
3128       state->_span_cb0 = llhttp__on_url;
3129       goto s_n_llhttp__internal__n_url_server;
3130       /* UNREACHABLE */;
3131       abort();
3132     }
3133     case s_n_llhttp__internal__n_req_spaces_before_url:
3134     s_n_llhttp__internal__n_req_spaces_before_url: {
3135       if (p == endp) {
3136         return s_n_llhttp__internal__n_req_spaces_before_url;
3137       }
3138       switch (*p) {
3139         case ' ': {
3140           p++;
3141           goto s_n_llhttp__internal__n_req_spaces_before_url;
3142         }
3143         default: {
3144           goto s_n_llhttp__internal__n_invoke_is_equal_method;
3145         }
3146       }
3147       /* UNREACHABLE */;
3148       abort();
3149     }
3150     case s_n_llhttp__internal__n_req_first_space_before_url:
3151     s_n_llhttp__internal__n_req_first_space_before_url: {
3152       if (p == endp) {
3153         return s_n_llhttp__internal__n_req_first_space_before_url;
3154       }
3155       switch (*p) {
3156         case ' ': {
3157           p++;
3158           goto s_n_llhttp__internal__n_req_spaces_before_url;
3159         }
3160         default: {
3161           goto s_n_llhttp__internal__n_error_38;
3162         }
3163       }
3164       /* UNREACHABLE */;
3165       abort();
3166     }
3167     case s_n_llhttp__internal__n_start_req_1:
3168     s_n_llhttp__internal__n_start_req_1: {
3169       llparse_match_t match_seq;
3170       
3171       if (p == endp) {
3172         return s_n_llhttp__internal__n_start_req_1;
3173       }
3174       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob0, 2);
3175       p = match_seq.current;
3176       switch (match_seq.status) {
3177         case kMatchComplete: {
3178           p++;
3179           match = 19;
3180           goto s_n_llhttp__internal__n_invoke_store_method_1;
3181         }
3182         case kMatchPause: {
3183           return s_n_llhttp__internal__n_start_req_1;
3184         }
3185         case kMatchMismatch: {
3186           goto s_n_llhttp__internal__n_error_46;
3187         }
3188       }
3189       /* UNREACHABLE */;
3190       abort();
3191     }
3192     case s_n_llhttp__internal__n_start_req_2:
3193     s_n_llhttp__internal__n_start_req_2: {
3194       llparse_match_t match_seq;
3195       
3196       if (p == endp) {
3197         return s_n_llhttp__internal__n_start_req_2;
3198       }
3199       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob18, 3);
3200       p = match_seq.current;
3201       switch (match_seq.status) {
3202         case kMatchComplete: {
3203           p++;
3204           match = 16;
3205           goto s_n_llhttp__internal__n_invoke_store_method_1;
3206         }
3207         case kMatchPause: {
3208           return s_n_llhttp__internal__n_start_req_2;
3209         }
3210         case kMatchMismatch: {
3211           goto s_n_llhttp__internal__n_error_46;
3212         }
3213       }
3214       /* UNREACHABLE */;
3215       abort();
3216     }
3217     case s_n_llhttp__internal__n_start_req_4:
3218     s_n_llhttp__internal__n_start_req_4: {
3219       llparse_match_t match_seq;
3220       
3221       if (p == endp) {
3222         return s_n_llhttp__internal__n_start_req_4;
3223       }
3224       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob19, 6);
3225       p = match_seq.current;
3226       switch (match_seq.status) {
3227         case kMatchComplete: {
3228           p++;
3229           match = 22;
3230           goto s_n_llhttp__internal__n_invoke_store_method_1;
3231         }
3232         case kMatchPause: {
3233           return s_n_llhttp__internal__n_start_req_4;
3234         }
3235         case kMatchMismatch: {
3236           goto s_n_llhttp__internal__n_error_46;
3237         }
3238       }
3239       /* UNREACHABLE */;
3240       abort();
3241     }
3242     case s_n_llhttp__internal__n_start_req_6:
3243     s_n_llhttp__internal__n_start_req_6: {
3244       llparse_match_t match_seq;
3245       
3246       if (p == endp) {
3247         return s_n_llhttp__internal__n_start_req_6;
3248       }
3249       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob20, 4);
3250       p = match_seq.current;
3251       switch (match_seq.status) {
3252         case kMatchComplete: {
3253           p++;
3254           match = 5;
3255           goto s_n_llhttp__internal__n_invoke_store_method_1;
3256         }
3257         case kMatchPause: {
3258           return s_n_llhttp__internal__n_start_req_6;
3259         }
3260         case kMatchMismatch: {
3261           goto s_n_llhttp__internal__n_error_46;
3262         }
3263       }
3264       /* UNREACHABLE */;
3265       abort();
3266     }
3267     case s_n_llhttp__internal__n_start_req_7:
3268     s_n_llhttp__internal__n_start_req_7: {
3269       if (p == endp) {
3270         return s_n_llhttp__internal__n_start_req_7;
3271       }
3272       switch (*p) {
3273         case 'Y': {
3274           p++;
3275           match = 8;
3276           goto s_n_llhttp__internal__n_invoke_store_method_1;
3277         }
3278         default: {
3279           goto s_n_llhttp__internal__n_error_46;
3280         }
3281       }
3282       /* UNREACHABLE */;
3283       abort();
3284     }
3285     case s_n_llhttp__internal__n_start_req_5:
3286     s_n_llhttp__internal__n_start_req_5: {
3287       if (p == endp) {
3288         return s_n_llhttp__internal__n_start_req_5;
3289       }
3290       switch (*p) {
3291         case 'N': {
3292           p++;
3293           goto s_n_llhttp__internal__n_start_req_6;
3294         }
3295         case 'P': {
3296           p++;
3297           goto s_n_llhttp__internal__n_start_req_7;
3298         }
3299         default: {
3300           goto s_n_llhttp__internal__n_error_46;
3301         }
3302       }
3303       /* UNREACHABLE */;
3304       abort();
3305     }
3306     case s_n_llhttp__internal__n_start_req_3:
3307     s_n_llhttp__internal__n_start_req_3: {
3308       if (p == endp) {
3309         return s_n_llhttp__internal__n_start_req_3;
3310       }
3311       switch (*p) {
3312         case 'H': {
3313           p++;
3314           goto s_n_llhttp__internal__n_start_req_4;
3315         }
3316         case 'O': {
3317           p++;
3318           goto s_n_llhttp__internal__n_start_req_5;
3319         }
3320         default: {
3321           goto s_n_llhttp__internal__n_error_46;
3322         }
3323       }
3324       /* UNREACHABLE */;
3325       abort();
3326     }
3327     case s_n_llhttp__internal__n_start_req_8:
3328     s_n_llhttp__internal__n_start_req_8: {
3329       llparse_match_t match_seq;
3330       
3331       if (p == endp) {
3332         return s_n_llhttp__internal__n_start_req_8;
3333       }
3334       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob21, 5);
3335       p = match_seq.current;
3336       switch (match_seq.status) {
3337         case kMatchComplete: {
3338           p++;
3339           match = 0;
3340           goto s_n_llhttp__internal__n_invoke_store_method_1;
3341         }
3342         case kMatchPause: {
3343           return s_n_llhttp__internal__n_start_req_8;
3344         }
3345         case kMatchMismatch: {
3346           goto s_n_llhttp__internal__n_error_46;
3347         }
3348       }
3349       /* UNREACHABLE */;
3350       abort();
3351     }
3352     case s_n_llhttp__internal__n_start_req_9:
3353     s_n_llhttp__internal__n_start_req_9: {
3354       llparse_match_t match_seq;
3355       
3356       if (p == endp) {
3357         return s_n_llhttp__internal__n_start_req_9;
3358       }
3359       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob22, 2);
3360       p = match_seq.current;
3361       switch (match_seq.status) {
3362         case kMatchComplete: {
3363           p++;
3364           match = 1;
3365           goto s_n_llhttp__internal__n_invoke_store_method_1;
3366         }
3367         case kMatchPause: {
3368           return s_n_llhttp__internal__n_start_req_9;
3369         }
3370         case kMatchMismatch: {
3371           goto s_n_llhttp__internal__n_error_46;
3372         }
3373       }
3374       /* UNREACHABLE */;
3375       abort();
3376     }
3377     case s_n_llhttp__internal__n_start_req_10:
3378     s_n_llhttp__internal__n_start_req_10: {
3379       llparse_match_t match_seq;
3380       
3381       if (p == endp) {
3382         return s_n_llhttp__internal__n_start_req_10;
3383       }
3384       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob23, 3);
3385       p = match_seq.current;
3386       switch (match_seq.status) {
3387         case kMatchComplete: {
3388           p++;
3389           match = 2;
3390           goto s_n_llhttp__internal__n_invoke_store_method_1;
3391         }
3392         case kMatchPause: {
3393           return s_n_llhttp__internal__n_start_req_10;
3394         }
3395         case kMatchMismatch: {
3396           goto s_n_llhttp__internal__n_error_46;
3397         }
3398       }
3399       /* UNREACHABLE */;
3400       abort();
3401     }
3402     case s_n_llhttp__internal__n_start_req_12:
3403     s_n_llhttp__internal__n_start_req_12: {
3404       llparse_match_t match_seq;
3405       
3406       if (p == endp) {
3407         return s_n_llhttp__internal__n_start_req_12;
3408       }
3409       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob24, 2);
3410       p = match_seq.current;
3411       switch (match_seq.status) {
3412         case kMatchComplete: {
3413           p++;
3414           match = 31;
3415           goto s_n_llhttp__internal__n_invoke_store_method_1;
3416         }
3417         case kMatchPause: {
3418           return s_n_llhttp__internal__n_start_req_12;
3419         }
3420         case kMatchMismatch: {
3421           goto s_n_llhttp__internal__n_error_46;
3422         }
3423       }
3424       /* UNREACHABLE */;
3425       abort();
3426     }
3427     case s_n_llhttp__internal__n_start_req_13:
3428     s_n_llhttp__internal__n_start_req_13: {
3429       llparse_match_t match_seq;
3430       
3431       if (p == endp) {
3432         return s_n_llhttp__internal__n_start_req_13;
3433       }
3434       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob25, 2);
3435       p = match_seq.current;
3436       switch (match_seq.status) {
3437         case kMatchComplete: {
3438           p++;
3439           match = 9;
3440           goto s_n_llhttp__internal__n_invoke_store_method_1;
3441         }
3442         case kMatchPause: {
3443           return s_n_llhttp__internal__n_start_req_13;
3444         }
3445         case kMatchMismatch: {
3446           goto s_n_llhttp__internal__n_error_46;
3447         }
3448       }
3449       /* UNREACHABLE */;
3450       abort();
3451     }
3452     case s_n_llhttp__internal__n_start_req_11:
3453     s_n_llhttp__internal__n_start_req_11: {
3454       if (p == endp) {
3455         return s_n_llhttp__internal__n_start_req_11;
3456       }
3457       switch (*p) {
3458         case 'I': {
3459           p++;
3460           goto s_n_llhttp__internal__n_start_req_12;
3461         }
3462         case 'O': {
3463           p++;
3464           goto s_n_llhttp__internal__n_start_req_13;
3465         }
3466         default: {
3467           goto s_n_llhttp__internal__n_error_46;
3468         }
3469       }
3470       /* UNREACHABLE */;
3471       abort();
3472     }
3473     case s_n_llhttp__internal__n_start_req_15:
3474     s_n_llhttp__internal__n_start_req_15: {
3475       llparse_match_t match_seq;
3476       
3477       if (p == endp) {
3478         return s_n_llhttp__internal__n_start_req_15;
3479       }
3480       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob26, 6);
3481       p = match_seq.current;
3482       switch (match_seq.status) {
3483         case kMatchComplete: {
3484           p++;
3485           match = 24;
3486           goto s_n_llhttp__internal__n_invoke_store_method_1;
3487         }
3488         case kMatchPause: {
3489           return s_n_llhttp__internal__n_start_req_15;
3490         }
3491         case kMatchMismatch: {
3492           goto s_n_llhttp__internal__n_error_46;
3493         }
3494       }
3495       /* UNREACHABLE */;
3496       abort();
3497     }
3498     case s_n_llhttp__internal__n_start_req_16:
3499     s_n_llhttp__internal__n_start_req_16: {
3500       llparse_match_t match_seq;
3501       
3502       if (p == endp) {
3503         return s_n_llhttp__internal__n_start_req_16;
3504       }
3505       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob27, 3);
3506       p = match_seq.current;
3507       switch (match_seq.status) {
3508         case kMatchComplete: {
3509           p++;
3510           match = 23;
3511           goto s_n_llhttp__internal__n_invoke_store_method_1;
3512         }
3513         case kMatchPause: {
3514           return s_n_llhttp__internal__n_start_req_16;
3515         }
3516         case kMatchMismatch: {
3517           goto s_n_llhttp__internal__n_error_46;
3518         }
3519       }
3520       /* UNREACHABLE */;
3521       abort();
3522     }
3523     case s_n_llhttp__internal__n_start_req_18:
3524     s_n_llhttp__internal__n_start_req_18: {
3525       llparse_match_t match_seq;
3526       
3527       if (p == endp) {
3528         return s_n_llhttp__internal__n_start_req_18;
3529       }
3530       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob28, 7);
3531       p = match_seq.current;
3532       switch (match_seq.status) {
3533         case kMatchComplete: {
3534           p++;
3535           match = 21;
3536           goto s_n_llhttp__internal__n_invoke_store_method_1;
3537         }
3538         case kMatchPause: {
3539           return s_n_llhttp__internal__n_start_req_18;
3540         }
3541         case kMatchMismatch: {
3542           goto s_n_llhttp__internal__n_error_46;
3543         }
3544       }
3545       /* UNREACHABLE */;
3546       abort();
3547     }
3548     case s_n_llhttp__internal__n_start_req_20:
3549     s_n_llhttp__internal__n_start_req_20: {
3550       llparse_match_t match_seq;
3551       
3552       if (p == endp) {
3553         return s_n_llhttp__internal__n_start_req_20;
3554       }
3555       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob29, 6);
3556       p = match_seq.current;
3557       switch (match_seq.status) {
3558         case kMatchComplete: {
3559           p++;
3560           match = 30;
3561           goto s_n_llhttp__internal__n_invoke_store_method_1;
3562         }
3563         case kMatchPause: {
3564           return s_n_llhttp__internal__n_start_req_20;
3565         }
3566         case kMatchMismatch: {
3567           goto s_n_llhttp__internal__n_error_46;
3568         }
3569       }
3570       /* UNREACHABLE */;
3571       abort();
3572     }
3573     case s_n_llhttp__internal__n_start_req_21:
3574     s_n_llhttp__internal__n_start_req_21: {
3575       if (p == endp) {
3576         return s_n_llhttp__internal__n_start_req_21;
3577       }
3578       switch (*p) {
3579         case 'L': {
3580           p++;
3581           match = 10;
3582           goto s_n_llhttp__internal__n_invoke_store_method_1;
3583         }
3584         default: {
3585           goto s_n_llhttp__internal__n_error_46;
3586         }
3587       }
3588       /* UNREACHABLE */;
3589       abort();
3590     }
3591     case s_n_llhttp__internal__n_start_req_19:
3592     s_n_llhttp__internal__n_start_req_19: {
3593       if (p == endp) {
3594         return s_n_llhttp__internal__n_start_req_19;
3595       }
3596       switch (*p) {
3597         case 'A': {
3598           p++;
3599           goto s_n_llhttp__internal__n_start_req_20;
3600         }
3601         case 'O': {
3602           p++;
3603           goto s_n_llhttp__internal__n_start_req_21;
3604         }
3605         default: {
3606           goto s_n_llhttp__internal__n_error_46;
3607         }
3608       }
3609       /* UNREACHABLE */;
3610       abort();
3611     }
3612     case s_n_llhttp__internal__n_start_req_17:
3613     s_n_llhttp__internal__n_start_req_17: {
3614       if (p == endp) {
3615         return s_n_llhttp__internal__n_start_req_17;
3616       }
3617       switch (*p) {
3618         case 'A': {
3619           p++;
3620           goto s_n_llhttp__internal__n_start_req_18;
3621         }
3622         case 'C': {
3623           p++;
3624           goto s_n_llhttp__internal__n_start_req_19;
3625         }
3626         default: {
3627           goto s_n_llhttp__internal__n_error_46;
3628         }
3629       }
3630       /* UNREACHABLE */;
3631       abort();
3632     }
3633     case s_n_llhttp__internal__n_start_req_22:
3634     s_n_llhttp__internal__n_start_req_22: {
3635       llparse_match_t match_seq;
3636       
3637       if (p == endp) {
3638         return s_n_llhttp__internal__n_start_req_22;
3639       }
3640       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob30, 2);
3641       p = match_seq.current;
3642       switch (match_seq.status) {
3643         case kMatchComplete: {
3644           p++;
3645           match = 11;
3646           goto s_n_llhttp__internal__n_invoke_store_method_1;
3647         }
3648         case kMatchPause: {
3649           return s_n_llhttp__internal__n_start_req_22;
3650         }
3651         case kMatchMismatch: {
3652           goto s_n_llhttp__internal__n_error_46;
3653         }
3654       }
3655       /* UNREACHABLE */;
3656       abort();
3657     }
3658     case s_n_llhttp__internal__n_start_req_14:
3659     s_n_llhttp__internal__n_start_req_14: {
3660       if (p == endp) {
3661         return s_n_llhttp__internal__n_start_req_14;
3662       }
3663       switch (*p) {
3664         case '-': {
3665           p++;
3666           goto s_n_llhttp__internal__n_start_req_15;
3667         }
3668         case 'E': {
3669           p++;
3670           goto s_n_llhttp__internal__n_start_req_16;
3671         }
3672         case 'K': {
3673           p++;
3674           goto s_n_llhttp__internal__n_start_req_17;
3675         }
3676         case 'O': {
3677           p++;
3678           goto s_n_llhttp__internal__n_start_req_22;
3679         }
3680         default: {
3681           goto s_n_llhttp__internal__n_error_46;
3682         }
3683       }
3684       /* UNREACHABLE */;
3685       abort();
3686     }
3687     case s_n_llhttp__internal__n_start_req_23:
3688     s_n_llhttp__internal__n_start_req_23: {
3689       llparse_match_t match_seq;
3690       
3691       if (p == endp) {
3692         return s_n_llhttp__internal__n_start_req_23;
3693       }
3694       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob31, 5);
3695       p = match_seq.current;
3696       switch (match_seq.status) {
3697         case kMatchComplete: {
3698           p++;
3699           match = 25;
3700           goto s_n_llhttp__internal__n_invoke_store_method_1;
3701         }
3702         case kMatchPause: {
3703           return s_n_llhttp__internal__n_start_req_23;
3704         }
3705         case kMatchMismatch: {
3706           goto s_n_llhttp__internal__n_error_46;
3707         }
3708       }
3709       /* UNREACHABLE */;
3710       abort();
3711     }
3712     case s_n_llhttp__internal__n_start_req_24:
3713     s_n_llhttp__internal__n_start_req_24: {
3714       llparse_match_t match_seq;
3715       
3716       if (p == endp) {
3717         return s_n_llhttp__internal__n_start_req_24;
3718       }
3719       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob32, 6);
3720       p = match_seq.current;
3721       switch (match_seq.status) {
3722         case kMatchComplete: {
3723           p++;
3724           match = 6;
3725           goto s_n_llhttp__internal__n_invoke_store_method_1;
3726         }
3727         case kMatchPause: {
3728           return s_n_llhttp__internal__n_start_req_24;
3729         }
3730         case kMatchMismatch: {
3731           goto s_n_llhttp__internal__n_error_46;
3732         }
3733       }
3734       /* UNREACHABLE */;
3735       abort();
3736     }
3737     case s_n_llhttp__internal__n_start_req_26:
3738     s_n_llhttp__internal__n_start_req_26: {
3739       llparse_match_t match_seq;
3740       
3741       if (p == endp) {
3742         return s_n_llhttp__internal__n_start_req_26;
3743       }
3744       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob33, 3);
3745       p = match_seq.current;
3746       switch (match_seq.status) {
3747         case kMatchComplete: {
3748           p++;
3749           match = 28;
3750           goto s_n_llhttp__internal__n_invoke_store_method_1;
3751         }
3752         case kMatchPause: {
3753           return s_n_llhttp__internal__n_start_req_26;
3754         }
3755         case kMatchMismatch: {
3756           goto s_n_llhttp__internal__n_error_46;
3757         }
3758       }
3759       /* UNREACHABLE */;
3760       abort();
3761     }
3762     case s_n_llhttp__internal__n_start_req_27:
3763     s_n_llhttp__internal__n_start_req_27: {
3764       llparse_match_t match_seq;
3765       
3766       if (p == endp) {
3767         return s_n_llhttp__internal__n_start_req_27;
3768       }
3769       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob34, 2);
3770       p = match_seq.current;
3771       switch (match_seq.status) {
3772         case kMatchComplete: {
3773           p++;
3774           match = 3;
3775           goto s_n_llhttp__internal__n_invoke_store_method_1;
3776         }
3777         case kMatchPause: {
3778           return s_n_llhttp__internal__n_start_req_27;
3779         }
3780         case kMatchMismatch: {
3781           goto s_n_llhttp__internal__n_error_46;
3782         }
3783       }
3784       /* UNREACHABLE */;
3785       abort();
3786     }
3787     case s_n_llhttp__internal__n_start_req_30:
3788     s_n_llhttp__internal__n_start_req_30: {
3789       llparse_match_t match_seq;
3790       
3791       if (p == endp) {
3792         return s_n_llhttp__internal__n_start_req_30;
3793       }
3794       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob36, 3);
3795       p = match_seq.current;
3796       switch (match_seq.status) {
3797         case kMatchComplete: {
3798           p++;
3799           match = 12;
3800           goto s_n_llhttp__internal__n_invoke_store_method_1;
3801         }
3802         case kMatchPause: {
3803           return s_n_llhttp__internal__n_start_req_30;
3804         }
3805         case kMatchMismatch: {
3806           goto s_n_llhttp__internal__n_error_46;
3807         }
3808       }
3809       /* UNREACHABLE */;
3810       abort();
3811     }
3812     case s_n_llhttp__internal__n_start_req_31:
3813     s_n_llhttp__internal__n_start_req_31: {
3814       llparse_match_t match_seq;
3815       
3816       if (p == endp) {
3817         return s_n_llhttp__internal__n_start_req_31;
3818       }
3819       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob37, 4);
3820       p = match_seq.current;
3821       switch (match_seq.status) {
3822         case kMatchComplete: {
3823           p++;
3824           match = 13;
3825           goto s_n_llhttp__internal__n_invoke_store_method_1;
3826         }
3827         case kMatchPause: {
3828           return s_n_llhttp__internal__n_start_req_31;
3829         }
3830         case kMatchMismatch: {
3831           goto s_n_llhttp__internal__n_error_46;
3832         }
3833       }
3834       /* UNREACHABLE */;
3835       abort();
3836     }
3837     case s_n_llhttp__internal__n_start_req_29:
3838     s_n_llhttp__internal__n_start_req_29: {
3839       if (p == endp) {
3840         return s_n_llhttp__internal__n_start_req_29;
3841       }
3842       switch (*p) {
3843         case 'F': {
3844           p++;
3845           goto s_n_llhttp__internal__n_start_req_30;
3846         }
3847         case 'P': {
3848           p++;
3849           goto s_n_llhttp__internal__n_start_req_31;
3850         }
3851         default: {
3852           goto s_n_llhttp__internal__n_error_46;
3853         }
3854       }
3855       /* UNREACHABLE */;
3856       abort();
3857     }
3858     case s_n_llhttp__internal__n_start_req_28:
3859     s_n_llhttp__internal__n_start_req_28: {
3860       llparse_match_t match_seq;
3861       
3862       if (p == endp) {
3863         return s_n_llhttp__internal__n_start_req_28;
3864       }
3865       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob35, 2);
3866       p = match_seq.current;
3867       switch (match_seq.status) {
3868         case kMatchComplete: {
3869           p++;
3870           goto s_n_llhttp__internal__n_start_req_29;
3871         }
3872         case kMatchPause: {
3873           return s_n_llhttp__internal__n_start_req_28;
3874         }
3875         case kMatchMismatch: {
3876           goto s_n_llhttp__internal__n_error_46;
3877         }
3878       }
3879       /* UNREACHABLE */;
3880       abort();
3881     }
3882     case s_n_llhttp__internal__n_start_req_33:
3883     s_n_llhttp__internal__n_start_req_33: {
3884       llparse_match_t match_seq;
3885       
3886       if (p == endp) {
3887         return s_n_llhttp__internal__n_start_req_33;
3888       }
3889       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob38, 2);
3890       p = match_seq.current;
3891       switch (match_seq.status) {
3892         case kMatchComplete: {
3893           p++;
3894           match = 29;
3895           goto s_n_llhttp__internal__n_invoke_store_method_1;
3896         }
3897         case kMatchPause: {
3898           return s_n_llhttp__internal__n_start_req_33;
3899         }
3900         case kMatchMismatch: {
3901           goto s_n_llhttp__internal__n_error_46;
3902         }
3903       }
3904       /* UNREACHABLE */;
3905       abort();
3906     }
3907     case s_n_llhttp__internal__n_start_req_32:
3908     s_n_llhttp__internal__n_start_req_32: {
3909       if (p == endp) {
3910         return s_n_llhttp__internal__n_start_req_32;
3911       }
3912       switch (*p) {
3913         case 'R': {
3914           p++;
3915           goto s_n_llhttp__internal__n_start_req_33;
3916         }
3917         case 'T': {
3918           p++;
3919           match = 4;
3920           goto s_n_llhttp__internal__n_invoke_store_method_1;
3921         }
3922         default: {
3923           goto s_n_llhttp__internal__n_error_46;
3924         }
3925       }
3926       /* UNREACHABLE */;
3927       abort();
3928     }
3929     case s_n_llhttp__internal__n_start_req_25:
3930     s_n_llhttp__internal__n_start_req_25: {
3931       if (p == endp) {
3932         return s_n_llhttp__internal__n_start_req_25;
3933       }
3934       switch (*p) {
3935         case 'A': {
3936           p++;
3937           goto s_n_llhttp__internal__n_start_req_26;
3938         }
3939         case 'O': {
3940           p++;
3941           goto s_n_llhttp__internal__n_start_req_27;
3942         }
3943         case 'R': {
3944           p++;
3945           goto s_n_llhttp__internal__n_start_req_28;
3946         }
3947         case 'U': {
3948           p++;
3949           goto s_n_llhttp__internal__n_start_req_32;
3950         }
3951         default: {
3952           goto s_n_llhttp__internal__n_error_46;
3953         }
3954       }
3955       /* UNREACHABLE */;
3956       abort();
3957     }
3958     case s_n_llhttp__internal__n_start_req_36:
3959     s_n_llhttp__internal__n_start_req_36: {
3960       llparse_match_t match_seq;
3961       
3962       if (p == endp) {
3963         return s_n_llhttp__internal__n_start_req_36;
3964       }
3965       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob39, 3);
3966       p = match_seq.current;
3967       switch (match_seq.status) {
3968         case kMatchComplete: {
3969           p++;
3970           match = 17;
3971           goto s_n_llhttp__internal__n_invoke_store_method_1;
3972         }
3973         case kMatchPause: {
3974           return s_n_llhttp__internal__n_start_req_36;
3975         }
3976         case kMatchMismatch: {
3977           goto s_n_llhttp__internal__n_error_46;
3978         }
3979       }
3980       /* UNREACHABLE */;
3981       abort();
3982     }
3983     case s_n_llhttp__internal__n_start_req_37:
3984     s_n_llhttp__internal__n_start_req_37: {
3985       llparse_match_t match_seq;
3986       
3987       if (p == endp) {
3988         return s_n_llhttp__internal__n_start_req_37;
3989       }
3990       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob40, 3);
3991       p = match_seq.current;
3992       switch (match_seq.status) {
3993         case kMatchComplete: {
3994           p++;
3995           match = 20;
3996           goto s_n_llhttp__internal__n_invoke_store_method_1;
3997         }
3998         case kMatchPause: {
3999           return s_n_llhttp__internal__n_start_req_37;
4000         }
4001         case kMatchMismatch: {
4002           goto s_n_llhttp__internal__n_error_46;
4003         }
4004       }
4005       /* UNREACHABLE */;
4006       abort();
4007     }
4008     case s_n_llhttp__internal__n_start_req_35:
4009     s_n_llhttp__internal__n_start_req_35: {
4010       if (p == endp) {
4011         return s_n_llhttp__internal__n_start_req_35;
4012       }
4013       switch (*p) {
4014         case 'B': {
4015           p++;
4016           goto s_n_llhttp__internal__n_start_req_36;
4017         }
4018         case 'P': {
4019           p++;
4020           goto s_n_llhttp__internal__n_start_req_37;
4021         }
4022         default: {
4023           goto s_n_llhttp__internal__n_error_46;
4024         }
4025       }
4026       /* UNREACHABLE */;
4027       abort();
4028     }
4029     case s_n_llhttp__internal__n_start_req_34:
4030     s_n_llhttp__internal__n_start_req_34: {
4031       if (p == endp) {
4032         return s_n_llhttp__internal__n_start_req_34;
4033       }
4034       switch (*p) {
4035         case 'E': {
4036           p++;
4037           goto s_n_llhttp__internal__n_start_req_35;
4038         }
4039         default: {
4040           goto s_n_llhttp__internal__n_error_46;
4041         }
4042       }
4043       /* UNREACHABLE */;
4044       abort();
4045     }
4046     case s_n_llhttp__internal__n_start_req_39:
4047     s_n_llhttp__internal__n_start_req_39: {
4048       llparse_match_t match_seq;
4049       
4050       if (p == endp) {
4051         return s_n_llhttp__internal__n_start_req_39;
4052       }
4053       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob41, 4);
4054       p = match_seq.current;
4055       switch (match_seq.status) {
4056         case kMatchComplete: {
4057           p++;
4058           match = 14;
4059           goto s_n_llhttp__internal__n_invoke_store_method_1;
4060         }
4061         case kMatchPause: {
4062           return s_n_llhttp__internal__n_start_req_39;
4063         }
4064         case kMatchMismatch: {
4065           goto s_n_llhttp__internal__n_error_46;
4066         }
4067       }
4068       /* UNREACHABLE */;
4069       abort();
4070     }
4071     case s_n_llhttp__internal__n_start_req_40:
4072     s_n_llhttp__internal__n_start_req_40: {
4073       llparse_match_t match_seq;
4074       
4075       if (p == endp) {
4076         return s_n_llhttp__internal__n_start_req_40;
4077       }
4078       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob42, 4);
4079       p = match_seq.current;
4080       switch (match_seq.status) {
4081         case kMatchComplete: {
4082           p++;
4083           match = 33;
4084           goto s_n_llhttp__internal__n_invoke_store_method_1;
4085         }
4086         case kMatchPause: {
4087           return s_n_llhttp__internal__n_start_req_40;
4088         }
4089         case kMatchMismatch: {
4090           goto s_n_llhttp__internal__n_error_46;
4091         }
4092       }
4093       /* UNREACHABLE */;
4094       abort();
4095     }
4096     case s_n_llhttp__internal__n_start_req_41:
4097     s_n_llhttp__internal__n_start_req_41: {
4098       llparse_match_t match_seq;
4099       
4100       if (p == endp) {
4101         return s_n_llhttp__internal__n_start_req_41;
4102       }
4103       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob43, 7);
4104       p = match_seq.current;
4105       switch (match_seq.status) {
4106         case kMatchComplete: {
4107           p++;
4108           match = 26;
4109           goto s_n_llhttp__internal__n_invoke_store_method_1;
4110         }
4111         case kMatchPause: {
4112           return s_n_llhttp__internal__n_start_req_41;
4113         }
4114         case kMatchMismatch: {
4115           goto s_n_llhttp__internal__n_error_46;
4116         }
4117       }
4118       /* UNREACHABLE */;
4119       abort();
4120     }
4121     case s_n_llhttp__internal__n_start_req_38:
4122     s_n_llhttp__internal__n_start_req_38: {
4123       if (p == endp) {
4124         return s_n_llhttp__internal__n_start_req_38;
4125       }
4126       switch (*p) {
4127         case 'E': {
4128           p++;
4129           goto s_n_llhttp__internal__n_start_req_39;
4130         }
4131         case 'O': {
4132           p++;
4133           goto s_n_llhttp__internal__n_start_req_40;
4134         }
4135         case 'U': {
4136           p++;
4137           goto s_n_llhttp__internal__n_start_req_41;
4138         }
4139         default: {
4140           goto s_n_llhttp__internal__n_error_46;
4141         }
4142       }
4143       /* UNREACHABLE */;
4144       abort();
4145     }
4146     case s_n_llhttp__internal__n_start_req_42:
4147     s_n_llhttp__internal__n_start_req_42: {
4148       llparse_match_t match_seq;
4149       
4150       if (p == endp) {
4151         return s_n_llhttp__internal__n_start_req_42;
4152       }
4153       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob44, 4);
4154       p = match_seq.current;
4155       switch (match_seq.status) {
4156         case kMatchComplete: {
4157           p++;
4158           match = 7;
4159           goto s_n_llhttp__internal__n_invoke_store_method_1;
4160         }
4161         case kMatchPause: {
4162           return s_n_llhttp__internal__n_start_req_42;
4163         }
4164         case kMatchMismatch: {
4165           goto s_n_llhttp__internal__n_error_46;
4166         }
4167       }
4168       /* UNREACHABLE */;
4169       abort();
4170     }
4171     case s_n_llhttp__internal__n_start_req_45:
4172     s_n_llhttp__internal__n_start_req_45: {
4173       llparse_match_t match_seq;
4174       
4175       if (p == endp) {
4176         return s_n_llhttp__internal__n_start_req_45;
4177       }
4178       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob45, 3);
4179       p = match_seq.current;
4180       switch (match_seq.status) {
4181         case kMatchComplete: {
4182           p++;
4183           match = 18;
4184           goto s_n_llhttp__internal__n_invoke_store_method_1;
4185         }
4186         case kMatchPause: {
4187           return s_n_llhttp__internal__n_start_req_45;
4188         }
4189         case kMatchMismatch: {
4190           goto s_n_llhttp__internal__n_error_46;
4191         }
4192       }
4193       /* UNREACHABLE */;
4194       abort();
4195     }
4196     case s_n_llhttp__internal__n_start_req_47:
4197     s_n_llhttp__internal__n_start_req_47: {
4198       llparse_match_t match_seq;
4199       
4200       if (p == endp) {
4201         return s_n_llhttp__internal__n_start_req_47;
4202       }
4203       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob46, 2);
4204       p = match_seq.current;
4205       switch (match_seq.status) {
4206         case kMatchComplete: {
4207           p++;
4208           match = 32;
4209           goto s_n_llhttp__internal__n_invoke_store_method_1;
4210         }
4211         case kMatchPause: {
4212           return s_n_llhttp__internal__n_start_req_47;
4213         }
4214         case kMatchMismatch: {
4215           goto s_n_llhttp__internal__n_error_46;
4216         }
4217       }
4218       /* UNREACHABLE */;
4219       abort();
4220     }
4221     case s_n_llhttp__internal__n_start_req_48:
4222     s_n_llhttp__internal__n_start_req_48: {
4223       llparse_match_t match_seq;
4224       
4225       if (p == endp) {
4226         return s_n_llhttp__internal__n_start_req_48;
4227       }
4228       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob47, 2);
4229       p = match_seq.current;
4230       switch (match_seq.status) {
4231         case kMatchComplete: {
4232           p++;
4233           match = 15;
4234           goto s_n_llhttp__internal__n_invoke_store_method_1;
4235         }
4236         case kMatchPause: {
4237           return s_n_llhttp__internal__n_start_req_48;
4238         }
4239         case kMatchMismatch: {
4240           goto s_n_llhttp__internal__n_error_46;
4241         }
4242       }
4243       /* UNREACHABLE */;
4244       abort();
4245     }
4246     case s_n_llhttp__internal__n_start_req_46:
4247     s_n_llhttp__internal__n_start_req_46: {
4248       if (p == endp) {
4249         return s_n_llhttp__internal__n_start_req_46;
4250       }
4251       switch (*p) {
4252         case 'I': {
4253           p++;
4254           goto s_n_llhttp__internal__n_start_req_47;
4255         }
4256         case 'O': {
4257           p++;
4258           goto s_n_llhttp__internal__n_start_req_48;
4259         }
4260         default: {
4261           goto s_n_llhttp__internal__n_error_46;
4262         }
4263       }
4264       /* UNREACHABLE */;
4265       abort();
4266     }
4267     case s_n_llhttp__internal__n_start_req_49:
4268     s_n_llhttp__internal__n_start_req_49: {
4269       llparse_match_t match_seq;
4270       
4271       if (p == endp) {
4272         return s_n_llhttp__internal__n_start_req_49;
4273       }
4274       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob48, 8);
4275       p = match_seq.current;
4276       switch (match_seq.status) {
4277         case kMatchComplete: {
4278           p++;
4279           match = 27;
4280           goto s_n_llhttp__internal__n_invoke_store_method_1;
4281         }
4282         case kMatchPause: {
4283           return s_n_llhttp__internal__n_start_req_49;
4284         }
4285         case kMatchMismatch: {
4286           goto s_n_llhttp__internal__n_error_46;
4287         }
4288       }
4289       /* UNREACHABLE */;
4290       abort();
4291     }
4292     case s_n_llhttp__internal__n_start_req_44:
4293     s_n_llhttp__internal__n_start_req_44: {
4294       if (p == endp) {
4295         return s_n_llhttp__internal__n_start_req_44;
4296       }
4297       switch (*p) {
4298         case 'B': {
4299           p++;
4300           goto s_n_llhttp__internal__n_start_req_45;
4301         }
4302         case 'L': {
4303           p++;
4304           goto s_n_llhttp__internal__n_start_req_46;
4305         }
4306         case 'S': {
4307           p++;
4308           goto s_n_llhttp__internal__n_start_req_49;
4309         }
4310         default: {
4311           goto s_n_llhttp__internal__n_error_46;
4312         }
4313       }
4314       /* UNREACHABLE */;
4315       abort();
4316     }
4317     case s_n_llhttp__internal__n_start_req_43:
4318     s_n_llhttp__internal__n_start_req_43: {
4319       if (p == endp) {
4320         return s_n_llhttp__internal__n_start_req_43;
4321       }
4322       switch (*p) {
4323         case 'N': {
4324           p++;
4325           goto s_n_llhttp__internal__n_start_req_44;
4326         }
4327         default: {
4328           goto s_n_llhttp__internal__n_error_46;
4329         }
4330       }
4331       /* UNREACHABLE */;
4332       abort();
4333     }
4334     case s_n_llhttp__internal__n_start_req:
4335     s_n_llhttp__internal__n_start_req: {
4336       if (p == endp) {
4337         return s_n_llhttp__internal__n_start_req;
4338       }
4339       switch (*p) {
4340         case 'A': {
4341           p++;
4342           goto s_n_llhttp__internal__n_start_req_1;
4343         }
4344         case 'B': {
4345           p++;
4346           goto s_n_llhttp__internal__n_start_req_2;
4347         }
4348         case 'C': {
4349           p++;
4350           goto s_n_llhttp__internal__n_start_req_3;
4351         }
4352         case 'D': {
4353           p++;
4354           goto s_n_llhttp__internal__n_start_req_8;
4355         }
4356         case 'G': {
4357           p++;
4358           goto s_n_llhttp__internal__n_start_req_9;
4359         }
4360         case 'H': {
4361           p++;
4362           goto s_n_llhttp__internal__n_start_req_10;
4363         }
4364         case 'L': {
4365           p++;
4366           goto s_n_llhttp__internal__n_start_req_11;
4367         }
4368         case 'M': {
4369           p++;
4370           goto s_n_llhttp__internal__n_start_req_14;
4371         }
4372         case 'N': {
4373           p++;
4374           goto s_n_llhttp__internal__n_start_req_23;
4375         }
4376         case 'O': {
4377           p++;
4378           goto s_n_llhttp__internal__n_start_req_24;
4379         }
4380         case 'P': {
4381           p++;
4382           goto s_n_llhttp__internal__n_start_req_25;
4383         }
4384         case 'R': {
4385           p++;
4386           goto s_n_llhttp__internal__n_start_req_34;
4387         }
4388         case 'S': {
4389           p++;
4390           goto s_n_llhttp__internal__n_start_req_38;
4391         }
4392         case 'T': {
4393           p++;
4394           goto s_n_llhttp__internal__n_start_req_42;
4395         }
4396         case 'U': {
4397           p++;
4398           goto s_n_llhttp__internal__n_start_req_43;
4399         }
4400         default: {
4401           goto s_n_llhttp__internal__n_error_46;
4402         }
4403       }
4404       /* UNREACHABLE */;
4405       abort();
4406     }
4407     case s_n_llhttp__internal__n_res_line_almost_done:
4408     s_n_llhttp__internal__n_res_line_almost_done: {
4409       if (p == endp) {
4410         return s_n_llhttp__internal__n_res_line_almost_done;
4411       }
4412       p++;
4413       goto s_n_llhttp__internal__n_header_field_start;
4414       /* UNREACHABLE */;
4415       abort();
4416     }
4417     case s_n_llhttp__internal__n_res_status:
4418     s_n_llhttp__internal__n_res_status: {
4419       if (p == endp) {
4420         return s_n_llhttp__internal__n_res_status;
4421       }
4422       switch (*p) {
4423         case 10: {
4424           goto s_n_llhttp__internal__n_span_end_llhttp__on_status;
4425         }
4426         case 13: {
4427           goto s_n_llhttp__internal__n_span_end_llhttp__on_status_1;
4428         }
4429         default: {
4430           p++;
4431           goto s_n_llhttp__internal__n_res_status;
4432         }
4433       }
4434       /* UNREACHABLE */;
4435       abort();
4436     }
4437     case s_n_llhttp__internal__n_span_start_llhttp__on_status:
4438     s_n_llhttp__internal__n_span_start_llhttp__on_status: {
4439       if (p == endp) {
4440         return s_n_llhttp__internal__n_span_start_llhttp__on_status;
4441       }
4442       state->_span_pos0 = (void*) p;
4443       state->_span_cb0 = llhttp__on_status;
4444       goto s_n_llhttp__internal__n_res_status;
4445       /* UNREACHABLE */;
4446       abort();
4447     }
4448     case s_n_llhttp__internal__n_res_status_start:
4449     s_n_llhttp__internal__n_res_status_start: {
4450       if (p == endp) {
4451         return s_n_llhttp__internal__n_res_status_start;
4452       }
4453       switch (*p) {
4454         case 10: {
4455           p++;
4456           goto s_n_llhttp__internal__n_header_field_start;
4457         }
4458         case 13: {
4459           p++;
4460           goto s_n_llhttp__internal__n_res_line_almost_done;
4461         }
4462         default: {
4463           goto s_n_llhttp__internal__n_span_start_llhttp__on_status;
4464         }
4465       }
4466       /* UNREACHABLE */;
4467       abort();
4468     }
4469     case s_n_llhttp__internal__n_res_status_code_otherwise:
4470     s_n_llhttp__internal__n_res_status_code_otherwise: {
4471       if (p == endp) {
4472         return s_n_llhttp__internal__n_res_status_code_otherwise;
4473       }
4474       switch (*p) {
4475         case 10: {
4476           goto s_n_llhttp__internal__n_res_status_start;
4477         }
4478         case 13: {
4479           goto s_n_llhttp__internal__n_res_status_start;
4480         }
4481         case ' ': {
4482           p++;
4483           goto s_n_llhttp__internal__n_res_status_start;
4484         }
4485         default: {
4486           goto s_n_llhttp__internal__n_error_40;
4487         }
4488       }
4489       /* UNREACHABLE */;
4490       abort();
4491     }
4492     case s_n_llhttp__internal__n_res_status_code:
4493     s_n_llhttp__internal__n_res_status_code: {
4494       if (p == endp) {
4495         return s_n_llhttp__internal__n_res_status_code;
4496       }
4497       switch (*p) {
4498         case '0': {
4499           p++;
4500           match = 0;
4501           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4502         }
4503         case '1': {
4504           p++;
4505           match = 1;
4506           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4507         }
4508         case '2': {
4509           p++;
4510           match = 2;
4511           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4512         }
4513         case '3': {
4514           p++;
4515           match = 3;
4516           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4517         }
4518         case '4': {
4519           p++;
4520           match = 4;
4521           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4522         }
4523         case '5': {
4524           p++;
4525           match = 5;
4526           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4527         }
4528         case '6': {
4529           p++;
4530           match = 6;
4531           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4532         }
4533         case '7': {
4534           p++;
4535           match = 7;
4536           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4537         }
4538         case '8': {
4539           p++;
4540           match = 8;
4541           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4542         }
4543         case '9': {
4544           p++;
4545           match = 9;
4546           goto s_n_llhttp__internal__n_invoke_mul_add_status_code;
4547         }
4548         default: {
4549           goto s_n_llhttp__internal__n_res_status_code_otherwise;
4550         }
4551       }
4552       /* UNREACHABLE */;
4553       abort();
4554     }
4555     case s_n_llhttp__internal__n_res_http_end:
4556     s_n_llhttp__internal__n_res_http_end: {
4557       if (p == endp) {
4558         return s_n_llhttp__internal__n_res_http_end;
4559       }
4560       switch (*p) {
4561         case ' ': {
4562           p++;
4563           goto s_n_llhttp__internal__n_invoke_update_status_code;
4564         }
4565         default: {
4566           goto s_n_llhttp__internal__n_error_41;
4567         }
4568       }
4569       /* UNREACHABLE */;
4570       abort();
4571     }
4572     case s_n_llhttp__internal__n_res_http_minor:
4573     s_n_llhttp__internal__n_res_http_minor: {
4574       if (p == endp) {
4575         return s_n_llhttp__internal__n_res_http_minor;
4576       }
4577       switch (*p) {
4578         case '0': {
4579           p++;
4580           match = 0;
4581           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4582         }
4583         case '1': {
4584           p++;
4585           match = 1;
4586           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4587         }
4588         case '2': {
4589           p++;
4590           match = 2;
4591           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4592         }
4593         case '3': {
4594           p++;
4595           match = 3;
4596           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4597         }
4598         case '4': {
4599           p++;
4600           match = 4;
4601           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4602         }
4603         case '5': {
4604           p++;
4605           match = 5;
4606           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4607         }
4608         case '6': {
4609           p++;
4610           match = 6;
4611           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4612         }
4613         case '7': {
4614           p++;
4615           match = 7;
4616           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4617         }
4618         case '8': {
4619           p++;
4620           match = 8;
4621           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4622         }
4623         case '9': {
4624           p++;
4625           match = 9;
4626           goto s_n_llhttp__internal__n_invoke_store_http_minor_1;
4627         }
4628         default: {
4629           goto s_n_llhttp__internal__n_error_42;
4630         }
4631       }
4632       /* UNREACHABLE */;
4633       abort();
4634     }
4635     case s_n_llhttp__internal__n_res_http_dot:
4636     s_n_llhttp__internal__n_res_http_dot: {
4637       if (p == endp) {
4638         return s_n_llhttp__internal__n_res_http_dot;
4639       }
4640       switch (*p) {
4641         case '.': {
4642           p++;
4643           goto s_n_llhttp__internal__n_res_http_minor;
4644         }
4645         default: {
4646           goto s_n_llhttp__internal__n_error_43;
4647         }
4648       }
4649       /* UNREACHABLE */;
4650       abort();
4651     }
4652     case s_n_llhttp__internal__n_res_http_major:
4653     s_n_llhttp__internal__n_res_http_major: {
4654       if (p == endp) {
4655         return s_n_llhttp__internal__n_res_http_major;
4656       }
4657       switch (*p) {
4658         case '0': {
4659           p++;
4660           match = 0;
4661           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4662         }
4663         case '1': {
4664           p++;
4665           match = 1;
4666           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4667         }
4668         case '2': {
4669           p++;
4670           match = 2;
4671           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4672         }
4673         case '3': {
4674           p++;
4675           match = 3;
4676           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4677         }
4678         case '4': {
4679           p++;
4680           match = 4;
4681           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4682         }
4683         case '5': {
4684           p++;
4685           match = 5;
4686           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4687         }
4688         case '6': {
4689           p++;
4690           match = 6;
4691           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4692         }
4693         case '7': {
4694           p++;
4695           match = 7;
4696           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4697         }
4698         case '8': {
4699           p++;
4700           match = 8;
4701           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4702         }
4703         case '9': {
4704           p++;
4705           match = 9;
4706           goto s_n_llhttp__internal__n_invoke_store_http_major_1;
4707         }
4708         default: {
4709           goto s_n_llhttp__internal__n_error_44;
4710         }
4711       }
4712       /* UNREACHABLE */;
4713       abort();
4714     }
4715     case s_n_llhttp__internal__n_start_res:
4716     s_n_llhttp__internal__n_start_res: {
4717       llparse_match_t match_seq;
4718       
4719       if (p == endp) {
4720         return s_n_llhttp__internal__n_start_res;
4721       }
4722       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob49, 5);
4723       p = match_seq.current;
4724       switch (match_seq.status) {
4725         case kMatchComplete: {
4726           p++;
4727           goto s_n_llhttp__internal__n_res_http_major;
4728         }
4729         case kMatchPause: {
4730           return s_n_llhttp__internal__n_start_res;
4731         }
4732         case kMatchMismatch: {
4733           goto s_n_llhttp__internal__n_error_47;
4734         }
4735       }
4736       /* UNREACHABLE */;
4737       abort();
4738     }
4739     case s_n_llhttp__internal__n_req_or_res_method_2:
4740     s_n_llhttp__internal__n_req_or_res_method_2: {
4741       llparse_match_t match_seq;
4742       
4743       if (p == endp) {
4744         return s_n_llhttp__internal__n_req_or_res_method_2;
4745       }
4746       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob50, 2);
4747       p = match_seq.current;
4748       switch (match_seq.status) {
4749         case kMatchComplete: {
4750           p++;
4751           match = 2;
4752           goto s_n_llhttp__internal__n_invoke_store_method;
4753         }
4754         case kMatchPause: {
4755           return s_n_llhttp__internal__n_req_or_res_method_2;
4756         }
4757         case kMatchMismatch: {
4758           goto s_n_llhttp__internal__n_error_45;
4759         }
4760       }
4761       /* UNREACHABLE */;
4762       abort();
4763     }
4764     case s_n_llhttp__internal__n_req_or_res_method_3:
4765     s_n_llhttp__internal__n_req_or_res_method_3: {
4766       llparse_match_t match_seq;
4767       
4768       if (p == endp) {
4769         return s_n_llhttp__internal__n_req_or_res_method_3;
4770       }
4771       match_seq = llparse__match_sequence_id(state, p, endp, llparse_blob51, 3);
4772       p = match_seq.current;
4773       switch (match_seq.status) {
4774         case kMatchComplete: {
4775           p++;
4776           goto s_n_llhttp__internal__n_invoke_update_type_1;
4777         }
4778         case kMatchPause: {
4779           return s_n_llhttp__internal__n_req_or_res_method_3;
4780         }
4781         case kMatchMismatch: {
4782           goto s_n_llhttp__internal__n_error_45;
4783         }
4784       }
4785       /* UNREACHABLE */;
4786       abort();
4787     }
4788     case s_n_llhttp__internal__n_req_or_res_method_1:
4789     s_n_llhttp__internal__n_req_or_res_method_1: {
4790       if (p == endp) {
4791         return s_n_llhttp__internal__n_req_or_res_method_1;
4792       }
4793       switch (*p) {
4794         case 'E': {
4795           p++;
4796           goto s_n_llhttp__internal__n_req_or_res_method_2;
4797         }
4798         case 'T': {
4799           p++;
4800           goto s_n_llhttp__internal__n_req_or_res_method_3;
4801         }
4802         default: {
4803           goto s_n_llhttp__internal__n_error_45;
4804         }
4805       }
4806       /* UNREACHABLE */;
4807       abort();
4808     }
4809     case s_n_llhttp__internal__n_req_or_res_method:
4810     s_n_llhttp__internal__n_req_or_res_method: {
4811       if (p == endp) {
4812         return s_n_llhttp__internal__n_req_or_res_method;
4813       }
4814       switch (*p) {
4815         case 'H': {
4816           p++;
4817           goto s_n_llhttp__internal__n_req_or_res_method_1;
4818         }
4819         default: {
4820           goto s_n_llhttp__internal__n_error_45;
4821         }
4822       }
4823       /* UNREACHABLE */;
4824       abort();
4825     }
4826     case s_n_llhttp__internal__n_start_req_or_res:
4827     s_n_llhttp__internal__n_start_req_or_res: {
4828       if (p == endp) {
4829         return s_n_llhttp__internal__n_start_req_or_res;
4830       }
4831       switch (*p) {
4832         case 'H': {
4833           goto s_n_llhttp__internal__n_req_or_res_method;
4834         }
4835         default: {
4836           goto s_n_llhttp__internal__n_invoke_update_type_2;
4837         }
4838       }
4839       /* UNREACHABLE */;
4840       abort();
4841     }
4842     case s_n_llhttp__internal__n_invoke_load_type:
4843     s_n_llhttp__internal__n_invoke_load_type: {
4844       switch (llhttp__internal__c_load_type(state, p, endp)) {
4845         case 1:
4846           goto s_n_llhttp__internal__n_start_req;
4847         case 2:
4848           goto s_n_llhttp__internal__n_start_res;
4849         default:
4850           goto s_n_llhttp__internal__n_start_req_or_res;
4851       }
4852       /* UNREACHABLE */;
4853       abort();
4854     }
4855     case s_n_llhttp__internal__n_start:
4856     s_n_llhttp__internal__n_start: {
4857       if (p == endp) {
4858         return s_n_llhttp__internal__n_start;
4859       }
4860       switch (*p) {
4861         case 10: {
4862           p++;
4863           goto s_n_llhttp__internal__n_start;
4864         }
4865         case 13: {
4866           p++;
4867           goto s_n_llhttp__internal__n_start;
4868         }
4869         default: {
4870           goto s_n_llhttp__internal__n_invoke_update_finish;
4871         }
4872       }
4873       /* UNREACHABLE */;
4874       abort();
4875     }
4876     default:
4877       /* UNREACHABLE */
4878       abort();
4879   }
4880   s_n_llhttp__internal__n_error_34: {
4881     state->error = 0x7;
4882     state->reason = "Invalid characters in url";
4883     state->error_pos = (const char*) p;
4884     state->_current = (void*) (intptr_t) s_error;
4885     return s_error;
4886     /* UNREACHABLE */;
4887     abort();
4888   }
4889   s_n_llhttp__internal__n_invoke_update_finish_1: {
4890     switch (llhttp__internal__c_update_finish_1(state, p, endp)) {
4891       default:
4892         goto s_n_llhttp__internal__n_start;
4893     }
4894     /* UNREACHABLE */;
4895     abort();
4896   }
4897   s_n_llhttp__internal__n_pause_5: {
4898     state->error = 0x15;
4899     state->reason = "on_message_complete pause";
4900     state->error_pos = (const char*) p;
4901     state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_is_equal_upgrade;
4902     return s_error;
4903     /* UNREACHABLE */;
4904     abort();
4905   }
4906   s_n_llhttp__internal__n_error_9: {
4907     state->error = 0x12;
4908     state->reason = "`on_message_complete` callback error";
4909     state->error_pos = (const char*) p;
4910     state->_current = (void*) (intptr_t) s_error;
4911     return s_error;
4912     /* UNREACHABLE */;
4913     abort();
4914   }
4915   s_n_llhttp__internal__n_pause_7: {
4916     state->error = 0x15;
4917     state->reason = "on_chunk_complete pause";
4918     state->error_pos = (const char*) p;
4919     state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
4920     return s_error;
4921     /* UNREACHABLE */;
4922     abort();
4923   }
4924   s_n_llhttp__internal__n_error_13: {
4925     state->error = 0x14;
4926     state->reason = "`on_chunk_complete` callback error";
4927     state->error_pos = (const char*) p;
4928     state->_current = (void*) (intptr_t) s_error;
4929     return s_error;
4930     /* UNREACHABLE */;
4931     abort();
4932   }
4933   s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1: {
4934     switch (llhttp__on_chunk_complete(state, p, endp)) {
4935       case 0:
4936         goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
4937       case 21:
4938         goto s_n_llhttp__internal__n_pause_7;
4939       default:
4940         goto s_n_llhttp__internal__n_error_13;
4941     }
4942     /* UNREACHABLE */;
4943     abort();
4944   }
4945   s_n_llhttp__internal__n_error_11: {
4946     state->error = 0x4;
4947     state->reason = "Content-Length can't be present with Transfer-Encoding";
4948     state->error_pos = (const char*) p;
4949     state->_current = (void*) (intptr_t) s_error;
4950     return s_error;
4951     /* UNREACHABLE */;
4952     abort();
4953   }
4954   s_n_llhttp__internal__n_error_12: {
4955     state->error = 0x4;
4956     state->reason = "Content-Length can't be present with chunked encoding";
4957     state->error_pos = (const char*) p;
4958     state->_current = (void*) (intptr_t) s_error;
4959     return s_error;
4960     /* UNREACHABLE */;
4961     abort();
4962   }
4963   s_n_llhttp__internal__n_pause_2: {
4964     state->error = 0x15;
4965     state->reason = "on_message_complete pause";
4966     state->error_pos = (const char*) p;
4967     state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_pause_1;
4968     return s_error;
4969     /* UNREACHABLE */;
4970     abort();
4971   }
4972   s_n_llhttp__internal__n_error_3: {
4973     state->error = 0x12;
4974     state->reason = "`on_message_complete` callback error";
4975     state->error_pos = (const char*) p;
4976     state->_current = (void*) (intptr_t) s_error;
4977     return s_error;
4978     /* UNREACHABLE */;
4979     abort();
4980   }
4981   s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_1: {
4982     switch (llhttp__on_message_complete(state, p, endp)) {
4983       case 0:
4984         goto s_n_llhttp__internal__n_pause_1;
4985       case 21:
4986         goto s_n_llhttp__internal__n_pause_2;
4987       default:
4988         goto s_n_llhttp__internal__n_error_3;
4989     }
4990     /* UNREACHABLE */;
4991     abort();
4992   }
4993   s_n_llhttp__internal__n_error_7: {
4994     state->error = 0xc;
4995     state->reason = "Chunk size overflow";
4996     state->error_pos = (const char*) p;
4997     state->_current = (void*) (intptr_t) s_error;
4998     return s_error;
4999     /* UNREACHABLE */;
5000     abort();
5001   }
5002   s_n_llhttp__internal__n_pause_3: {
5003     state->error = 0x15;
5004     state->reason = "on_chunk_complete pause";
5005     state->error_pos = (const char*) p;
5006     state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_update_content_length;
5007     return s_error;
5008     /* UNREACHABLE */;
5009     abort();
5010   }
5011   s_n_llhttp__internal__n_error_5: {
5012     state->error = 0x14;
5013     state->reason = "`on_chunk_complete` callback error";
5014     state->error_pos = (const char*) p;
5015     state->_current = (void*) (intptr_t) s_error;
5016     return s_error;
5017     /* UNREACHABLE */;
5018     abort();
5019   }
5020   s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete: {
5021     switch (llhttp__on_chunk_complete(state, p, endp)) {
5022       case 0:
5023         goto s_n_llhttp__internal__n_invoke_update_content_length;
5024       case 21:
5025         goto s_n_llhttp__internal__n_pause_3;
5026       default:
5027         goto s_n_llhttp__internal__n_error_5;
5028     }
5029     /* UNREACHABLE */;
5030     abort();
5031   }
5032   s_n_llhttp__internal__n_span_end_llhttp__on_body: {
5033     const unsigned char* start;
5034     int err;
5035     
5036     start = state->_span_pos0;
5037     state->_span_pos0 = NULL;
5038     err = llhttp__on_body(state, start, p);
5039     if (err != 0) {
5040       state->error = err;
5041       state->error_pos = (const char*) p;
5042       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_chunk_data_almost_done;
5043       return s_error;
5044     }
5045     goto s_n_llhttp__internal__n_chunk_data_almost_done;
5046     /* UNREACHABLE */;
5047     abort();
5048   }
5049   s_n_llhttp__internal__n_invoke_or_flags: {
5050     switch (llhttp__internal__c_or_flags(state, p, endp)) {
5051       default:
5052         goto s_n_llhttp__internal__n_header_field_start;
5053     }
5054     /* UNREACHABLE */;
5055     abort();
5056   }
5057   s_n_llhttp__internal__n_pause_4: {
5058     state->error = 0x15;
5059     state->reason = "on_chunk_header pause";
5060     state->error_pos = (const char*) p;
5061     state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_is_equal_content_length;
5062     return s_error;
5063     /* UNREACHABLE */;
5064     abort();
5065   }
5066   s_n_llhttp__internal__n_error_4: {
5067     state->error = 0x13;
5068     state->reason = "`on_chunk_header` callback error";
5069     state->error_pos = (const char*) p;
5070     state->_current = (void*) (intptr_t) s_error;
5071     return s_error;
5072     /* UNREACHABLE */;
5073     abort();
5074   }
5075   s_n_llhttp__internal__n_invoke_llhttp__on_chunk_header: {
5076     switch (llhttp__on_chunk_header(state, p, endp)) {
5077       case 0:
5078         goto s_n_llhttp__internal__n_invoke_is_equal_content_length;
5079       case 21:
5080         goto s_n_llhttp__internal__n_pause_4;
5081       default:
5082         goto s_n_llhttp__internal__n_error_4;
5083     }
5084     /* UNREACHABLE */;
5085     abort();
5086   }
5087   s_n_llhttp__internal__n_error_6: {
5088     state->error = 0xc;
5089     state->reason = "Invalid character in chunk size";
5090     state->error_pos = (const char*) p;
5091     state->_current = (void*) (intptr_t) s_error;
5092     return s_error;
5093     /* UNREACHABLE */;
5094     abort();
5095   }
5096   s_n_llhttp__internal__n_invoke_mul_add_content_length: {
5097     switch (llhttp__internal__c_mul_add_content_length(state, p, endp, match)) {
5098       case 1:
5099         goto s_n_llhttp__internal__n_error_7;
5100       default:
5101         goto s_n_llhttp__internal__n_chunk_size;
5102     }
5103     /* UNREACHABLE */;
5104     abort();
5105   }
5106   s_n_llhttp__internal__n_error_8: {
5107     state->error = 0xc;
5108     state->reason = "Invalid character in chunk size";
5109     state->error_pos = (const char*) p;
5110     state->_current = (void*) (intptr_t) s_error;
5111     return s_error;
5112     /* UNREACHABLE */;
5113     abort();
5114   }
5115   s_n_llhttp__internal__n_span_end_llhttp__on_body_1: {
5116     const unsigned char* start;
5117     int err;
5118     
5119     start = state->_span_pos0;
5120     state->_span_pos0 = NULL;
5121     err = llhttp__on_body(state, start, p);
5122     if (err != 0) {
5123       state->error = err;
5124       state->error_pos = (const char*) p;
5125       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
5126       return s_error;
5127     }
5128     goto s_n_llhttp__internal__n_invoke_llhttp__on_message_complete_2;
5129     /* UNREACHABLE */;
5130     abort();
5131   }
5132   s_n_llhttp__internal__n_invoke_update_finish_2: {
5133     switch (llhttp__internal__c_update_finish_2(state, p, endp)) {
5134       default:
5135         goto s_n_llhttp__internal__n_span_start_llhttp__on_body_2;
5136     }
5137     /* UNREACHABLE */;
5138     abort();
5139   }
5140   s_n_llhttp__internal__n_error_10: {
5141     state->error = 0xf;
5142     state->reason = "Request has invalid `Transfer-Encoding`";
5143     state->error_pos = (const char*) p;
5144     state->_current = (void*) (intptr_t) s_error;
5145     return s_error;
5146     /* UNREACHABLE */;
5147     abort();
5148   }
5149   s_n_llhttp__internal__n_pause: {
5150     state->error = 0x15;
5151     state->reason = "on_message_complete pause";
5152     state->error_pos = (const char*) p;
5153     state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_message_complete;
5154     return s_error;
5155     /* UNREACHABLE */;
5156     abort();
5157   }
5158   s_n_llhttp__internal__n_error_2: {
5159     state->error = 0x12;
5160     state->reason = "`on_message_complete` callback error";
5161     state->error_pos = (const char*) p;
5162     state->_current = (void*) (intptr_t) s_error;
5163     return s_error;
5164     /* UNREACHABLE */;
5165     abort();
5166   }
5167   s_n_llhttp__internal__n_invoke_llhttp__on_message_complete: {
5168     switch (llhttp__on_message_complete(state, p, endp)) {
5169       case 0:
5170         goto s_n_llhttp__internal__n_invoke_llhttp__after_message_complete;
5171       case 21:
5172         goto s_n_llhttp__internal__n_pause;
5173       default:
5174         goto s_n_llhttp__internal__n_error_2;
5175     }
5176     /* UNREACHABLE */;
5177     abort();
5178   }
5179   s_n_llhttp__internal__n_invoke_or_flags_1: {
5180     switch (llhttp__internal__c_or_flags_1(state, p, endp)) {
5181       default:
5182         goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
5183     }
5184     /* UNREACHABLE */;
5185     abort();
5186   }
5187   s_n_llhttp__internal__n_invoke_or_flags_2: {
5188     switch (llhttp__internal__c_or_flags_1(state, p, endp)) {
5189       default:
5190         goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
5191     }
5192     /* UNREACHABLE */;
5193     abort();
5194   }
5195   s_n_llhttp__internal__n_invoke_update_upgrade: {
5196     switch (llhttp__internal__c_update_upgrade(state, p, endp)) {
5197       default:
5198         goto s_n_llhttp__internal__n_invoke_or_flags_2;
5199     }
5200     /* UNREACHABLE */;
5201     abort();
5202   }
5203   s_n_llhttp__internal__n_pause_6: {
5204     state->error = 0x15;
5205     state->reason = "Paused by on_headers_complete";
5206     state->error_pos = (const char*) p;
5207     state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
5208     return s_error;
5209     /* UNREACHABLE */;
5210     abort();
5211   }
5212   s_n_llhttp__internal__n_error_1: {
5213     state->error = 0x11;
5214     state->reason = "User callback error";
5215     state->error_pos = (const char*) p;
5216     state->_current = (void*) (intptr_t) s_error;
5217     return s_error;
5218     /* UNREACHABLE */;
5219     abort();
5220   }
5221   s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete: {
5222     switch (llhttp__on_headers_complete(state, p, endp)) {
5223       case 0:
5224         goto s_n_llhttp__internal__n_invoke_llhttp__after_headers_complete;
5225       case 1:
5226         goto s_n_llhttp__internal__n_invoke_or_flags_1;
5227       case 2:
5228         goto s_n_llhttp__internal__n_invoke_update_upgrade;
5229       case 21:
5230         goto s_n_llhttp__internal__n_pause_6;
5231       default:
5232         goto s_n_llhttp__internal__n_error_1;
5233     }
5234     /* UNREACHABLE */;
5235     abort();
5236   }
5237   s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete: {
5238     switch (llhttp__before_headers_complete(state, p, endp)) {
5239       default:
5240         goto s_n_llhttp__internal__n_invoke_llhttp__on_headers_complete;
5241     }
5242     /* UNREACHABLE */;
5243     abort();
5244   }
5245   s_n_llhttp__internal__n_invoke_test_flags_3: {
5246     switch (llhttp__internal__c_test_flags_3(state, p, endp)) {
5247       case 1:
5248         goto s_n_llhttp__internal__n_error_12;
5249       default:
5250         goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete;
5251     }
5252     /* UNREACHABLE */;
5253     abort();
5254   }
5255   s_n_llhttp__internal__n_invoke_test_flags_2: {
5256     switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
5257       case 0:
5258         goto s_n_llhttp__internal__n_error_11;
5259       case 1:
5260         goto s_n_llhttp__internal__n_invoke_test_flags_3;
5261       default:
5262         goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete;
5263     }
5264     /* UNREACHABLE */;
5265     abort();
5266   }
5267   s_n_llhttp__internal__n_invoke_test_flags_1: {
5268     switch (llhttp__internal__c_test_flags_1(state, p, endp)) {
5269       case 1:
5270         goto s_n_llhttp__internal__n_invoke_test_flags_2;
5271       default:
5272         goto s_n_llhttp__internal__n_invoke_llhttp__before_headers_complete;
5273     }
5274     /* UNREACHABLE */;
5275     abort();
5276   }
5277   s_n_llhttp__internal__n_invoke_test_flags: {
5278     switch (llhttp__internal__c_test_flags(state, p, endp)) {
5279       case 1:
5280         goto s_n_llhttp__internal__n_invoke_llhttp__on_chunk_complete_1;
5281       default:
5282         goto s_n_llhttp__internal__n_invoke_test_flags_1;
5283     }
5284     /* UNREACHABLE */;
5285     abort();
5286   }
5287   s_n_llhttp__internal__n_error_14: {
5288     state->error = 0xb;
5289     state->reason = "Empty Content-Length";
5290     state->error_pos = (const char*) p;
5291     state->_current = (void*) (intptr_t) s_error;
5292     return s_error;
5293     /* UNREACHABLE */;
5294     abort();
5295   }
5296   s_n_llhttp__internal__n_span_end_llhttp__on_header_value: {
5297     const unsigned char* start;
5298     int err;
5299     
5300     start = state->_span_pos0;
5301     state->_span_pos0 = NULL;
5302     err = llhttp__on_header_value(state, start, p);
5303     if (err != 0) {
5304       state->error = err;
5305       state->error_pos = (const char*) p;
5306       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_field_start;
5307       return s_error;
5308     }
5309     goto s_n_llhttp__internal__n_header_field_start;
5310     /* UNREACHABLE */;
5311     abort();
5312   }
5313   s_n_llhttp__internal__n_invoke_update_header_state: {
5314     switch (llhttp__internal__c_update_header_state(state, p, endp)) {
5315       default:
5316         goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value;
5317     }
5318     /* UNREACHABLE */;
5319     abort();
5320   }
5321   s_n_llhttp__internal__n_invoke_or_flags_3: {
5322     switch (llhttp__internal__c_or_flags_3(state, p, endp)) {
5323       default:
5324         goto s_n_llhttp__internal__n_invoke_update_header_state;
5325     }
5326     /* UNREACHABLE */;
5327     abort();
5328   }
5329   s_n_llhttp__internal__n_invoke_or_flags_4: {
5330     switch (llhttp__internal__c_or_flags_4(state, p, endp)) {
5331       default:
5332         goto s_n_llhttp__internal__n_invoke_update_header_state;
5333     }
5334     /* UNREACHABLE */;
5335     abort();
5336   }
5337   s_n_llhttp__internal__n_invoke_or_flags_5: {
5338     switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
5339       default:
5340         goto s_n_llhttp__internal__n_invoke_update_header_state;
5341     }
5342     /* UNREACHABLE */;
5343     abort();
5344   }
5345   s_n_llhttp__internal__n_invoke_or_flags_6: {
5346     switch (llhttp__internal__c_or_flags_6(state, p, endp)) {
5347       default:
5348         goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value;
5349     }
5350     /* UNREACHABLE */;
5351     abort();
5352   }
5353   s_n_llhttp__internal__n_invoke_load_header_state_1: {
5354     switch (llhttp__internal__c_load_header_state(state, p, endp)) {
5355       case 5:
5356         goto s_n_llhttp__internal__n_invoke_or_flags_3;
5357       case 6:
5358         goto s_n_llhttp__internal__n_invoke_or_flags_4;
5359       case 7:
5360         goto s_n_llhttp__internal__n_invoke_or_flags_5;
5361       case 8:
5362         goto s_n_llhttp__internal__n_invoke_or_flags_6;
5363       default:
5364         goto s_n_llhttp__internal__n_span_start_llhttp__on_header_value;
5365     }
5366     /* UNREACHABLE */;
5367     abort();
5368   }
5369   s_n_llhttp__internal__n_invoke_load_header_state: {
5370     switch (llhttp__internal__c_load_header_state(state, p, endp)) {
5371       case 2:
5372         goto s_n_llhttp__internal__n_error_14;
5373       default:
5374         goto s_n_llhttp__internal__n_invoke_load_header_state_1;
5375     }
5376     /* UNREACHABLE */;
5377     abort();
5378   }
5379   s_n_llhttp__internal__n_invoke_update_header_state_1: {
5380     switch (llhttp__internal__c_update_header_state(state, p, endp)) {
5381       default:
5382         goto s_n_llhttp__internal__n_header_field_start;
5383     }
5384     /* UNREACHABLE */;
5385     abort();
5386   }
5387   s_n_llhttp__internal__n_invoke_or_flags_7: {
5388     switch (llhttp__internal__c_or_flags_3(state, p, endp)) {
5389       default:
5390         goto s_n_llhttp__internal__n_invoke_update_header_state_1;
5391     }
5392     /* UNREACHABLE */;
5393     abort();
5394   }
5395   s_n_llhttp__internal__n_invoke_or_flags_8: {
5396     switch (llhttp__internal__c_or_flags_4(state, p, endp)) {
5397       default:
5398         goto s_n_llhttp__internal__n_invoke_update_header_state_1;
5399     }
5400     /* UNREACHABLE */;
5401     abort();
5402   }
5403   s_n_llhttp__internal__n_invoke_or_flags_9: {
5404     switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
5405       default:
5406         goto s_n_llhttp__internal__n_invoke_update_header_state_1;
5407     }
5408     /* UNREACHABLE */;
5409     abort();
5410   }
5411   s_n_llhttp__internal__n_invoke_or_flags_10: {
5412     switch (llhttp__internal__c_or_flags_6(state, p, endp)) {
5413       default:
5414         goto s_n_llhttp__internal__n_header_field_start;
5415     }
5416     /* UNREACHABLE */;
5417     abort();
5418   }
5419   s_n_llhttp__internal__n_invoke_load_header_state_3: {
5420     switch (llhttp__internal__c_load_header_state(state, p, endp)) {
5421       case 5:
5422         goto s_n_llhttp__internal__n_invoke_or_flags_7;
5423       case 6:
5424         goto s_n_llhttp__internal__n_invoke_or_flags_8;
5425       case 7:
5426         goto s_n_llhttp__internal__n_invoke_or_flags_9;
5427       case 8:
5428         goto s_n_llhttp__internal__n_invoke_or_flags_10;
5429       default:
5430         goto s_n_llhttp__internal__n_header_field_start;
5431     }
5432     /* UNREACHABLE */;
5433     abort();
5434   }
5435   s_n_llhttp__internal__n_error_15: {
5436     state->error = 0x3;
5437     state->reason = "Missing expected LF after header value";
5438     state->error_pos = (const char*) p;
5439     state->_current = (void*) (intptr_t) s_error;
5440     return s_error;
5441     /* UNREACHABLE */;
5442     abort();
5443   }
5444   s_n_llhttp__internal__n_span_end_llhttp__on_header_value_1: {
5445     const unsigned char* start;
5446     int err;
5447     
5448     start = state->_span_pos0;
5449     state->_span_pos0 = NULL;
5450     err = llhttp__on_header_value(state, start, p);
5451     if (err != 0) {
5452       state->error = err;
5453       state->error_pos = (const char*) p;
5454       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
5455       return s_error;
5456     }
5457     goto s_n_llhttp__internal__n_header_value_almost_done;
5458     /* UNREACHABLE */;
5459     abort();
5460   }
5461   s_n_llhttp__internal__n_span_end_llhttp__on_header_value_2: {
5462     const unsigned char* start;
5463     int err;
5464     
5465     start = state->_span_pos0;
5466     state->_span_pos0 = NULL;
5467     err = llhttp__on_header_value(state, start, p);
5468     if (err != 0) {
5469       state->error = err;
5470       state->error_pos = (const char*) (p + 1);
5471       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
5472       return s_error;
5473     }
5474     p++;
5475     goto s_n_llhttp__internal__n_header_value_almost_done;
5476     /* UNREACHABLE */;
5477     abort();
5478   }
5479   s_n_llhttp__internal__n_span_end_llhttp__on_header_value_3: {
5480     const unsigned char* start;
5481     int err;
5482     
5483     start = state->_span_pos0;
5484     state->_span_pos0 = NULL;
5485     err = llhttp__on_header_value(state, start, p);
5486     if (err != 0) {
5487       state->error = err;
5488       state->error_pos = (const char*) (p + 1);
5489       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_almost_done;
5490       return s_error;
5491     }
5492     p++;
5493     goto s_n_llhttp__internal__n_header_value_almost_done;
5494     /* UNREACHABLE */;
5495     abort();
5496   }
5497   s_n_llhttp__internal__n_error_16: {
5498     state->error = 0xa;
5499     state->reason = "Invalid header value char";
5500     state->error_pos = (const char*) p;
5501     state->_current = (void*) (intptr_t) s_error;
5502     return s_error;
5503     /* UNREACHABLE */;
5504     abort();
5505   }
5506   s_n_llhttp__internal__n_invoke_test_flags_4: {
5507     switch (llhttp__internal__c_test_flags_2(state, p, endp)) {
5508       case 1:
5509         goto s_n_llhttp__internal__n_header_value_lenient;
5510       default:
5511         goto s_n_llhttp__internal__n_error_16;
5512     }
5513     /* UNREACHABLE */;
5514     abort();
5515   }
5516   s_n_llhttp__internal__n_invoke_update_header_state_3: {
5517     switch (llhttp__internal__c_update_header_state(state, p, endp)) {
5518       default:
5519         goto s_n_llhttp__internal__n_header_value_connection;
5520     }
5521     /* UNREACHABLE */;
5522     abort();
5523   }
5524   s_n_llhttp__internal__n_invoke_or_flags_11: {
5525     switch (llhttp__internal__c_or_flags_3(state, p, endp)) {
5526       default:
5527         goto s_n_llhttp__internal__n_invoke_update_header_state_3;
5528     }
5529     /* UNREACHABLE */;
5530     abort();
5531   }
5532   s_n_llhttp__internal__n_invoke_or_flags_12: {
5533     switch (llhttp__internal__c_or_flags_4(state, p, endp)) {
5534       default:
5535         goto s_n_llhttp__internal__n_invoke_update_header_state_3;
5536     }
5537     /* UNREACHABLE */;
5538     abort();
5539   }
5540   s_n_llhttp__internal__n_invoke_or_flags_13: {
5541     switch (llhttp__internal__c_or_flags_5(state, p, endp)) {
5542       default:
5543         goto s_n_llhttp__internal__n_invoke_update_header_state_3;
5544     }
5545     /* UNREACHABLE */;
5546     abort();
5547   }
5548   s_n_llhttp__internal__n_invoke_or_flags_14: {
5549     switch (llhttp__internal__c_or_flags_6(state, p, endp)) {
5550       default:
5551         goto s_n_llhttp__internal__n_header_value_connection;
5552     }
5553     /* UNREACHABLE */;
5554     abort();
5555   }
5556   s_n_llhttp__internal__n_invoke_load_header_state_4: {
5557     switch (llhttp__internal__c_load_header_state(state, p, endp)) {
5558       case 5:
5559         goto s_n_llhttp__internal__n_invoke_or_flags_11;
5560       case 6:
5561         goto s_n_llhttp__internal__n_invoke_or_flags_12;
5562       case 7:
5563         goto s_n_llhttp__internal__n_invoke_or_flags_13;
5564       case 8:
5565         goto s_n_llhttp__internal__n_invoke_or_flags_14;
5566       default:
5567         goto s_n_llhttp__internal__n_header_value_connection;
5568     }
5569     /* UNREACHABLE */;
5570     abort();
5571   }
5572   s_n_llhttp__internal__n_invoke_update_header_state_4: {
5573     switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
5574       default:
5575         goto s_n_llhttp__internal__n_header_value_connection_token;
5576     }
5577     /* UNREACHABLE */;
5578     abort();
5579   }
5580   s_n_llhttp__internal__n_invoke_update_header_state_2: {
5581     switch (llhttp__internal__c_update_header_state_2(state, p, endp)) {
5582       default:
5583         goto s_n_llhttp__internal__n_header_value_connection_ws;
5584     }
5585     /* UNREACHABLE */;
5586     abort();
5587   }
5588   s_n_llhttp__internal__n_invoke_update_header_state_5: {
5589     switch (llhttp__internal__c_update_header_state_5(state, p, endp)) {
5590       default:
5591         goto s_n_llhttp__internal__n_header_value_connection_ws;
5592     }
5593     /* UNREACHABLE */;
5594     abort();
5595   }
5596   s_n_llhttp__internal__n_invoke_update_header_state_6: {
5597     switch (llhttp__internal__c_update_header_state_6(state, p, endp)) {
5598       default:
5599         goto s_n_llhttp__internal__n_header_value_connection_ws;
5600     }
5601     /* UNREACHABLE */;
5602     abort();
5603   }
5604   s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4: {
5605     const unsigned char* start;
5606     int err;
5607     
5608     start = state->_span_pos0;
5609     state->_span_pos0 = NULL;
5610     err = llhttp__on_header_value(state, start, p);
5611     if (err != 0) {
5612       state->error = err;
5613       state->error_pos = (const char*) p;
5614       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_18;
5615       return s_error;
5616     }
5617     goto s_n_llhttp__internal__n_error_18;
5618     /* UNREACHABLE */;
5619     abort();
5620   }
5621   s_n_llhttp__internal__n_invoke_mul_add_content_length_1: {
5622     switch (llhttp__internal__c_mul_add_content_length_1(state, p, endp, match)) {
5623       case 1:
5624         goto s_n_llhttp__internal__n_span_end_llhttp__on_header_value_4;
5625       default:
5626         goto s_n_llhttp__internal__n_header_value_content_length;
5627     }
5628     /* UNREACHABLE */;
5629     abort();
5630   }
5631   s_n_llhttp__internal__n_invoke_update_header_state_7: {
5632     switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
5633       default:
5634         goto s_n_llhttp__internal__n_header_value;
5635     }
5636     /* UNREACHABLE */;
5637     abort();
5638   }
5639   s_n_llhttp__internal__n_invoke_or_flags_15: {
5640     switch (llhttp__internal__c_or_flags_15(state, p, endp)) {
5641       default:
5642         goto s_n_llhttp__internal__n_header_value_discard_rws;
5643     }
5644     /* UNREACHABLE */;
5645     abort();
5646   }
5647   s_n_llhttp__internal__n_span_end_llhttp__on_header_value_5: {
5648     const unsigned char* start;
5649     int err;
5650     
5651     start = state->_span_pos0;
5652     state->_span_pos0 = NULL;
5653     err = llhttp__on_header_value(state, start, p);
5654     if (err != 0) {
5655       state->error = err;
5656       state->error_pos = (const char*) p;
5657       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_error_19;
5658       return s_error;
5659     }
5660     goto s_n_llhttp__internal__n_error_19;
5661     /* UNREACHABLE */;
5662     abort();
5663   }
5664   s_n_llhttp__internal__n_error_17: {
5665     state->error = 0x4;
5666     state->reason = "Duplicate Content-Length";
5667     state->error_pos = (const char*) p;
5668     state->_current = (void*) (intptr_t) s_error;
5669     return s_error;
5670     /* UNREACHABLE */;
5671     abort();
5672   }
5673   s_n_llhttp__internal__n_invoke_test_flags_5: {
5674     switch (llhttp__internal__c_test_flags_5(state, p, endp)) {
5675       case 0:
5676         goto s_n_llhttp__internal__n_header_value_content_length;
5677       default:
5678         goto s_n_llhttp__internal__n_error_17;
5679     }
5680     /* UNREACHABLE */;
5681     abort();
5682   }
5683   s_n_llhttp__internal__n_invoke_update_header_state_8: {
5684     switch (llhttp__internal__c_update_header_state_8(state, p, endp)) {
5685       default:
5686         goto s_n_llhttp__internal__n_header_value_otherwise;
5687     }
5688     /* UNREACHABLE */;
5689     abort();
5690   }
5691   s_n_llhttp__internal__n_invoke_or_flags_16: {
5692     switch (llhttp__internal__c_or_flags_16(state, p, endp)) {
5693       default:
5694         goto s_n_llhttp__internal__n_header_value_te_chunked;
5695     }
5696     /* UNREACHABLE */;
5697     abort();
5698   }
5699   s_n_llhttp__internal__n_invoke_or_flags_17: {
5700     switch (llhttp__internal__c_or_flags_17(state, p, endp)) {
5701       default:
5702         goto s_n_llhttp__internal__n_invoke_update_header_state_7;
5703     }
5704     /* UNREACHABLE */;
5705     abort();
5706   }
5707   s_n_llhttp__internal__n_invoke_load_header_state_2: {
5708     switch (llhttp__internal__c_load_header_state(state, p, endp)) {
5709       case 1:
5710         goto s_n_llhttp__internal__n_header_value_connection;
5711       case 2:
5712         goto s_n_llhttp__internal__n_invoke_test_flags_5;
5713       case 3:
5714         goto s_n_llhttp__internal__n_invoke_or_flags_16;
5715       case 4:
5716         goto s_n_llhttp__internal__n_invoke_or_flags_17;
5717       default:
5718         goto s_n_llhttp__internal__n_header_value;
5719     }
5720     /* UNREACHABLE */;
5721     abort();
5722   }
5723   s_n_llhttp__internal__n_span_end_llhttp__on_header_field: {
5724     const unsigned char* start;
5725     int err;
5726     
5727     start = state->_span_pos0;
5728     state->_span_pos0 = NULL;
5729     err = llhttp__on_header_field(state, start, p);
5730     if (err != 0) {
5731       state->error = err;
5732       state->error_pos = (const char*) (p + 1);
5733       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_discard_ws;
5734       return s_error;
5735     }
5736     p++;
5737     goto s_n_llhttp__internal__n_header_value_discard_ws;
5738     /* UNREACHABLE */;
5739     abort();
5740   }
5741   s_n_llhttp__internal__n_span_end_llhttp__on_header_field_1: {
5742     const unsigned char* start;
5743     int err;
5744     
5745     start = state->_span_pos0;
5746     state->_span_pos0 = NULL;
5747     err = llhttp__on_header_field(state, start, p);
5748     if (err != 0) {
5749       state->error = err;
5750       state->error_pos = (const char*) (p + 1);
5751       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_value_discard_ws;
5752       return s_error;
5753     }
5754     p++;
5755     goto s_n_llhttp__internal__n_header_value_discard_ws;
5756     /* UNREACHABLE */;
5757     abort();
5758   }
5759   s_n_llhttp__internal__n_error_20: {
5760     state->error = 0xa;
5761     state->reason = "Invalid header token";
5762     state->error_pos = (const char*) p;
5763     state->_current = (void*) (intptr_t) s_error;
5764     return s_error;
5765     /* UNREACHABLE */;
5766     abort();
5767   }
5768   s_n_llhttp__internal__n_invoke_update_header_state_9: {
5769     switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
5770       default:
5771         goto s_n_llhttp__internal__n_header_field_general;
5772     }
5773     /* UNREACHABLE */;
5774     abort();
5775   }
5776   s_n_llhttp__internal__n_invoke_store_header_state: {
5777     switch (llhttp__internal__c_store_header_state(state, p, endp, match)) {
5778       default:
5779         goto s_n_llhttp__internal__n_header_field_colon;
5780     }
5781     /* UNREACHABLE */;
5782     abort();
5783   }
5784   s_n_llhttp__internal__n_invoke_update_header_state_10: {
5785     switch (llhttp__internal__c_update_header_state_4(state, p, endp)) {
5786       default:
5787         goto s_n_llhttp__internal__n_header_field_general;
5788     }
5789     /* UNREACHABLE */;
5790     abort();
5791   }
5792   s_n_llhttp__internal__n_invoke_update_http_minor: {
5793     switch (llhttp__internal__c_update_http_minor(state, p, endp)) {
5794       default:
5795         goto s_n_llhttp__internal__n_header_field_start;
5796     }
5797     /* UNREACHABLE */;
5798     abort();
5799   }
5800   s_n_llhttp__internal__n_invoke_update_http_major: {
5801     switch (llhttp__internal__c_update_http_major(state, p, endp)) {
5802       default:
5803         goto s_n_llhttp__internal__n_invoke_update_http_minor;
5804     }
5805     /* UNREACHABLE */;
5806     abort();
5807   }
5808   s_n_llhttp__internal__n_span_end_llhttp__on_url_3: {
5809     const unsigned char* start;
5810     int err;
5811     
5812     start = state->_span_pos0;
5813     state->_span_pos0 = NULL;
5814     err = llhttp__on_url(state, start, p);
5815     if (err != 0) {
5816       state->error = err;
5817       state->error_pos = (const char*) p;
5818       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
5819       return s_error;
5820     }
5821     goto s_n_llhttp__internal__n_url_skip_to_http09;
5822     /* UNREACHABLE */;
5823     abort();
5824   }
5825   s_n_llhttp__internal__n_error_21: {
5826     state->error = 0x7;
5827     state->reason = "Expected CRLF";
5828     state->error_pos = (const char*) p;
5829     state->_current = (void*) (intptr_t) s_error;
5830     return s_error;
5831     /* UNREACHABLE */;
5832     abort();
5833   }
5834   s_n_llhttp__internal__n_span_end_llhttp__on_url_4: {
5835     const unsigned char* start;
5836     int err;
5837     
5838     start = state->_span_pos0;
5839     state->_span_pos0 = NULL;
5840     err = llhttp__on_url(state, start, p);
5841     if (err != 0) {
5842       state->error = err;
5843       state->error_pos = (const char*) p;
5844       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
5845       return s_error;
5846     }
5847     goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
5848     /* UNREACHABLE */;
5849     abort();
5850   }
5851   s_n_llhttp__internal__n_error_22: {
5852     state->error = 0x9;
5853     state->reason = "Expected CRLF after version";
5854     state->error_pos = (const char*) p;
5855     state->_current = (void*) (intptr_t) s_error;
5856     return s_error;
5857     /* UNREACHABLE */;
5858     abort();
5859   }
5860   s_n_llhttp__internal__n_invoke_store_http_minor: {
5861     switch (llhttp__internal__c_store_http_minor(state, p, endp, match)) {
5862       default:
5863         goto s_n_llhttp__internal__n_req_http_end;
5864     }
5865     /* UNREACHABLE */;
5866     abort();
5867   }
5868   s_n_llhttp__internal__n_error_23: {
5869     state->error = 0x9;
5870     state->reason = "Invalid minor version";
5871     state->error_pos = (const char*) p;
5872     state->_current = (void*) (intptr_t) s_error;
5873     return s_error;
5874     /* UNREACHABLE */;
5875     abort();
5876   }
5877   s_n_llhttp__internal__n_error_24: {
5878     state->error = 0x9;
5879     state->reason = "Expected dot";
5880     state->error_pos = (const char*) p;
5881     state->_current = (void*) (intptr_t) s_error;
5882     return s_error;
5883     /* UNREACHABLE */;
5884     abort();
5885   }
5886   s_n_llhttp__internal__n_invoke_store_http_major: {
5887     switch (llhttp__internal__c_store_http_major(state, p, endp, match)) {
5888       default:
5889         goto s_n_llhttp__internal__n_req_http_dot;
5890     }
5891     /* UNREACHABLE */;
5892     abort();
5893   }
5894   s_n_llhttp__internal__n_error_25: {
5895     state->error = 0x9;
5896     state->reason = "Invalid major version";
5897     state->error_pos = (const char*) p;
5898     state->_current = (void*) (intptr_t) s_error;
5899     return s_error;
5900     /* UNREACHABLE */;
5901     abort();
5902   }
5903   s_n_llhttp__internal__n_error_27: {
5904     state->error = 0x8;
5905     state->reason = "Expected HTTP/";
5906     state->error_pos = (const char*) p;
5907     state->_current = (void*) (intptr_t) s_error;
5908     return s_error;
5909     /* UNREACHABLE */;
5910     abort();
5911   }
5912   s_n_llhttp__internal__n_error_26: {
5913     state->error = 0x8;
5914     state->reason = "Expected SOURCE method for ICE/x.x request";
5915     state->error_pos = (const char*) p;
5916     state->_current = (void*) (intptr_t) s_error;
5917     return s_error;
5918     /* UNREACHABLE */;
5919     abort();
5920   }
5921   s_n_llhttp__internal__n_invoke_is_equal_method_1: {
5922     switch (llhttp__internal__c_is_equal_method_1(state, p, endp)) {
5923       case 0:
5924         goto s_n_llhttp__internal__n_error_26;
5925       default:
5926         goto s_n_llhttp__internal__n_req_http_major;
5927     }
5928     /* UNREACHABLE */;
5929     abort();
5930   }
5931   s_n_llhttp__internal__n_span_end_llhttp__on_url_5: {
5932     const unsigned char* start;
5933     int err;
5934     
5935     start = state->_span_pos0;
5936     state->_span_pos0 = NULL;
5937     err = llhttp__on_url(state, start, p);
5938     if (err != 0) {
5939       state->error = err;
5940       state->error_pos = (const char*) p;
5941       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
5942       return s_error;
5943     }
5944     goto s_n_llhttp__internal__n_url_skip_to_http;
5945     /* UNREACHABLE */;
5946     abort();
5947   }
5948   s_n_llhttp__internal__n_span_end_llhttp__on_url_6: {
5949     const unsigned char* start;
5950     int err;
5951     
5952     start = state->_span_pos0;
5953     state->_span_pos0 = NULL;
5954     err = llhttp__on_url(state, start, p);
5955     if (err != 0) {
5956       state->error = err;
5957       state->error_pos = (const char*) p;
5958       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
5959       return s_error;
5960     }
5961     goto s_n_llhttp__internal__n_url_skip_to_http09;
5962     /* UNREACHABLE */;
5963     abort();
5964   }
5965   s_n_llhttp__internal__n_span_end_llhttp__on_url_7: {
5966     const unsigned char* start;
5967     int err;
5968     
5969     start = state->_span_pos0;
5970     state->_span_pos0 = NULL;
5971     err = llhttp__on_url(state, start, p);
5972     if (err != 0) {
5973       state->error = err;
5974       state->error_pos = (const char*) p;
5975       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
5976       return s_error;
5977     }
5978     goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
5979     /* UNREACHABLE */;
5980     abort();
5981   }
5982   s_n_llhttp__internal__n_span_end_llhttp__on_url_8: {
5983     const unsigned char* start;
5984     int err;
5985     
5986     start = state->_span_pos0;
5987     state->_span_pos0 = NULL;
5988     err = llhttp__on_url(state, start, p);
5989     if (err != 0) {
5990       state->error = err;
5991       state->error_pos = (const char*) p;
5992       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
5993       return s_error;
5994     }
5995     goto s_n_llhttp__internal__n_url_skip_to_http;
5996     /* UNREACHABLE */;
5997     abort();
5998   }
5999   s_n_llhttp__internal__n_error_28: {
6000     state->error = 0x7;
6001     state->reason = "Invalid char in url fragment start";
6002     state->error_pos = (const char*) p;
6003     state->_current = (void*) (intptr_t) s_error;
6004     return s_error;
6005     /* UNREACHABLE */;
6006     abort();
6007   }
6008   s_n_llhttp__internal__n_span_end_llhttp__on_url_9: {
6009     const unsigned char* start;
6010     int err;
6011     
6012     start = state->_span_pos0;
6013     state->_span_pos0 = NULL;
6014     err = llhttp__on_url(state, start, p);
6015     if (err != 0) {
6016       state->error = err;
6017       state->error_pos = (const char*) p;
6018       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
6019       return s_error;
6020     }
6021     goto s_n_llhttp__internal__n_url_skip_to_http09;
6022     /* UNREACHABLE */;
6023     abort();
6024   }
6025   s_n_llhttp__internal__n_span_end_llhttp__on_url_10: {
6026     const unsigned char* start;
6027     int err;
6028     
6029     start = state->_span_pos0;
6030     state->_span_pos0 = NULL;
6031     err = llhttp__on_url(state, start, p);
6032     if (err != 0) {
6033       state->error = err;
6034       state->error_pos = (const char*) p;
6035       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
6036       return s_error;
6037     }
6038     goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
6039     /* UNREACHABLE */;
6040     abort();
6041   }
6042   s_n_llhttp__internal__n_span_end_llhttp__on_url_11: {
6043     const unsigned char* start;
6044     int err;
6045     
6046     start = state->_span_pos0;
6047     state->_span_pos0 = NULL;
6048     err = llhttp__on_url(state, start, p);
6049     if (err != 0) {
6050       state->error = err;
6051       state->error_pos = (const char*) p;
6052       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
6053       return s_error;
6054     }
6055     goto s_n_llhttp__internal__n_url_skip_to_http;
6056     /* UNREACHABLE */;
6057     abort();
6058   }
6059   s_n_llhttp__internal__n_error_29: {
6060     state->error = 0x7;
6061     state->reason = "Invalid char in url query";
6062     state->error_pos = (const char*) p;
6063     state->_current = (void*) (intptr_t) s_error;
6064     return s_error;
6065     /* UNREACHABLE */;
6066     abort();
6067   }
6068   s_n_llhttp__internal__n_error_30: {
6069     state->error = 0x7;
6070     state->reason = "Invalid char in url path";
6071     state->error_pos = (const char*) p;
6072     state->_current = (void*) (intptr_t) s_error;
6073     return s_error;
6074     /* UNREACHABLE */;
6075     abort();
6076   }
6077   s_n_llhttp__internal__n_span_end_llhttp__on_url: {
6078     const unsigned char* start;
6079     int err;
6080     
6081     start = state->_span_pos0;
6082     state->_span_pos0 = NULL;
6083     err = llhttp__on_url(state, start, p);
6084     if (err != 0) {
6085       state->error = err;
6086       state->error_pos = (const char*) p;
6087       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
6088       return s_error;
6089     }
6090     goto s_n_llhttp__internal__n_url_skip_to_http09;
6091     /* UNREACHABLE */;
6092     abort();
6093   }
6094   s_n_llhttp__internal__n_span_end_llhttp__on_url_1: {
6095     const unsigned char* start;
6096     int err;
6097     
6098     start = state->_span_pos0;
6099     state->_span_pos0 = NULL;
6100     err = llhttp__on_url(state, start, p);
6101     if (err != 0) {
6102       state->error = err;
6103       state->error_pos = (const char*) p;
6104       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
6105       return s_error;
6106     }
6107     goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
6108     /* UNREACHABLE */;
6109     abort();
6110   }
6111   s_n_llhttp__internal__n_span_end_llhttp__on_url_2: {
6112     const unsigned char* start;
6113     int err;
6114     
6115     start = state->_span_pos0;
6116     state->_span_pos0 = NULL;
6117     err = llhttp__on_url(state, start, p);
6118     if (err != 0) {
6119       state->error = err;
6120       state->error_pos = (const char*) p;
6121       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
6122       return s_error;
6123     }
6124     goto s_n_llhttp__internal__n_url_skip_to_http;
6125     /* UNREACHABLE */;
6126     abort();
6127   }
6128   s_n_llhttp__internal__n_span_end_llhttp__on_url_12: {
6129     const unsigned char* start;
6130     int err;
6131     
6132     start = state->_span_pos0;
6133     state->_span_pos0 = NULL;
6134     err = llhttp__on_url(state, start, p);
6135     if (err != 0) {
6136       state->error = err;
6137       state->error_pos = (const char*) p;
6138       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http09;
6139       return s_error;
6140     }
6141     goto s_n_llhttp__internal__n_url_skip_to_http09;
6142     /* UNREACHABLE */;
6143     abort();
6144   }
6145   s_n_llhttp__internal__n_span_end_llhttp__on_url_13: {
6146     const unsigned char* start;
6147     int err;
6148     
6149     start = state->_span_pos0;
6150     state->_span_pos0 = NULL;
6151     err = llhttp__on_url(state, start, p);
6152     if (err != 0) {
6153       state->error = err;
6154       state->error_pos = (const char*) p;
6155       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_lf_to_http09;
6156       return s_error;
6157     }
6158     goto s_n_llhttp__internal__n_url_skip_lf_to_http09;
6159     /* UNREACHABLE */;
6160     abort();
6161   }
6162   s_n_llhttp__internal__n_span_end_llhttp__on_url_14: {
6163     const unsigned char* start;
6164     int err;
6165     
6166     start = state->_span_pos0;
6167     state->_span_pos0 = NULL;
6168     err = llhttp__on_url(state, start, p);
6169     if (err != 0) {
6170       state->error = err;
6171       state->error_pos = (const char*) p;
6172       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_url_skip_to_http;
6173       return s_error;
6174     }
6175     goto s_n_llhttp__internal__n_url_skip_to_http;
6176     /* UNREACHABLE */;
6177     abort();
6178   }
6179   s_n_llhttp__internal__n_error_31: {
6180     state->error = 0x7;
6181     state->reason = "Double @ in url";
6182     state->error_pos = (const char*) p;
6183     state->_current = (void*) (intptr_t) s_error;
6184     return s_error;
6185     /* UNREACHABLE */;
6186     abort();
6187   }
6188   s_n_llhttp__internal__n_error_32: {
6189     state->error = 0x7;
6190     state->reason = "Unexpected char in url server";
6191     state->error_pos = (const char*) p;
6192     state->_current = (void*) (intptr_t) s_error;
6193     return s_error;
6194     /* UNREACHABLE */;
6195     abort();
6196   }
6197   s_n_llhttp__internal__n_error_33: {
6198     state->error = 0x7;
6199     state->reason = "Unexpected char in url server";
6200     state->error_pos = (const char*) p;
6201     state->_current = (void*) (intptr_t) s_error;
6202     return s_error;
6203     /* UNREACHABLE */;
6204     abort();
6205   }
6206   s_n_llhttp__internal__n_error_35: {
6207     state->error = 0x7;
6208     state->reason = "Unexpected char in url schema";
6209     state->error_pos = (const char*) p;
6210     state->_current = (void*) (intptr_t) s_error;
6211     return s_error;
6212     /* UNREACHABLE */;
6213     abort();
6214   }
6215   s_n_llhttp__internal__n_error_36: {
6216     state->error = 0x7;
6217     state->reason = "Unexpected char in url schema";
6218     state->error_pos = (const char*) p;
6219     state->_current = (void*) (intptr_t) s_error;
6220     return s_error;
6221     /* UNREACHABLE */;
6222     abort();
6223   }
6224   s_n_llhttp__internal__n_error_37: {
6225     state->error = 0x7;
6226     state->reason = "Unexpected start char in url";
6227     state->error_pos = (const char*) p;
6228     state->_current = (void*) (intptr_t) s_error;
6229     return s_error;
6230     /* UNREACHABLE */;
6231     abort();
6232   }
6233   s_n_llhttp__internal__n_invoke_is_equal_method: {
6234     switch (llhttp__internal__c_is_equal_method(state, p, endp)) {
6235       case 0:
6236         goto s_n_llhttp__internal__n_span_start_llhttp__on_url_1;
6237       default:
6238         goto s_n_llhttp__internal__n_span_start_llhttp__on_url;
6239     }
6240     /* UNREACHABLE */;
6241     abort();
6242   }
6243   s_n_llhttp__internal__n_error_38: {
6244     state->error = 0x6;
6245     state->reason = "Expected space after method";
6246     state->error_pos = (const char*) p;
6247     state->_current = (void*) (intptr_t) s_error;
6248     return s_error;
6249     /* UNREACHABLE */;
6250     abort();
6251   }
6252   s_n_llhttp__internal__n_invoke_store_method_1: {
6253     switch (llhttp__internal__c_store_method(state, p, endp, match)) {
6254       default:
6255         goto s_n_llhttp__internal__n_req_first_space_before_url;
6256     }
6257     /* UNREACHABLE */;
6258     abort();
6259   }
6260   s_n_llhttp__internal__n_error_46: {
6261     state->error = 0x6;
6262     state->reason = "Invalid method encountered";
6263     state->error_pos = (const char*) p;
6264     state->_current = (void*) (intptr_t) s_error;
6265     return s_error;
6266     /* UNREACHABLE */;
6267     abort();
6268   }
6269   s_n_llhttp__internal__n_error_39: {
6270     state->error = 0xd;
6271     state->reason = "Response overflow";
6272     state->error_pos = (const char*) p;
6273     state->_current = (void*) (intptr_t) s_error;
6274     return s_error;
6275     /* UNREACHABLE */;
6276     abort();
6277   }
6278   s_n_llhttp__internal__n_invoke_mul_add_status_code: {
6279     switch (llhttp__internal__c_mul_add_status_code(state, p, endp, match)) {
6280       case 1:
6281         goto s_n_llhttp__internal__n_error_39;
6282       default:
6283         goto s_n_llhttp__internal__n_res_status_code;
6284     }
6285     /* UNREACHABLE */;
6286     abort();
6287   }
6288   s_n_llhttp__internal__n_span_end_llhttp__on_status: {
6289     const unsigned char* start;
6290     int err;
6291     
6292     start = state->_span_pos0;
6293     state->_span_pos0 = NULL;
6294     err = llhttp__on_status(state, start, p);
6295     if (err != 0) {
6296       state->error = err;
6297       state->error_pos = (const char*) (p + 1);
6298       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_header_field_start;
6299       return s_error;
6300     }
6301     p++;
6302     goto s_n_llhttp__internal__n_header_field_start;
6303     /* UNREACHABLE */;
6304     abort();
6305   }
6306   s_n_llhttp__internal__n_span_end_llhttp__on_status_1: {
6307     const unsigned char* start;
6308     int err;
6309     
6310     start = state->_span_pos0;
6311     state->_span_pos0 = NULL;
6312     err = llhttp__on_status(state, start, p);
6313     if (err != 0) {
6314       state->error = err;
6315       state->error_pos = (const char*) (p + 1);
6316       state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_res_line_almost_done;
6317       return s_error;
6318     }
6319     p++;
6320     goto s_n_llhttp__internal__n_res_line_almost_done;
6321     /* UNREACHABLE */;
6322     abort();
6323   }
6324   s_n_llhttp__internal__n_error_40: {
6325     state->error = 0xd;
6326     state->reason = "Invalid response status";
6327     state->error_pos = (const char*) p;
6328     state->_current = (void*) (intptr_t) s_error;
6329     return s_error;
6330     /* UNREACHABLE */;
6331     abort();
6332   }
6333   s_n_llhttp__internal__n_invoke_update_status_code: {
6334     switch (llhttp__internal__c_update_status_code(state, p, endp)) {
6335       default:
6336         goto s_n_llhttp__internal__n_res_status_code;
6337     }
6338     /* UNREACHABLE */;
6339     abort();
6340   }
6341   s_n_llhttp__internal__n_error_41: {
6342     state->error = 0x9;
6343     state->reason = "Expected space after version";
6344     state->error_pos = (const char*) p;
6345     state->_current = (void*) (intptr_t) s_error;
6346     return s_error;
6347     /* UNREACHABLE */;
6348     abort();
6349   }
6350   s_n_llhttp__internal__n_invoke_store_http_minor_1: {
6351     switch (llhttp__internal__c_store_http_minor(state, p, endp, match)) {
6352       default:
6353         goto s_n_llhttp__internal__n_res_http_end;
6354     }
6355     /* UNREACHABLE */;
6356     abort();
6357   }
6358   s_n_llhttp__internal__n_error_42: {
6359     state->error = 0x9;
6360     state->reason = "Invalid minor version";
6361     state->error_pos = (const char*) p;
6362     state->_current = (void*) (intptr_t) s_error;
6363     return s_error;
6364     /* UNREACHABLE */;
6365     abort();
6366   }
6367   s_n_llhttp__internal__n_error_43: {
6368     state->error = 0x9;
6369     state->reason = "Expected dot";
6370     state->error_pos = (const char*) p;
6371     state->_current = (void*) (intptr_t) s_error;
6372     return s_error;
6373     /* UNREACHABLE */;
6374     abort();
6375   }
6376   s_n_llhttp__internal__n_invoke_store_http_major_1: {
6377     switch (llhttp__internal__c_store_http_major(state, p, endp, match)) {
6378       default:
6379         goto s_n_llhttp__internal__n_res_http_dot;
6380     }
6381     /* UNREACHABLE */;
6382     abort();
6383   }
6384   s_n_llhttp__internal__n_error_44: {
6385     state->error = 0x9;
6386     state->reason = "Invalid major version";
6387     state->error_pos = (const char*) p;
6388     state->_current = (void*) (intptr_t) s_error;
6389     return s_error;
6390     /* UNREACHABLE */;
6391     abort();
6392   }
6393   s_n_llhttp__internal__n_error_47: {
6394     state->error = 0x8;
6395     state->reason = "Expected HTTP/";
6396     state->error_pos = (const char*) p;
6397     state->_current = (void*) (intptr_t) s_error;
6398     return s_error;
6399     /* UNREACHABLE */;
6400     abort();
6401   }
6402   s_n_llhttp__internal__n_invoke_update_type: {
6403     switch (llhttp__internal__c_update_type(state, p, endp)) {
6404       default:
6405         goto s_n_llhttp__internal__n_req_first_space_before_url;
6406     }
6407     /* UNREACHABLE */;
6408     abort();
6409   }
6410   s_n_llhttp__internal__n_invoke_store_method: {
6411     switch (llhttp__internal__c_store_method(state, p, endp, match)) {
6412       default:
6413         goto s_n_llhttp__internal__n_invoke_update_type;
6414     }
6415     /* UNREACHABLE */;
6416     abort();
6417   }
6418   s_n_llhttp__internal__n_error_45: {
6419     state->error = 0x8;
6420     state->reason = "Invalid word encountered";
6421     state->error_pos = (const char*) p;
6422     state->_current = (void*) (intptr_t) s_error;
6423     return s_error;
6424     /* UNREACHABLE */;
6425     abort();
6426   }
6427   s_n_llhttp__internal__n_invoke_update_type_1: {
6428     switch (llhttp__internal__c_update_type_1(state, p, endp)) {
6429       default:
6430         goto s_n_llhttp__internal__n_res_http_major;
6431     }
6432     /* UNREACHABLE */;
6433     abort();
6434   }
6435   s_n_llhttp__internal__n_invoke_update_type_2: {
6436     switch (llhttp__internal__c_update_type(state, p, endp)) {
6437       default:
6438         goto s_n_llhttp__internal__n_start_req;
6439     }
6440     /* UNREACHABLE */;
6441     abort();
6442   }
6443   s_n_llhttp__internal__n_pause_8: {
6444     state->error = 0x15;
6445     state->reason = "on_message_begin pause";
6446     state->error_pos = (const char*) p;
6447     state->_current = (void*) (intptr_t) s_n_llhttp__internal__n_invoke_load_type;
6448     return s_error;
6449     /* UNREACHABLE */;
6450     abort();
6451   }
6452   s_n_llhttp__internal__n_error: {
6453     state->error = 0x10;
6454     state->reason = "`on_message_begin` callback error";
6455     state->error_pos = (const char*) p;
6456     state->_current = (void*) (intptr_t) s_error;
6457     return s_error;
6458     /* UNREACHABLE */;
6459     abort();
6460   }
6461   s_n_llhttp__internal__n_invoke_llhttp__on_message_begin: {
6462     switch (llhttp__on_message_begin(state, p, endp)) {
6463       case 0:
6464         goto s_n_llhttp__internal__n_invoke_load_type;
6465       case 21:
6466         goto s_n_llhttp__internal__n_pause_8;
6467       default:
6468         goto s_n_llhttp__internal__n_error;
6469     }
6470     /* UNREACHABLE */;
6471     abort();
6472   }
6473   s_n_llhttp__internal__n_invoke_update_finish: {
6474     switch (llhttp__internal__c_update_finish(state, p, endp)) {
6475       default:
6476         goto s_n_llhttp__internal__n_invoke_llhttp__on_message_begin;
6477     }
6478     /* UNREACHABLE */;
6479     abort();
6480   }
6481 }
6482
6483 int llhttp__internal_execute(llhttp__internal_t* state, const char* p, const char* endp) {
6484   llparse_state_t next;
6485
6486   /* check lingering errors */
6487   if (state->error != 0) {
6488     return state->error;
6489   }
6490
6491   /* restart spans */
6492   if (state->_span_pos0 != NULL) {
6493     state->_span_pos0 = (void*) p;
6494   }
6495   
6496   next = llhttp__internal__run(state, (const unsigned char*) p, (const unsigned char*) endp);
6497   if (next == s_error) {
6498     return state->error;
6499   }
6500   state->_current = (void*) (intptr_t) next;
6501
6502   /* execute spans */
6503   if (state->_span_pos0 != NULL) {
6504     int error;
6505   
6506     error = ((llhttp__internal__span_cb) state->_span_cb0)(state, state->_span_pos0, (const char*) endp);
6507     if (error != 0) {
6508       state->error = error;
6509       state->error_pos = endp;
6510       return error;
6511     }
6512   }
6513   
6514   return 0;
6515 }