Repository: bytedance/sonic
Pull request #190 (2022-02-18 10:04:15)

fix: correct htmlescape chars check
Fix bugs.

# Bench
5x faster of stdlib.
```
➜  encoder git:(feat/validate) ✗ export SONIC_NO_ASYNC_GC=1 && go test -v -run none  -bench "(BenchmarkHTMLEscape_Sonic|BenchmarkHTMLEscape_StdLib)"                                  
goos: darwin
goarch: amd64
pkg: github.com/bytedance/sonic/encoder
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkHTMLEscape_Sonic
BenchmarkHTMLEscape_Sonic-12              411591              2972 ns/op        4385.88 MB/s
BenchmarkHTMLEscape_StdLib
BenchmarkHTMLEscape_StdLib-12              94495             14076 ns/op         926.01 MB/s
PASS
ok      github.com/bytedance/sonic/encoder      5.810s
```

# Test
HtmlEscape API has passed fuzz testing through gofuzz and libfuzzer.
go-fuzz-build -func=FuzzValidate -o ./sonic-fuzz.zip && \
        go-fuzz -bin=./sonic-fuzz.zip -workdir=./gofuzz-workdir  -timeout=60 -testoutput=true -procs=1
2022/02/21 11:37:32 workers: 1, corpus: 1990 (3s ago), crashers: 0, restarts: 1/0, execs: 0 (0/sec), cover: 0, uptime: 3s
2022/02/21 11:37:35 workers: 1, corpus: 1990 (6s ago), crashers: 0, restarts: 1/0, execs: 0 (0/sec), cover: 157, uptime: 6s
2022/02/21 11:37:38 workers: 1, corpus: 1990 (9s ago), crashers: 0, restarts: 1/5216, execs: 15648 (1700/sec), cover: 157, uptime: 9s
2022/02/21 11:37:41 workers: 1, corpus: 1990 (12s ago), crashers: 0, restarts: 1/8218, execs: 65747 (5388/sec), cover: 157, uptime: 12s
2022/02/21 11:37:44 workers: 1, corpus: 1990 (15s ago), crashers: 0, restarts: 1/8931, execs: 116103 (7637/sec), cover: 157, uptime: 15s
2022/02/21 11:37:47 workers: 1, corpus: 1990 (18s ago), crashers: 0, restarts: 1/9227, execs: 166093 (9125/sec), cover: 157, uptime: 18s
2022/02/21 11:37:50 workers: 1, corpus: 1990 (21s ago), crashers: 0, restarts: 1/9406, execs: 216354 (10204/sec), cover: 157, uptime: 21s
2022/02/21 11:37:53 workers: 1, corpus: 1990 (24s ago), crashers: 0, restarts: 1/9511, execs: 266332 (11004/sec), cover: 157, uptime: 24s
2022/02/21 11:37:56 workers: 1, corpus: 1990 (27s ago), crashers: 0, restarts: 1/9618, execs: 317394 (11668/sec), cover: 157, uptime: 27s
2022/02/21 11:37:59 workers: 1, corpus: 1990 (30s ago), crashers: 0, restarts: 1/9687, execs: 368136 (12189/sec), cover: 157, uptime: 30s
2022/02/21 11:38:02 workers: 1, corpus: 1990 (33s ago), crashers: 0, restarts: 1/9738, execs: 418747 (12612/sec), cover: 157, uptime: 33s
2022/02/21 11:38:05 workers: 1, corpus: 1990 (36s ago), crashers: 0, restarts: 1/9643, execs: 462872 (12786/sec), cover: 157, uptime: 36s
2022/02/21 11:38:08 workers: 1, corpus: 1990 (39s ago), crashers: 0, restarts: 1/9715, execs: 505226 (12888/sec), cover: 157, uptime: 39s
2022/02/21 11:38:11 workers: 1, corpus: 1990 (42s ago), crashers: 0, restarts: 1/9804, execs: 549027 (13009/sec), cover: 157, uptime: 42s
2022/02/21 11:38:14 workers: 1, corpus: 1990 (45s ago), crashers: 0, restarts: 1/9786, execs: 596989 (13207/sec), cover: 157, uptime: 45s
2022/02/21 11:38:17 workers: 1, corpus: 1990 (48s ago), crashers: 0, restarts: 1/9844, execs: 649707 (13479/sec), cover: 157, uptime: 48s
2022/02/21 11:38:20 workers: 1, corpus: 1990 (51s ago), crashers: 0, restarts: 1/9782, execs: 704316 (13756/sec), cover: 157, uptime: 51s
2022/02/21 11:38:23 workers: 1, corpus: 1990 (54s ago), crashers: 0, restarts: 1/9806, execs: 755118 (13932/sec), cover: 157, uptime: 54s
2022/02/21 11:38:26 workers: 1, corpus: 1990 (57s ago), crashers: 0, restarts: 1/9857, execs: 808274 (14130/sec), cover: 157, uptime: 57s
2022/02/21 11:38:29 workers: 1, corpus: 1990 (1m0s ago), crashers: 0, restarts: 1/9783, execs: 860931 (14301/sec), cover: 157, uptime: 1m0s
2022/02/21 11:38:32 workers: 1, corpus: 1990 (1m3s ago), crashers: 0, restarts: 1/9834, execs: 914610 (14471/sec), cover: 157, uptime: 1m3s
2022/02/21 11:38:35 workers: 1, corpus: 1990 (1m6s ago), crashers: 0, restarts: 1/9851, execs: 965494 (14584/sec), cover: 157, uptime: 1m6s
2022/02/21 11:38:38 workers: 1, corpus: 1990 (1m9s ago), crashers: 0, restarts: 1/9820, execs: 1001653 (14474/sec), cover: 157, uptime: 1m9s
2022/02/21 11:38:41 workers: 1, corpus: 1990 (1m12s ago), crashers: 0, restarts: 1/9914, execs: 1031080 (14280/sec), cover: 157, uptime: 1m12s


Patch:
diff --git a/internal/native/avx/native_amd64.s b/internal/native/avx/native_amd64.s
index 0882c7e..204d0ce 100644
--- a/internal/native/avx/native_amd64.s
+++ b/internal/native/avx/native_amd64.s
@@ -291,7 +291,7 @@ LBB2_5:
 	LONG    $0x4fdc6941; WORD $0x1293; BYTE $0x00 // imull        $1217359, %r12d, %ebx
 	MOVQ    R12, AX
 	SHLQ    $4, AX
-	LONG    $0xd10d8d48; WORD $0x007c; BYTE $0x00 // leaq         $31953(%rip), %rcx  /* _DOUBLE_POW5_INV_SPLIT(%rip) */
+	LONG    $0x1b0d8d48; WORD $0x007d; BYTE $0x00 // leaq         $32027(%rip), %rcx  /* _DOUBLE_POW5_INV_SPLIT(%rip) */
 	MOVQ    R8, DI
 	ORQ     $2, DI
 	MOVQ    0(AX)(CX*1), R10
@@ -378,7 +378,7 @@ LBB2_12:
 	SHRL    $19, BX
 	MOVLQSX AX, SI
 	SHLQ    $4, SI
-	LONG    $0xfc158d4c; WORD $0x0090; BYTE $0x00 // leaq         $37116(%rip), %r10  /* _DOUBLE_POW5_SPLIT(%rip) */
+	LONG    $0x46158d4c; WORD $0x0091; BYTE $0x00 // leaq         $37190(%rip), %r10  /* _DOUBLE_POW5_SPLIT(%rip) */
 	MOVQ    R8, DI
 	ORQ     $2, DI
 	MOVQ    0(SI)(R10*1), R14
@@ -791,7 +791,7 @@ LBB2_61:
 	LEAQ 1(R13), BX
 	MOVQ BX, SI
 	MOVL R15, DX
-	LONG $0x00466fe8; BYTE $0x00 // callq        _print_mantissa
+	LONG $0x0046b9e8; BYTE $0x00 // callq        _print_mantissa
 	MOVB 1(R13), AX
 	MOVB AX, 0(R13)
 	MOVL $1, AX
@@ -820,7 +820,7 @@ LBB2_66:
 	LEAL    0(CX)(CX*1), AX
 	LEAL    0(AX)(AX*4), AX
 	SUBL    AX, R14
-	LONG    $0xce058d48; WORD $0x009f; BYTE $0x00 // leaq         $40910(%rip), %rax  /* _Digits(%rip) */
+	LONG    $0x18058d48; WORD $0x00a0; BYTE $0x00 // leaq         $40984(%rip), %rax  /* _Digits(%rip) */
 	MOVWLZX 0(AX)(CX*2), AX
 	MOVL    BX, CX
 	MOVW    AX, 0(R13)(CX*1)
@@ -856,7 +856,7 @@ LBB2_70:
 	CMPL    R14, $10
 	JL      LBB2_85
 	MOVLQSX R14, AX
-	LONG    $0x600d8d48; WORD $0x009f; BYTE $0x00 // leaq         $40800(%rip), %rcx  /* _Digits(%rip) */
+	LONG    $0xaa0d8d48; WORD $0x009f; BYTE $0x00 // leaq         $40874(%rip), %rcx  /* _Digits(%rip) */
 	MOVWLZX 0(CX)(AX*2), AX
 	MOVL    BX, CX
 	MOVW    AX, 0(R13)(CX*1)
@@ -875,7 +875,7 @@ LBB2_74:
 	MOVL  BX, SI
 	ADDQ  -64(BP), SI
 	MOVL  R15, DX
-	LONG  $0x00456be8; BYTE $0x00 // callq        _print_mantissa
+	LONG  $0x0045b5e8; BYTE $0x00 // callq        _print_mantissa
 	TESTL R13, R13
 	JE    LBB2_78
 	LEAL  0(R13)(BX*1), AX
@@ -1079,7 +1079,7 @@ LBB2_105:
 	MOVQ R13, SI
 	MOVL R15, DX
 	WORD $0xf8c5; BYTE $0x77     // vzeroupper
-	LONG $0x004259e8; BYTE $0x00 // callq        _print_mantissa
+	LONG $0x0042a3e8; BYTE $0x00 // callq        _print_mantissa
 	ADDL BX, R15
 	MOVL R15, BX
 
@@ -1172,7 +1172,7 @@ _u64toa:
 	ADDQ    AX, AX
 	CMPL    SI, $1000
 	JB      LBB4_3
-	LONG    $0x220d8d48; WORD $0x009b; BYTE $0x00 // leaq         $39714(%rip), %rcx  /* _Digits(%rip) */
+	LONG    $0x6c0d8d48; WORD $0x009b; BYTE $0x00 // leaq         $39788(%rip), %rcx  /* _Digits(%rip) */
 	MOVB    0(DX)(CX*1), CX
 	MOVB    CX, 0(DI)
 	MOVL    $1, CX
@@ -1186,14 +1186,14 @@ LBB4_3:
 LBB4_4:
 	MOVWLZX DX, DX
 	ORQ     $1, DX
-	LONG    $0x01358d48; WORD $0x009b; BYTE $0x00 // leaq         $39681(%rip), %rsi  /* _Digits(%rip) */
+	LONG    $0x4b358d48; WORD $0x009b; BYTE $0x00 // leaq         $39755(%rip), %rsi  /* _Digits(%rip) */
 	MOVB    0(DX)(SI*1), DX
 	MOVL    CX, SI
 	INCL    CX
 	MOVB    DX, 0(DI)(SI*1)
 
 LBB4_6:
-	LONG $0xf0158d48; WORD $0x009a; BYTE $0x00 // leaq         $39664(%rip), %rdx  /* _Digits(%rip) */
+	LONG $0x3a158d48; WORD $0x009b; BYTE $0x00 // leaq         $39738(%rip), %rdx  /* _Digits(%rip) */
 	MOVB 0(AX)(DX*1), DX
 	MOVL CX, SI
 	INCL CX
@@ -1202,7 +1202,7 @@ LBB4_6:
 LBB4_7:
 	MOVWLZX AX, AX
 	ORQ     $1, AX
-	LONG    $0xd8158d48; WORD $0x009a; BYTE $0x00 // leaq         $39640(%rip), %rdx  /* _Digits(%rip) */
+	LONG    $0x22158d48; WORD $0x009b; BYTE $0x00 // leaq         $39714(%rip), %rdx  /* _Digits(%rip) */
 	MOVB    0(AX)(DX*1), AX
 	MOVL    CX, DX
 	INCL    CX
@@ -1249,7 +1249,7 @@ LBB4_8:
 	ADDQ    R11, R11
 	CMPL    SI, $10000000
 	JB      LBB4_11
-	LONG    $0x41058d48; WORD $0x009a; BYTE $0x00 // leaq         $39489(%rip), %rax  /* _Digits(%rip) */
+	LONG    $0x8b058d48; WORD $0x009a; BYTE $0x00 // leaq         $39563(%rip), %rax  /* _Digits(%rip) */
 	MOVB    0(R10)(AX*1), AX
 	MOVB    AX, 0(DI)
 	MOVL    $1, CX
@@ -1263,14 +1263,14 @@ LBB4_11:
 LBB4_12:
 	MOVL R10, AX
 	ORQ  $1, AX
-	LONG $0x1c358d48; WORD $0x009a; BYTE $0x00 // leaq         $39452(%rip), %rsi  /* _Digits(%rip) */
+	LONG $0x66358d48; WORD $0x009a; BYTE $0x00 // leaq         $39526(%rip), %rsi  /* _Digits(%rip) */
 	MOVB 0(AX)(SI*1), AX
 	MOVL CX, SI
 	INCL CX
 	MOVB AX, 0(DI)(SI*1)
 
 LBB4_14:
-	LONG $0x0b058d48; WORD $0x009a; BYTE $0x00 // leaq         $39435(%rip), %rax  /* _Digits(%rip) */
+	LONG $0x55058d48; WORD $0x009a; BYTE $0x00 // leaq         $39509(%rip), %rax  /* _Digits(%rip) */
 	MOVB 0(R9)(AX*1), AX
 	MOVL CX, SI
 	INCL CX
@@ -1279,7 +1279,7 @@ LBB4_14:
 LBB4_15:
 	MOVWLZX R9, AX
 	ORQ     $1, AX
-	LONG    $0xf1358d48; WORD $0x0099; BYTE $0x00 // leaq         $39409(%rip), %rsi  /* _Digits(%rip) */
+	LONG    $0x3b358d48; WORD $0x009a; BYTE $0x00 // leaq         $39483(%rip), %rsi  /* _Digits(%rip) */
 	MOVB    0(AX)(SI*1), AX
 	MOVL    CX, DX
 	MOVB    AX, 0(DX)(DI*1)
@@ -1361,7 +1361,7 @@ LBB4_16:
 	MOVL $16, CX
 	SUBL AX, CX
 	SHLQ $4, AX
-	LONG $0x66158d48; WORD $0x0099; BYTE $0x00 // leaq         $39270(%rip), %rdx  /* _VecShiftShuffles(%rip) */
+	LONG $0xb0158d48; WORD $0x0099; BYTE $0x00 // leaq         $39344(%rip), %rdx  /* _VecShiftShuffles(%rip) */
 	LONG $0x0071e2c4; WORD $0x1004             // vpshufb      (%rax,%rdx), %xmm1, %xmm0
 	LONG $0x077ffac5                           // vmovdqu      %xmm0, (%rdi)
 	MOVL CX, AX
@@ -1387,7 +1387,7 @@ LBB4_20:
 	CMPL DX, $99
 	JA   LBB4_22
 	MOVL DX, AX
-	LONG $0x490d8d48; WORD $0x0098; BYTE $0x00 // leaq         $38985(%rip), %rcx  /* _Digits(%rip) */
+	LONG $0x930d8d48; WORD $0x0098; BYTE $0x00 // leaq         $39059(%rip), %rcx  /* _Digits(%rip) */
 	MOVB 0(CX)(AX*2), DX
 	MOVB 1(CX)(AX*2), AX
 	MOVB DX, 0(DI)
@@ -1412,7 +1412,7 @@ LBB4_22:
 	WORD    $0xc96b; BYTE $0x64                   // imull        $100, %ecx, %ecx
 	SUBL    CX, AX
 	MOVWLZX AX, AX
-	LONG    $0xf80d8d48; WORD $0x0097; BYTE $0x00 // leaq         $38904(%rip), %rcx  /* _Digits(%rip) */
+	LONG    $0x420d8d48; WORD $0x0098; BYTE $0x00 // leaq         $38978(%rip), %rcx  /* _Digits(%rip) */
 	MOVB    0(CX)(AX*2), DX
 	MOVB    1(CX)(AX*2), AX
 	MOVB    DX, 1(DI)
@@ -1424,7 +1424,7 @@ LBB4_24:
 	WORD    $0xc86b; BYTE $0x64                   // imull        $100, %eax, %ecx
 	SUBL    CX, DX
 	MOVWLZX AX, AX
-	LONG    $0xd5058d4c; WORD $0x0097; BYTE $0x00 // leaq         $38869(%rip), %r8  /* _Digits(%rip) */
+	LONG    $0x1f058d4c; WORD $0x0098; BYTE $0x00 // leaq         $38943(%rip), %r8  /* _Digits(%rip) */
 	MOVB    0(R8)(AX*2), CX
 	MOVB    1(R8)(AX*2), AX
 	MOVB    CX, 0(DI)
@@ -1509,8 +1509,8 @@ _quote:
 	SUBQ  $32, SP
 	MOVQ  DX, R10
 	TESTB $1, R8
-	LONG  $0xd7058d48; WORD $0x0097; BYTE $0x00 // leaq         $38871(%rip), %rax  /* __SingleQuoteTab(%rip) */
-	LONG  $0xd0158d48; WORD $0x00a7; BYTE $0x00 // leaq         $42960(%rip), %rdx  /* __DoubleQuoteTab(%rip) */
+	LONG  $0x21058d48; WORD $0x0098; BYTE $0x00 // leaq         $38945(%rip), %rax  /* __SingleQuoteTab(%rip) */
+	LONG  $0x1a158d48; WORD $0x00a8; BYTE $0x00 // leaq         $43034(%rip), %rdx  /* __DoubleQuoteTab(%rip) */
 	LONG  $0xd0440f48                           // cmoveq       %rax, %rdx
 	MOVQ  R10, R8
 	MOVQ  DI, AX
@@ -1600,7 +1600,7 @@ LBB5_10:
 	TESTQ R10, R10
 	MOVQ  -48(BP), CX
 	MOVQ  -56(BP), DI
-	LONG  $0x852d8d4c; WORD $0x0096; BYTE $0x00 // leaq         $38533(%rip), %r13  /* __SingleQuoteTab(%rip) */
+	LONG  $0xcf2d8d4c; WORD $0x0096; BYTE $0x00 // leaq         $38607(%rip), %r13  /* __SingleQuoteTab(%rip) */
 	JLE   LBB5_39
 
 LBB5_35:
@@ -1867,7 +1867,7 @@ _unquote:
 	MOVQ  R8, -72(BP)
 	MOVL  R8, R10
 	ANDL  $1, R10
-	LONG  $0xa6058d4c; WORD $0x00b3; BYTE $0x00 // leaq         $45990(%rip), %r8  /* __UnquoteTab(%rip) */
+	LONG  $0xf0058d4c; WORD $0x00b3; BYTE $0x00 // leaq         $46064(%rip), %r8  /* __UnquoteTab(%rip) */
 	QUAD  $0xffffffb2056ffac5                   // vmovdqu      $-78(%rip), %xmm0  /* LCPI6_0(%rip) */
 	MOVQ  DI, R9
 	MOVQ  SI, R13
@@ -2535,51 +2535,44 @@ _html_escape:
 	WORD  $0x5441                               // pushq        %r12
 	BYTE  $0x53                                 // pushq        %rbx
 	SUBQ  $24, SP
-	MOVQ  CX, -56(BP)
+	MOVQ  CX, -64(BP)
 	MOVQ  DX, R10
-	MOVQ  DX, -48(BP)
-	MOVQ  DI, -64(BP)
+	MOVQ  DX, -56(BP)
+	MOVQ  DI, -48(BP)
 	MOVQ  DI, AX
 	TESTQ SI, SI
-	JE    LBB7_56
-	MOVQ  SI, R11
-	MOVQ  -56(BP), AX
+	JLE   LBB7_59
+	MOVQ  -64(BP), AX
 	MOVQ  0(AX), R9
-	QUAD  $0xffffff82056ffac5                   // vmovdqu      $-126(%rip), %xmm0  /* LCPI7_0(%rip) */
-	QUAD  $0xffffff8a0d6ffac5                   // vmovdqu      $-118(%rip), %xmm1  /* LCPI7_1(%rip) */
-	QUAD  $0xffffff92156ffac5                   // vmovdqu      $-110(%rip), %xmm2  /* LCPI7_2(%rip) */
-	QUAD  $0xffffff9a1d6ffac5                   // vmovdqu      $-102(%rip), %xmm3  /* LCPI7_3(%rip) */
+	QUAD  $0xffffff85056ffac5                   // vmovdqu      $-123(%rip), %xmm0  /* LCPI7_0(%rip) */
+	QUAD  $0xffffff8d0d6ffac5                   // vmovdqu      $-115(%rip), %xmm1  /* LCPI7_1(%rip) */
+	QUAD  $0xffffff95156ffac5                   // vmovdqu      $-107(%rip), %xmm2  /* LCPI7_2(%rip) */
+	QUAD  $0xffffff9d1d6ffac5                   // vmovdqu      $-99(%rip), %xmm3  /* LCPI7_3(%rip) */
 	MOVQ  $5764607797912141824, R14
-	LONG  $0x0a3d8d4c; WORD $0x00ac; BYTE $0x00 // leaq         $44042(%rip), %r15  /* __HtmlQuoteTab(%rip) */
-	MOVQ  $12884901889, DI
-	MOVQ  -64(BP), AX
-	MOVQ  -48(BP), R10
-	JMP   LBB7_2
-
-LBB7_55:
-	INCQ AX
-	ADDQ SI, R10
-	DECQ R11
-	JE   LBB7_56
+	LONG  $0x571d8d4c; WORD $0x00ac; BYTE $0x00 // leaq         $44119(%rip), %r11  /* __HtmlQuoteTab(%rip) */
+	MOVQ  -48(BP), R15
+	MOVQ  -56(BP), R10
 
 LBB7_2:
-	CMPQ  R11, $15
-	SETGT CX
-	MOVQ  R9, R13
+	TESTQ R9, R9
+	JLE   LBB7_61
+	CMPQ  SI, $15
+	SETGT BX
+	MOVQ  R9, R12
 	MOVQ  R10, R8
-	MOVQ  R11, SI
-	MOVQ  AX, R12
+	MOVQ  SI, AX
+	MOVQ  R15, R13
 	CMPQ  R9, $16
 	JL    LBB7_9
-	CMPQ  R11, $16
+	CMPQ  SI, $16
 	JL    LBB7_9
-	MOVQ  AX, R12
-	MOVQ  R11, SI
+	MOVQ  R15, R13
+	MOVQ  SI, AX
 	MOVQ  R10, R8
-	MOVQ  R9, BX
+	MOVQ  R9, CX
 
-LBB7_5:
-	LONG  $0x6f7ac1c4; WORD $0x2424 // vmovdqu      (%r12), %xmm4
+LBB7_6:
+	LONG  $0x6f7ac1c4; WORD $0x0065 // vmovdqu      (%r13), %xmm4
 	LONG  $0xe874d9c5               // vpcmpeqb     %xmm0, %xmm4, %xmm5
 	LONG  $0xf174d9c5               // vpcmpeqb     %xmm1, %xmm4, %xmm6
 	LONG  $0xedebc9c5               // vpor         %xmm5, %xmm6, %xmm5
@@ -2587,251 +2580,312 @@ LBB7_5:
 	LONG  $0xf374c9c5               // vpcmpeqb     %xmm3, %xmm6, %xmm6
 	LONG  $0xeeebd1c5               // vpor         %xmm6, %xmm5, %xmm5
 	LONG  $0x7f7ac1c4; BYTE $0x20   // vmovdqu      %xmm4, (%r8)
-	LONG  $0xcdd7f9c5               // vpmovmskb    %xmm5, %ecx
-	TESTW CX, CX
-	JNE   LBB7_6
-	ADDQ  $16, R12
+	LONG  $0xd5d7f9c5               // vpmovmskb    %xmm5, %edx
+	TESTW DX, DX
+	JNE   LBB7_21
+	ADDQ  $16, R13
 	ADDQ  $16, R8
-	LEAQ  -16(BX), R13
-	CMPQ  SI, $31
-	SETGT CX
-	CMPQ  SI, $32
-	LEAQ  -16(SI), SI
+	LEAQ  -16(CX), R12
+	CMPQ  AX, $31
+	SETGT BX
+	CMPQ  AX, $32
+	LEAQ  -16(AX), AX
 	JL    LBB7_9
-	CMPQ  BX, $31
-	MOVQ  R13, BX
-	JG    LBB7_5
+	CMPQ  CX, $31
+	MOVQ  R12, CX
+	JG    LBB7_6
 
 LBB7_9:
-	TESTB CX, CX
-	JE    LBB7_10
+	TESTB BX, BX
+	JE    LBB7_13
 	MOVQ  R14, DX
-	LONG  $0x6f7ac1c4; WORD $0x2424 // vmovdqu      (%r12), %xmm4
+	LONG  $0x6f7ac1c4; WORD $0x0065 // vmovdqu      (%r13), %xmm4
 	LONG  $0xe874d9c5               // vpcmpeqb     %xmm0, %xmm4, %xmm5
 	LONG  $0xf174d9c5               // vpcmpeqb     %xmm1, %xmm4, %xmm6
 	LONG  $0xedebc9c5               // vpor         %xmm5, %xmm6, %xmm5
 	LONG  $0xf2ebd9c5               // vpor         %xmm2, %xmm4, %xmm6
 	LONG  $0xf374c9c5               // vpcmpeqb     %xmm3, %xmm6, %xmm6
 	LONG  $0xeeebd1c5               // vpor         %xmm6, %xmm5, %xmm5
-	LONG  $0xcdd7f9c5               // vpmovmskb    %xmm5, %ecx
-	ORL   $65536, CX
-	BSFL  CX, R14
-	LONG  $0x7ef9e1c4; BYTE $0xe1   // vmovq        %xmm4, %rcx
-	CMPQ  R13, R14
-	JGE   LBB7_18
-	CMPQ  R13, $8
-	JB    LBB7_29
-	MOVQ  CX, 0(R8)
-	LEAQ  8(R12), SI
+	LONG  $0xc5d7f9c5               // vpmovmskb    %xmm5, %eax
+	ORL   $65536, AX
+	BSFL  AX, R14
+	LONG  $0x7ef9e1c4; BYTE $0xe0   // vmovq        %xmm4, %rax
+	CMPQ  R12, R14
+	JGE   LBB7_22
+	CMPQ  R12, $8
+	JB    LBB7_25
+	MOVQ  AX, 0(R8)
+	LEAQ  8(R13), R14
 	ADDQ  $8, R8
-	LEAQ  -8(R13), CX
-	MOVQ  DX, R14
-	CMPQ  CX, $4
-	JAE   LBB7_32
-	JMP   LBB7_33
+	LEAQ  -8(R12), AX
+	CMPQ  AX, $4
+	JAE   LBB7_26
+	JMP   LBB7_27
 
-LBB7_10:
-	TESTQ R13, R13
-	JLE   LBB7_16
-	TESTQ SI, SI
-	JLE   LBB7_16
+LBB7_13:
+	TESTQ R12, R12
+	JLE   LBB7_20
+	TESTQ AX, AX
+	JLE   LBB7_20
 
-LBB7_12:
-	MOVBLZX 0(R12), CX
+LBB7_15:
+	MOVBLZX 0(R13), CX
 	CMPQ    CX, $62
-	JA      LBB7_13
+	JA      LBB7_17
 	BTQ     CX, R14
-	JB      LBB7_39
+	JB      LBB7_24
 
-LBB7_13:
+LBB7_17:
 	CMPB CX, $-30
-	JE   LBB7_39
-	INCQ R12
+	JE   LBB7_24
+	INCQ R13
 	MOVB CX, 0(R8)
-	CMPQ SI, $2
-	LEAQ -1(SI), SI
-	JL   LBB7_16
+	CMPQ AX, $2
+	LEAQ -1(AX), AX
+	JL   LBB7_20
 	INCQ R8
-	CMPQ R13, $1
-	LEAQ -1(R13), R13
-	JG   LBB7_12
-
-LBB7_16:
-	SUBQ AX, R12
-	NEGQ SI
-	SBBQ R13, R13
-	XORQ R12, R13
-	JMP  LBB7_40
+	CMPQ R12, $1
+	LEAQ -1(R12), R12
+	JG   LBB7_15
+
+LBB7_20:
+	SUBQ  R15, R13
+	NEGQ  AX
+	SBBQ  R12, R12
+	XORQ  R13, R12
+	TESTQ R12, R12
+	JNS   LBB7_37
+	JMP   LBB7_57
 
-LBB7_6:
-	MOVWLZX CX, CX
-	SUBQ    AX, R12
-	BSFL    CX, R13
-	ADDQ    R12, R13
-	JMP     LBB7_40
+LBB7_21:
+	MOVWLZX DX, AX
+	SUBQ    R15, R13
+	BSFL    AX, R12
+	ADDQ    R13, R12
+	TESTQ   R12, R12
+	JNS     LBB7_37
+	JMP     LBB7_57
 
-LBB7_18:
+LBB7_22:
 	CMPL R14, $8
-	JB   LBB7_19
-	MOVQ CX, 0(R8)
-	LEAQ 8(R12), R13
+	JB   LBB7_31
+	MOVQ AX, 0(R8)
+	LEAQ 8(R13), R12
 	ADDQ $8, R8
-	LEAQ -8(R14), SI
-	CMPQ SI, $4
-	JAE  LBB7_22
-	JMP  LBB7_23
+	LEAQ -8(R14), AX
+	CMPQ AX, $4
+	JAE  LBB7_32
+	JMP  LBB7_33
 
-LBB7_29:
-	MOVQ R12, SI
-	MOVQ R13, CX
-	MOVQ DX, R14
-	CMPQ CX, $4
-	JB   LBB7_33
+LBB7_24:
+	SUBQ  R15, R13
+	MOVQ  R13, R12
+	TESTQ R12, R12
+	JNS   LBB7_37
+	JMP   LBB7_57
 
-LBB7_32:
-	MOVL 0(SI), DX
-	MOVL DX, 0(R8)
-	ADDQ $4, SI
+LBB7_25:
+	MOVQ R13, R14
+	MOVQ R12, AX
+	CMPQ AX, $4
+	JB   LBB7_27
+
+LBB7_26:
+	MOVL 0(R14), CX
+	MOVL CX, 0(R8)
+	ADDQ $4, R14
 	ADDQ $4, R8
-	ADDQ $-4, CX
+	ADDQ $-4, AX
 
-LBB7_33:
-	CMPQ  CX, $2
-	JAE   LBB7_34
-	TESTQ CX, CX
-	JE    LBB7_37
+LBB7_27:
+	CMPQ    AX, $2
+	JB      LBB7_28
+	MOVWLZX 0(R14), CX
+	MOVW    CX, 0(R8)
+	ADDQ    $2, R14
+	ADDQ    $2, R8
+	ADDQ    $-2, AX
+	TESTQ   AX, AX
+	JNE     LBB7_29
+	JMP     LBB7_30
 
-LBB7_36:
-	MOVB 0(SI), CX
-	MOVB CX, 0(R8)
+LBB7_28:
+	TESTQ AX, AX
+	JE    LBB7_30
 
-LBB7_37:
-	SUBQ AX, R13
-	ADDQ R12, R13
-	NOTQ R13
-	JMP  LBB7_40
+LBB7_29:
+	MOVB 0(R14), AX
+	MOVB AX, 0(R8)
 
-LBB7_39:
-	SUBQ AX, R12
-	MOVQ R12, R13
-	JMP  LBB7_40
+LBB7_30:
+	SUBQ  R15, R12
+	ADDQ  R13, R12
+	NOTQ  R12
+	MOVQ  DX, R14
+	TESTQ R12, R12
+	JNS   LBB7_37
+	JMP   LBB7_57
 
-LBB7_19:
-	MOVQ R12, R13
-	MOVQ R14, SI
-	CMPQ SI, $4
-	JB   LBB7_23
+LBB7_31:
+	MOVQ R13, R12
+	MOVQ R14, AX
+	CMPQ AX, $4
+	JB   LBB7_33
 
-LBB7_22:
-	MOVL 0(R13), CX
+LBB7_32:
+	MOVL 0(R12), CX
 	MOVL CX, 0(R8)
-	ADDQ $4, R13
+	ADDQ $4, R12
 	ADDQ $4, R8
-	ADDQ $-4, SI
+	ADDQ $-4, AX
 
-LBB7_23:
-	CMPQ  SI, $2
-	JAE   LBB7_24
-	TESTQ SI, SI
-	JE    LBB7_27
+LBB7_33:
+	CMPQ    AX, $2
+	JB      LBB7_34
+	MOVWLZX 0(R12), CX
+	MOVW    CX, 0(R8)
+	ADDQ    $2, R12
+	ADDQ    $2, R8
+	ADDQ    $-2, AX
+	TESTQ   AX, AX
+	JNE     LBB7_35
+	JMP     LBB7_36
 
-LBB7_26:
-	MOVB 0(R13), CX
-	MOVB CX, 0(R8)
+LBB7_34:
+	TESTQ AX, AX
+	JE    LBB7_36
 
-LBB7_27:
-	SUBQ AX, R12
-	ADDQ R14, R12
-	MOVQ R12, R13
-	MOVQ DX, R14
+LBB7_35:
+	MOVB 0(R12), AX
+	MOVB AX, 0(R8)
 
-LBB7_40:
-	TESTQ R13, R13
-	JS    LBB7_41
-	ADDQ  R13, AX
-	ADDQ  R13, R10
-	SUBQ  R13, R11
-	JLE   LBB7_56
-	SUBQ  R13, R9
-	CMPQ  R11, $3
-	JL    LBB7_46
-	MOVL  0(AX), CX
-	MOVL  $16711679, DX
-	ANDL  DX, CX
-	CMPL  CX, $11043042
-	JNE   LBB7_46
-	ADDQ  $2, AX
-	ADDQ  $-2, R11
+LBB7_36:
+	SUBQ  R15, R13
+	ADDQ  R14, R13
+	MOVQ  R13, R12
+	MOVQ  DX, R14
+	TESTQ R12, R12
+	JS    LBB7_57
 
-LBB7_46:
-	MOVBLZX 0(AX), DX
+LBB7_37:
+	ADDQ R12, R15
+	ADDQ R12, R10
+	SUBQ R12, SI
+	JLE  LBB7_58
+	SUBQ R12, R9
+	MOVB 0(R15), CX
+	CMPB CX, $-30
+	JE   LBB7_51
+	MOVQ R15, AX
+
+LBB7_40:
+	MOVBLZX CX, DX
 	SHLQ    $4, DX
-	MOVQ    0(DX)(R15*1), BX
-	MOVLQSX BX, SI
-	SUBQ    SI, R9
-	JL      LBB7_47
-	SHLQ    $32, BX
-	LEAQ    8(DX)(R15*1), CX
-	CMPQ    BX, DI
-	JL      LBB7_49
-	MOVL    0(CX), CX
+	MOVQ    0(DX)(R11*1), DI
+	MOVLQSX DI, BX
+	SUBQ    BX, R9
+	JL      LBB7_60
+	SHLQ    $32, DI
+	LEAQ    8(DX)(R11*1), R15
+	MOVQ    $12884901889, CX
+	CMPQ    DI, CX
+	JL      LBB7_43
+	MOVL    0(R15), CX
 	MOVL    CX, 0(R10)
-	LEAQ    12(DX)(R15*1), CX
-	LEAQ    4(R10), BX
-	LEAQ    -4(SI), DX
-	CMPQ    DX, $2
-	JGE     LBB7_52
-	JMP     LBB7_53
-
-LBB7_49:
-	MOVQ R10, BX
-	MOVQ SI, DX
-	CMPQ DX, $2
-	JL   LBB7_53
+	LEAQ    12(DX)(R11*1), R15
+	LEAQ    4(R10), R8
+	LEAQ    -4(BX), DI
+	CMPQ    DI, $2
+	JGE     LBB7_44
+	JMP     LBB7_45
+
+LBB7_43:
+	MOVQ R10, R8
+	MOVQ BX, DI
+	CMPQ DI, $2
+	JL   LBB7_45
+
+LBB7_44:
+	MOVWLZX 0(R15), DX
+	MOVW    DX, 0(R8)
+	ADDQ    $2, R15
+	ADDQ    $2, R8
+	ADDQ    $-2, DI
 
-LBB7_52:
-	MOVQ    DI, R8
-	MOVWLZX 0(CX), DI
-	MOVW    DI, 0(BX)
-	MOVQ    R8, DI
-	ADDQ    $2, CX
-	ADDQ    $2, BX
-	ADDQ    $-2, DX
+LBB7_45:
+	TESTQ DI, DI
+	JLE   LBB7_47
+	MOVB  0(R15), CX
+	MOVB  CX, 0(R8)
 
-LBB7_53:
-	TESTQ DX, DX
-	JLE   LBB7_55
-	MOVB  0(CX), CX
-	MOVB  CX, 0(BX)
-	JMP   LBB7_55
+LBB7_47:
+	ADDQ BX, R10
 
-LBB7_34:
-	MOVWLZX 0(SI), DX
-	MOVW    DX, 0(R8)
-	ADDQ    $2, SI
-	ADDQ    $2, R8
-	ADDQ    $-2, CX
-	TESTQ   CX, CX
-	JNE     LBB7_36
-	JMP     LBB7_37
+LBB7_48:
+	INCQ AX
+	MOVQ AX, R15
+	CMPQ SI, $1
+	LEAQ -1(SI), SI
+	JG   LBB7_2
+	JMP  LBB7_59
+
+LBB7_51:
+	CMPQ SI, $3
+	JL   LBB7_55
+	CMPB 1(R15), $-128
+	JNE  LBB7_55
+	MOVB 2(R15), CX
+	MOVL CX, AX
+	ANDB $-2, AX
+	CMPB AX, $-88
+	JNE  LBB7_55
+	LEAQ 2(R15), AX
+	ADDQ $-2, SI
+	JMP  LBB7_40
 
-LBB7_24:
-	MOVWLZX 0(R13), CX
-	MOVW    CX, 0(R8)
-	ADDQ    $2, R13
-	ADDQ    $2, R8
-	ADDQ    $-2, SI
-	TESTQ   SI, SI
-	JNE     LBB7_26
-	JMP     LBB7_27
+LBB7_55:
+	TESTQ R9, R9
+	JLE   LBB7_61
+	MOVB  $-30, 0(R10)
+	INCQ  R10
+	DECQ  R9
+	MOVQ  R15, AX
+	JMP   LBB7_48
 
-LBB7_56:
-	SUBQ -48(BP), R10
-	MOVQ -56(BP), CX
+LBB7_57:
+	SUBQ -56(BP), R10
+	NOTQ R12
+	ADDQ R12, R10
+	MOVQ -64(BP), AX
+	MOVQ R10, 0(AX)
+	SUBQ -48(BP), R15
+	ADDQ R12, R15
+	NOTQ R15
+	JMP  LBB7_62
+
+LBB7_58:
+	MOVQ R15, AX
+
+LBB7_59:
+	SUBQ -56(BP), R10
+	MOVQ -64(BP), CX
 	MOVQ R10, 0(CX)
-	SUBQ -64(BP), AX
+	SUBQ -48(BP), AX
+	JMP  LBB7_63
 
-LBB7_57:
+LBB7_60:
+	SUBQ -56(BP), R10
+	MOVQ -64(BP), AX
+	MOVQ R10, 0(AX)
+
+LBB7_61:
+	NOTQ R15
+	ADDQ -48(BP), R15
+
+LBB7_62:
+	MOVQ R15, AX
+
+LBB7_63:
 	ADDQ $24, SP
 	BYTE $0x5b   // popq         %rbx
 	WORD $0x5c41 // popq         %r12
@@ -2841,25 +2895,6 @@ LBB7_57:
 	BYTE $0x5d   // popq         %rbp
 	RET
 
-LBB7_41:
-	SUBQ -48(BP), R10
-	NOTQ R13
-	ADDQ R13, R10
-	MOVQ -56(BP), CX
-	MOVQ R10, 0(CX)
-	SUBQ -64(BP), AX
-	ADDQ R13, AX
-	NOTQ AX
-	JMP  LBB7_57
-
-LBB7_47:
-	SUBQ -48(BP), R10
-	MOVQ -56(BP), CX
-	MOVQ R10, 0(CX)
-	NOTQ AX
-	ADDQ -64(BP), AX
-	JMP  LBB7_57
-
 _atof_eisel_lemire64:
 	BYTE  $0x55               // pushq        %rbp
 	WORD  $0x8948; BYTE $0xe5 // movq         %rsp, %rbp
@@ -11515,7 +11550,7 @@ _skip_array:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ m+16(FP), DX
-	CALL ·__native_entry__+17296(SB) // _skip_array
+	CALL ·__native_entry__+17370(SB) // _skip_array
 	MOVQ AX, ret+24(FP)
 	RET
 
@@ -11536,7 +11571,7 @@ _skip_object:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ m+16(FP), DX
-	CALL ·__native_entry__+17333(SB) // _skip_object
+	CALL ·__native_entry__+17407(SB) // _skip_object
 	MOVQ AX, ret+24(FP)
 	RET
 
@@ -11557,7 +11592,7 @@ _skip_one:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ m+16(FP), DX
-	CALL ·__native_entry__+15444(SB) // _skip_one
+	CALL ·__native_entry__+15518(SB) // _skip_one
 	MOVQ AX, ret+24(FP)
 	RET
 
@@ -11621,7 +11656,7 @@ _validate_one:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ m+16(FP), DX
-	CALL ·__native_entry__+20414(SB) // _validate_one
+	CALL ·__native_entry__+20488(SB) // _validate_one
 	MOVQ AX, ret+24(FP)
 	RET
 
@@ -11644,7 +11679,7 @@ _value:
 	MOVQ p+16(FP), DX
 	MOVQ v+24(FP), CX
 	MOVQ allow_control+32(FP), R8
-	CALL ·__native_entry__+10806(SB) // _value
+	CALL ·__native_entry__+10880(SB) // _value
 	MOVQ AX, ret+40(FP)
 	RET
 
@@ -11665,7 +11700,7 @@ _vnumber:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ v+16(FP), DX
-	LEAQ ·__native_entry__+13602(SB), AX // _vnumber
+	LEAQ ·__native_entry__+13676(SB), AX // _vnumber
 	JMP  AX
 
 _stack_grow:
@@ -11685,7 +11720,7 @@ _vsigned:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ v+16(FP), DX
-	LEAQ ·__native_entry__+14916(SB), AX // _vsigned
+	LEAQ ·__native_entry__+14990(SB), AX // _vsigned
 	JMP  AX
 
 _stack_grow:
@@ -11705,7 +11740,7 @@ _vstring:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ v+16(FP), DX
-	LEAQ ·__native_entry__+12567(SB), AX // _vstring
+	LEAQ ·__native_entry__+12641(SB), AX // _vstring
 	JMP  AX
 
 _stack_grow:
@@ -11725,7 +11760,7 @@ _vunsigned:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ v+16(FP), DX
-	LEAQ ·__native_entry__+15175(SB), AX // _vunsigned
+	LEAQ ·__native_entry__+15249(SB), AX // _vunsigned
 	JMP  AX
 
 _stack_grow:
diff --git a/internal/native/avx/native_subr_amd64.go b/internal/native/avx/native_subr_amd64.go
index e8cfbe4..f922d3e 100644
--- a/internal/native/avx/native_subr_amd64.go
+++ b/internal/native/avx/native_subr_amd64.go
@@ -15,17 +15,17 @@ var (
     _subr__lspace       = __native_entry__() + 301
     _subr__lzero        = __native_entry__() + 13
     _subr__quote        = __native_entry__() + 4955
-    _subr__skip_array   = __native_entry__() + 17296
-    _subr__skip_object  = __native_entry__() + 17333
-    _subr__skip_one     = __native_entry__() + 15444
+    _subr__skip_array   = __native_entry__() + 17370
+    _subr__skip_object  = __native_entry__() + 17407
+    _subr__skip_one     = __native_entry__() + 15518
     _subr__u64toa       = __native_entry__() + 3735
     _subr__unquote      = __native_entry__() + 6005
-    _subr__validate_one = __native_entry__() + 20414
-    _subr__value        = __native_entry__() + 10806
-    _subr__vnumber      = __native_entry__() + 13602
-    _subr__vsigned      = __native_entry__() + 14916
-    _subr__vstring      = __native_entry__() + 12567
-    _subr__vunsigned    = __native_entry__() + 15175
+    _subr__validate_one = __native_entry__() + 20488
+    _subr__value        = __native_entry__() + 10880
+    _subr__vnumber      = __native_entry__() + 13676
+    _subr__vsigned      = __native_entry__() + 14990
+    _subr__vstring      = __native_entry__() + 12641
+    _subr__vunsigned    = __native_entry__() + 15249
 )
 
 const (
diff --git a/internal/native/avx2/native_amd64.s b/internal/native/avx2/native_amd64.s
index 71ea9cc..356176e 100644
--- a/internal/native/avx2/native_amd64.s
+++ b/internal/native/avx2/native_amd64.s
@@ -350,7 +350,7 @@ LBB2_5:
 	LONG    $0x4fdc6941; WORD $0x1293; BYTE $0x00 // imull        $1217359, %r12d, %ebx
 	MOVQ    R12, AX
 	SHLQ    $4, AX
-	LONG    $0xa10d8d48; WORD $0x008d; BYTE $0x00 // leaq         $36257(%rip), %rcx  /* _DOUBLE_POW5_INV_SPLIT(%rip) */
+	LONG    $0xeb0d8d48; WORD $0x008d; BYTE $0x00 // leaq         $36331(%rip), %rcx  /* _DOUBLE_POW5_INV_SPLIT(%rip) */
 	MOVQ    R8, DI
 	ORQ     $2, DI
 	MOVQ    0(AX)(CX*1), R10
@@ -437,7 +437,7 @@ LBB2_12:
 	SHRL    $19, BX
 	MOVLQSX AX, SI
 	SHLQ    $4, SI
-	LONG    $0xcc158d4c; WORD $0x00a1; BYTE $0x00 // leaq         $41420(%rip), %r10  /* _DOUBLE_POW5_SPLIT(%rip) */
+	LONG    $0x16158d4c; WORD $0x00a2; BYTE $0x00 // leaq         $41494(%rip), %r10  /* _DOUBLE_POW5_SPLIT(%rip) */
 	MOVQ    R8, DI
 	ORQ     $2, DI
 	MOVQ    0(SI)(R10*1), R14
@@ -850,7 +850,7 @@ LBB2_61:
 	LEAQ 1(R13), BX
 	MOVQ BX, SI
 	MOVL R15, DX
-	LONG $0x00573fe8; BYTE $0x00 // callq        _print_mantissa
+	LONG $0x005789e8; BYTE $0x00 // callq        _print_mantissa
 	MOVB 1(R13), AX
 	MOVB AX, 0(R13)
 	MOVL $1, AX
@@ -879,7 +879,7 @@ LBB2_66:
 	LEAL    0(CX)(CX*1), AX
 	LEAL    0(AX)(AX*4), AX
 	SUBL    AX, R14
-	LONG    $0x9e058d48; WORD $0x00b0; BYTE $0x00 // leaq         $45214(%rip), %rax  /* _Digits(%rip) */
+	LONG    $0xe8058d48; WORD $0x00b0; BYTE $0x00 // leaq         $45288(%rip), %rax  /* _Digits(%rip) */
 	MOVWLZX 0(AX)(CX*2), AX
 	MOVL    BX, CX
 	MOVW    AX, 0(R13)(CX*1)
@@ -915,7 +915,7 @@ LBB2_70:
 	CMPL    R14, $10
 	JL      LBB2_85
 	MOVLQSX R14, AX
-	LONG    $0x300d8d48; WORD $0x00b0; BYTE $0x00 // leaq         $45104(%rip), %rcx  /* _Digits(%rip) */
+	LONG    $0x7a0d8d48; WORD $0x00b0; BYTE $0x00 // leaq         $45178(%rip), %rcx  /* _Digits(%rip) */
 	MOVWLZX 0(CX)(AX*2), AX
 	MOVL    BX, CX
 	MOVW    AX, 0(R13)(CX*1)
@@ -934,7 +934,7 @@ LBB2_74:
 	MOVL  BX, SI
 	ADDQ  -64(BP), SI
 	MOVL  R15, DX
-	LONG  $0x00563be8; BYTE $0x00 // callq        _print_mantissa
+	LONG  $0x005685e8; BYTE $0x00 // callq        _print_mantissa
 	TESTL R13, R13
 	JE    LBB2_78
 	LEAL  0(R13)(BX*1), AX
@@ -1138,7 +1138,7 @@ LBB2_105:
 	MOVQ R13, SI
 	MOVL R15, DX
 	WORD $0xf8c5; BYTE $0x77     // vzeroupper
-	LONG $0x005329e8; BYTE $0x00 // callq        _print_mantissa
+	LONG $0x005373e8; BYTE $0x00 // callq        _print_mantissa
 	ADDL BX, R15
 	MOVL R15, BX
 
@@ -1231,7 +1231,7 @@ _u64toa:
 	ADDQ    AX, AX
 	CMPL    SI, $1000
 	JB      LBB4_3
-	LONG    $0xf20d8d48; WORD $0x00ab; BYTE $0x00 // leaq         $44018(%rip), %rcx  /* _Digits(%rip) */
+	LONG    $0x3c0d8d48; WORD $0x00ac; BYTE $0x00 // leaq         $44092(%rip), %rcx  /* _Digits(%rip) */
 	MOVB    0(DX)(CX*1), CX
 	MOVB    CX, 0(DI)
 	MOVL    $1, CX
@@ -1245,14 +1245,14 @@ LBB4_3:
 LBB4_4:
 	MOVWLZX DX, DX
 	ORQ     $1, DX
-	LONG    $0xd1358d48; WORD $0x00ab; BYTE $0x00 // leaq         $43985(%rip), %rsi  /* _Digits(%rip) */
+	LONG    $0x1b358d48; WORD $0x00ac; BYTE $0x00 // leaq         $44059(%rip), %rsi  /* _Digits(%rip) */
 	MOVB    0(DX)(SI*1), DX
 	MOVL    CX, SI
 	INCL    CX
 	MOVB    DX, 0(DI)(SI*1)
 
 LBB4_6:
-	LONG $0xc0158d48; WORD $0x00ab; BYTE $0x00 // leaq         $43968(%rip), %rdx  /* _Digits(%rip) */
+	LONG $0x0a158d48; WORD $0x00ac; BYTE $0x00 // leaq         $44042(%rip), %rdx  /* _Digits(%rip) */
 	MOVB 0(AX)(DX*1), DX
 	MOVL CX, SI
 	INCL CX
@@ -1261,7 +1261,7 @@ LBB4_6:
 LBB4_7:
 	MOVWLZX AX, AX
 	ORQ     $1, AX
-	LONG    $0xa8158d48; WORD $0x00ab; BYTE $0x00 // leaq         $43944(%rip), %rdx  /* _Digits(%rip) */
+	LONG    $0xf2158d48; WORD $0x00ab; BYTE $0x00 // leaq         $44018(%rip), %rdx  /* _Digits(%rip) */
 	MOVB    0(AX)(DX*1), AX
 	MOVL    CX, DX
 	INCL    CX
@@ -1308,7 +1308,7 @@ LBB4_8:
 	ADDQ    R11, R11
 	CMPL    SI, $10000000
 	JB      LBB4_11
-	LONG    $0x11058d48; WORD $0x00ab; BYTE $0x00 // leaq         $43793(%rip), %rax  /* _Digits(%rip) */
+	LONG    $0x5b058d48; WORD $0x00ab; BYTE $0x00 // leaq         $43867(%rip), %rax  /* _Digits(%rip) */
 	MOVB    0(R10)(AX*1), AX
 	MOVB    AX, 0(DI)
 	MOVL    $1, CX
@@ -1322,14 +1322,14 @@ LBB4_11:
 LBB4_12:
 	MOVL R10, AX
 	ORQ  $1, AX
-	LONG $0xec358d48; WORD $0x00aa; BYTE $0x00 // leaq         $43756(%rip), %rsi  /* _Digits(%rip) */
+	LONG $0x36358d48; WORD $0x00ab; BYTE $0x00 // leaq         $43830(%rip), %rsi  /* _Digits(%rip) */
 	MOVB 0(AX)(SI*1), AX
 	MOVL CX, SI
 	INCL CX
 	MOVB AX, 0(DI)(SI*1)
 
 LBB4_14:
-	LONG $0xdb058d48; WORD $0x00aa; BYTE $0x00 // leaq         $43739(%rip), %rax  /* _Digits(%rip) */
+	LONG $0x25058d48; WORD $0x00ab; BYTE $0x00 // leaq         $43813(%rip), %rax  /* _Digits(%rip) */
 	MOVB 0(R9)(AX*1), AX
 	MOVL CX, SI
 	INCL CX
@@ -1338,7 +1338,7 @@ LBB4_14:
 LBB4_15:
 	MOVWLZX R9, AX
 	ORQ     $1, AX
-	LONG    $0xc1358d48; WORD $0x00aa; BYTE $0x00 // leaq         $43713(%rip), %rsi  /* _Digits(%rip) */
+	LONG    $0x0b358d48; WORD $0x00ab; BYTE $0x00 // leaq         $43787(%rip), %rsi  /* _Digits(%rip) */
 	MOVB    0(AX)(SI*1), AX
 	MOVL    CX, DX
 	MOVB    AX, 0(DX)(DI*1)
@@ -1420,7 +1420,7 @@ LBB4_16:
 	MOVL $16, CX
 	SUBL AX, CX
 	SHLQ $4, AX
-	LONG $0x34158d48; WORD $0x00aa; BYTE $0x00 // leaq         $43572(%rip), %rdx  /* _VecShiftShuffles(%rip) */
+	LONG $0x7e158d48; WORD $0x00aa; BYTE $0x00 // leaq         $43646(%rip), %rdx  /* _VecShiftShuffles(%rip) */
 	LONG $0x0071e2c4; WORD $0x1004             // vpshufb      (%rax,%rdx), %xmm1, %xmm0
 	LONG $0x077ffac5                           // vmovdqu      %xmm0, (%rdi)
 	MOVL CX, AX
@@ -1446,7 +1446,7 @@ LBB4_20:
 	CMPL DX, $99
 	JA   LBB4_22
 	MOVL DX, AX
-	LONG $0x170d8d48; WORD $0x00a9; BYTE $0x00 // leaq         $43287(%rip), %rcx  /* _Digits(%rip) */
+	LONG $0x610d8d48; WORD $0x00a9; BYTE $0x00 // leaq         $43361(%rip), %rcx  /* _Digits(%rip) */
 	MOVB 0(CX)(AX*2), DX
 	MOVB 1(CX)(AX*2), AX
 	MOVB DX, 0(DI)
@@ -1471,7 +1471,7 @@ LBB4_22:
 	WORD    $0xc96b; BYTE $0x64                   // imull        $100, %ecx, %ecx
 	SUBL    CX, AX
 	MOVWLZX AX, AX
-	LONG    $0xc60d8d48; WORD $0x00a8; BYTE $0x00 // leaq         $43206(%rip), %rcx  /* _Digits(%rip) */
+	LONG    $0x100d8d48; WORD $0x00a9; BYTE $0x00 // leaq         $43280(%rip), %rcx  /* _Digits(%rip) */
 	MOVB    0(CX)(AX*2), DX
 	MOVB    1(CX)(AX*2), AX
 	MOVB    DX, 1(DI)
@@ -1483,7 +1483,7 @@ LBB4_24:
 	WORD    $0xc86b; BYTE $0x64                   // imull        $100, %eax, %ecx
 	SUBL    CX, DX
 	MOVWLZX AX, AX
-	LONG    $0xa3058d4c; WORD $0x00a8; BYTE $0x00 // leaq         $43171(%rip), %r8  /* _Digits(%rip) */
+	LONG    $0xed058d4c; WORD $0x00a8; BYTE $0x00 // leaq         $43245(%rip), %r8  /* _Digits(%rip) */
 	MOVB    0(R8)(AX*2), CX
 	MOVB    1(R8)(AX*2), AX
 	MOVB    CX, 0(DI)
@@ -1580,8 +1580,8 @@ _quote:
 	SUBQ  $16, SP
 	MOVQ  CX, R15
 	TESTB $1, R8
-	LONG  $0x43058d48; WORD $0x00a8; BYTE $0x00 // leaq         $43075(%rip), %rax  /* __SingleQuoteTab(%rip) */
-	LONG  $0x3c158d4c; WORD $0x00b8; BYTE $0x00 // leaq         $47164(%rip), %r10  /* __DoubleQuoteTab(%rip) */
+	LONG  $0x8d058d48; WORD $0x00a8; BYTE $0x00 // leaq         $43149(%rip), %rax  /* __SingleQuoteTab(%rip) */
+	LONG  $0x86158d4c; WORD $0x00b8; BYTE $0x00 // leaq         $47238(%rip), %r10  /* __DoubleQuoteTab(%rip) */
 	LONG  $0xd0440f4c                           // cmoveq       %rax, %r10
 	MOVQ  DX, R8
 	MOVQ  DI, AX
@@ -1790,7 +1790,7 @@ LBB5_25:
 LBB5_26:
 	TESTQ BX, BX
 	MOVQ  -48(BP), R15
-	LONG  $0x070d8d4c; WORD $0x00a5; BYTE $0x00 // leaq         $42247(%rip), %r9  /* __SingleQuoteTab(%rip) */
+	LONG  $0x510d8d4c; WORD $0x00a5; BYTE $0x00 // leaq         $42321(%rip), %r9  /* __SingleQuoteTab(%rip) */
 	JLE   LBB5_31
 	TESTQ SI, SI
 	JLE   LBB5_31
@@ -2289,7 +2289,7 @@ LBB6_24:
 LBB6_26:
 	ADDQ    BX, AX
 	MOVBLZX -1(R9), CX
-	LONG    $0xd31d8d48; WORD $0x00bf; BYTE $0x00 // leaq         $49107(%rip), %rbx  /* __UnquoteTab(%rip) */
+	LONG    $0x1d1d8d48; WORD $0x00c0; BYTE $0x00 // leaq         $49181(%rip), %rbx  /* __UnquoteTab(%rip) */
 	MOVB    0(CX)(BX*1), BX
 	CMPB    BX, $-1
 	JE      LBB6_29
@@ -2864,78 +2864,76 @@ _html_escape:
 	WORD  $0x5541                               // pushq        %r13
 	WORD  $0x5441                               // pushq        %r12
 	BYTE  $0x53                                 // pushq        %rbx
-	BYTE  $0x50                                 // pushq        %rax
-	MOVQ  CX, R15
-	MOVQ  DX, R12
-	MOVQ  DX, -48(BP)
+	SUBQ  $24, SP
+	MOVQ  CX, -64(BP)
+	MOVQ  DX, R15
+	MOVQ  DX, -56(BP)
+	MOVQ  DI, -48(BP)
 	MOVQ  DI, AX
 	TESTQ SI, SI
-	JE    LBB7_92
-	MOVQ  SI, R14
-	MOVQ  0(R15), R10
-	QUAD  $0xffffff0e056f7ec5                   // vmovdqu      $-242(%rip), %ymm8  /* LCPI7_0(%rip) */
-	QUAD  $0xffffff260d6f7ec5                   // vmovdqu      $-218(%rip), %ymm9  /* LCPI7_1(%rip) */
-	QUAD  $0xffffff3e156f7ec5                   // vmovdqu      $-194(%rip), %ymm10  /* LCPI7_2(%rip) */
-	QUAD  $0xffffff56356ffec5                   // vmovdqu      $-170(%rip), %ymm6  /* LCPI7_3(%rip) */
-	LONG  $0xa21d8d4c; WORD $0x00b8; BYTE $0x00 // leaq         $47266(%rip), %r11  /* __HtmlQuoteTab(%rip) */
-	MOVQ  DI, AX
+	JLE   LBB7_94
+	MOVQ  SI, R10
+	MOVQ  -64(BP), AX
+	MOVQ  0(AX), R9
+	QUAD  $0xffffff021d6ffec5                   // vmovdqu      $-254(%rip), %ymm3  /* LCPI7_0(%rip) */
+	QUAD  $0xffffff1a256ffec5                   // vmovdqu      $-230(%rip), %ymm4  /* LCPI7_1(%rip) */
+	QUAD  $0xffffff322d6ffec5                   // vmovdqu      $-206(%rip), %ymm5  /* LCPI7_2(%rip) */
+	QUAD  $0xffffff4a356ffec5                   // vmovdqu      $-182(%rip), %ymm6  /* LCPI7_3(%rip) */
+	LONG  $0xe0358d4c; WORD $0x00b8; BYTE $0x00 // leaq         $47328(%rip), %r14  /* __HtmlQuoteTab(%rip) */
+	MOVQ  $12884901889, DI
 	MOVQ  -48(BP), R12
-	JMP   LBB7_2
-
-LBB7_91:
-	INCQ AX
-	ADDQ SI, R12
-	DECQ R14
-	JE   LBB7_92
+	MOVQ  -56(BP), R15
 
 LBB7_2:
-	CMPQ  R14, $31
-	SETGT CX
-	MOVQ  R10, R9
-	MOVQ  R12, R8
-	MOVQ  R14, SI
-	MOVQ  AX, R13
-	CMPQ  R10, $32
+	TESTQ R9, R9
+	JLE   LBB7_96
+	CMPQ  R10, $31
+	SETGT BX
+	MOVQ  R9, AX
+	MOVQ  R15, R8
+	MOVQ  R10, SI
+	MOVQ  R12, R13
+	CMPQ  R9, $32
 	JL    LBB7_9
-	CMPQ  R14, $32
+	CMPQ  R10, $32
 	JL    LBB7_9
-	MOVQ  AX, R13
-	MOVQ  R14, SI
-	MOVQ  R12, R8
-	MOVQ  R10, BX
+	MOVQ  R12, R13
+	MOVQ  R10, SI
+	MOVQ  R15, R8
+	MOVQ  R9, DX
 
-LBB7_5:
+LBB7_6:
 	LONG  $0x6f7ec1c4; WORD $0x0045 // vmovdqu      (%r13), %ymm0
-	LONG  $0xc874bdc5               // vpcmpeqb     %ymm0, %ymm8, %ymm1
-	LONG  $0xd074b5c5               // vpcmpeqb     %ymm0, %ymm9, %ymm2
+	LONG  $0xcb74fdc5               // vpcmpeqb     %ymm3, %ymm0, %ymm1
+	LONG  $0xd474fdc5               // vpcmpeqb     %ymm4, %ymm0, %ymm2
 	LONG  $0xc9ebedc5               // vpor         %ymm1, %ymm2, %ymm1
-	LONG  $0xd0ebadc5               // vpor         %ymm0, %ymm10, %ymm2
+	LONG  $0xd5ebfdc5               // vpor         %ymm5, %ymm0, %ymm2
 	LONG  $0xd674edc5               // vpcmpeqb     %ymm6, %ymm2, %ymm2
 	LONG  $0xcaebf5c5               // vpor         %ymm2, %ymm1, %ymm1
 	LONG  $0x7f7ec1c4; BYTE $0x00   // vmovdqu      %ymm0, (%r8)
-	LONG  $0xc9d7fdc5               // vpmovmskb    %ymm1, %ecx
-	TESTL CX, CX
-	JNE   LBB7_6
+	LONG  $0xc1d7fdc5               // vpmovmskb    %ymm1, %eax
+	TESTL AX, AX
+	JNE   LBB7_19
 	ADDQ  $32, R13
 	ADDQ  $32, R8
-	LEAQ  -32(BX), R9
+	LEAQ  -32(DX), AX
 	CMPQ  SI, $63
-	SETGT CX
+	SETGT BX
 	CMPQ  SI, $64
 	LEAQ  -32(SI), SI
 	JL    LBB7_9
-	CMPQ  BX, $63
-	MOVQ  R9, BX
-	JG    LBB7_5
+	CMPQ  DX, $63
+	MOVQ  AX, DX
+	JG    LBB7_6
 
 LBB7_9:
-	TESTB CX, CX
-	JE    LBB7_35
+	TESTB BX, BX
+	JE    LBB7_13
 	LONG  $0x6f7ec1c4; WORD $0x0045 // vmovdqu      (%r13), %ymm0
-	LONG  $0xc874bdc5               // vpcmpeqb     %ymm0, %ymm8, %ymm1
-	LONG  $0xd074b5c5               // vpcmpeqb     %ymm0, %ymm9, %ymm2
+	LONG  $0xcb74fdc5               // vpcmpeqb     %ymm3, %ymm0, %ymm1
+	LONG  $0xd474fdc5               // vpcmpeqb     %ymm4, %ymm0, %ymm2
 	LONG  $0xc9ebedc5               // vpor         %ymm1, %ymm2, %ymm1
-	LONG  $0xc0ebadc5               // vpor         %ymm0, %ymm10, %ymm0
+	LONG  $0xc5ebfdc5               // vpor         %ymm5, %ymm0, %ymm0
 	LONG  $0xc674fdc5               // vpcmpeqb     %ymm6, %ymm0, %ymm0
 	LONG  $0xc0ebf5c5               // vpor         %ymm0, %ymm1, %ymm0
 	LONG  $0xc8d7fdc5               // vpmovmskb    %ymm0, %ecx
@@ -2945,448 +2943,515 @@ LBB7_9:
 	LONG  $0x6f7ac1c4; WORD $0x0045 // vmovdqu      (%r13), %xmm0
 	LONG  $0x16f9e3c4; WORD $0x01c1 // vpextrq      $1, %xmm0, %rcx
 	LONG  $0x7ef9e1c4; BYTE $0xc2   // vmovq        %xmm0, %rdx
-	CMPQ  R11, R9
-	JLE   LBB7_11
-	CMPQ  R9, $16
-	JB    LBB7_24
+	CMPQ  R11, AX
+	JLE   LBB7_20
+	CMPQ  AX, $16
+	JB    LBB7_23
 	MOVQ  DX, 0(R8)
 	MOVQ  CX, 8(R8)
 	LEAQ  16(R13), R11
 	ADDQ  $16, R8
-	LEAQ  -16(R9), SI
+	LEAQ  -16(AX), SI
 	CMPQ  SI, $8
-	JAE   LBB7_27
-	JMP   LBB7_28
+	JAE   LBB7_24
+	JMP   LBB7_25
 
-LBB7_35:
+LBB7_13:
+	MOVQ  R14, DX
 	WORD  $0xf8c5; BYTE $0x77 // vzeroupper
 	CMPQ  SI, $15
-	SETGT CX
-	CMPQ  R9, $16
-	JL    LBB7_36
+	SETGT R14
+	CMPQ  AX, $16
+	JL    LBB7_30
 	CMPQ  SI, $16
-	JL    LBB7_36
-	QUAD  $0xfffffdb4056f7ec5 // vmovdqu      $-588(%rip), %ymm8  /* LCPI7_0(%rip) */
-	QUAD  $0xfffffdcc0d6f7ec5 // vmovdqu      $-564(%rip), %ymm9  /* LCPI7_1(%rip) */
-	QUAD  $0xfffffde4156f7ec5 // vmovdqu      $-540(%rip), %ymm10  /* LCPI7_2(%rip) */
-	QUAD  $0xfffffdfc356ffec5 // vmovdqu      $-516(%rip), %ymm6  /* LCPI7_3(%rip) */
-	QUAD  $0xfffffe143d6ffac5 // vmovdqu      $-492(%rip), %xmm7  /* LCPI7_4(%rip) */
-	QUAD  $0xfffffe1c1d6ffac5 // vmovdqu      $-484(%rip), %xmm3  /* LCPI7_5(%rip) */
-	QUAD  $0xfffffe24256ffac5 // vmovdqu      $-476(%rip), %xmm4  /* LCPI7_6(%rip) */
-	QUAD  $0xfffffe2c2d6ffac5 // vmovdqu      $-468(%rip), %xmm5  /* LCPI7_7(%rip) */
-
-LBB7_39:
+	QUAD  $0xfffffe273d6ffac5 // vmovdqu      $-473(%rip), %xmm7  /* LCPI7_4(%rip) */
+	QUAD  $0xfffffe2f056f7ac5 // vmovdqu      $-465(%rip), %xmm8  /* LCPI7_5(%rip) */
+	QUAD  $0xfffffe370d6f7ac5 // vmovdqu      $-457(%rip), %xmm9  /* LCPI7_6(%rip) */
+	QUAD  $0xfffffe3f156f7ac5 // vmovdqu      $-449(%rip), %xmm10  /* LCPI7_7(%rip) */
+	JL    LBB7_35
+	QUAD  $0xfffffd811d6ffec5 // vmovdqu      $-639(%rip), %ymm3  /* LCPI7_0(%rip) */
+	QUAD  $0xfffffd99256ffec5 // vmovdqu      $-615(%rip), %ymm4  /* LCPI7_1(%rip) */
+	QUAD  $0xfffffdb12d6ffec5 // vmovdqu      $-591(%rip), %ymm5  /* LCPI7_2(%rip) */
+	QUAD  $0xfffffdc9356ffec5 // vmovdqu      $-567(%rip), %ymm6  /* LCPI7_3(%rip) */
+
+LBB7_16:
 	LONG  $0x6f7ac1c4; WORD $0x0045 // vmovdqu      (%r13), %xmm0
 	LONG  $0xcf74f9c5               // vpcmpeqb     %xmm7, %xmm0, %xmm1
-	LONG  $0xd374f9c5               // vpcmpeqb     %xmm3, %xmm0, %xmm2
+	LONG  $0xd074b9c5               // vpcmpeqb     %xmm0, %xmm8, %xmm2
 	LONG  $0xc9ebe9c5               // vpor         %xmm1, %xmm2, %xmm1
-	LONG  $0xd4ebf9c5               // vpor         %xmm4, %xmm0, %xmm2
-	LONG  $0xd574e9c5               // vpcmpeqb     %xmm5, %xmm2, %xmm2
+	LONG  $0xd0ebb1c5               // vpor         %xmm0, %xmm9, %xmm2
+	LONG  $0xd274a9c5               // vpcmpeqb     %xmm2, %xmm10, %xmm2
 	LONG  $0xcaebf1c5               // vpor         %xmm2, %xmm1, %xmm1
 	LONG  $0x7f7ac1c4; BYTE $0x00   // vmovdqu      %xmm0, (%r8)
 	LONG  $0xc9d7f9c5               // vpmovmskb    %xmm1, %ecx
 	TESTW CX, CX
-	JNE   LBB7_40
+	JNE   LBB7_22
 	ADDQ  $16, R13
 	ADDQ  $16, R8
-	LEAQ  -16(R9), R11
+	LEAQ  -16(AX), R11
 	CMPQ  SI, $31
-	SETGT CX
+	SETGT R14
 	CMPQ  SI, $32
 	LEAQ  -16(SI), SI
-	JL    LBB7_43
-	CMPQ  R9, $31
-	MOVQ  R11, R9
-	JG    LBB7_39
+	JL    LBB7_31
+	CMPQ  AX, $31
+	MOVQ  R11, AX
+	JG    LBB7_16
 
-LBB7_43:
-	TESTB CX, CX
-	JE    LBB7_44
+LBB7_31:
+	TESTB R14, R14
+	JE    LBB7_36
 
-LBB7_51:
-	MOVQ R15, DX
+LBB7_32:
 	LONG $0x6f7ac1c4; WORD $0x0045 // vmovdqu      (%r13), %xmm0
 	LONG $0xcf74f9c5               // vpcmpeqb     %xmm7, %xmm0, %xmm1
-	LONG $0xd374f9c5               // vpcmpeqb     %xmm3, %xmm0, %xmm2
+	LONG $0xd074b9c5               // vpcmpeqb     %xmm0, %xmm8, %xmm2
 	LONG $0xc9ebe9c5               // vpor         %xmm1, %xmm2, %xmm1
-	LONG $0xd4ebf9c5               // vpor         %xmm4, %xmm0, %xmm2
-	LONG $0xd574e9c5               // vpcmpeqb     %xmm5, %xmm2, %xmm2
+	LONG $0xd0ebb1c5               // vpor         %xmm0, %xmm9, %xmm2
+	LONG $0xd274a9c5               // vpcmpeqb     %xmm2, %xmm10, %xmm2
 	LONG $0xcaebf1c5               // vpor         %xmm2, %xmm1, %xmm1
-	LONG $0xc9d7f9c5               // vpmovmskb    %xmm1, %ecx
-	ORL  $65536, CX
-	BSFL CX, R15
-	LONG $0x7ef9e1c4; BYTE $0xc1   // vmovq        %xmm0, %rcx
-	CMPQ R11, R15
-	JGE  LBB7_52
+	LONG $0xc1d7f9c5               // vpmovmskb    %xmm1, %eax
+	ORL  $65536, AX
+	BSFL AX, R14
+	LONG $0x7ef9e1c4; BYTE $0xc0   // vmovq        %xmm0, %rax
+	CMPQ R11, R14
+	JGE  LBB7_55
 	CMPQ R11, $8
-	JB   LBB7_63
-	MOVQ CX, 0(R8)
-	LEAQ 8(R13), SI
+	JB   LBB7_58
+	MOVQ AX, 0(R8)
+	LEAQ 8(R13), AX
 	ADDQ $8, R8
-	LEAQ -8(R11), CX
-	MOVQ DX, R15
-	CMPQ CX, $4
-	JAE  LBB7_66
-	JMP  LBB7_67
+	LEAQ -8(R11), SI
+	MOVQ DX, R14
+	CMPQ SI, $4
+	JAE  LBB7_59
+	JMP  LBB7_60
 
-LBB7_6:
-	SUBQ  AX, R13
-	BSFL  CX, R9
-	ADDQ  R13, R9
-	TESTQ R9, R9
-	JNS   LBB7_78
-	JMP   LBB7_77
+LBB7_19:
+	SUBQ  R12, R13
+	BSFL  AX, AX
+	ADDQ  R13, AX
+	TESTQ AX, AX
+	JNS   LBB7_72
+	JMP   LBB7_92
 
-LBB7_11:
+LBB7_20:
 	CMPL R11, $16
-	JB   LBB7_12
+	JB   LBB7_43
 	MOVQ DX, 0(R8)
 	MOVQ CX, 8(R8)
-	LEAQ 16(R13), R9
+	LEAQ 16(R13), AX
 	ADDQ $16, R8
 	LEAQ -16(R11), SI
 	CMPQ SI, $8
-	JAE  LBB7_15
-	JMP  LBB7_16
-
-LBB7_36:
-	MOVQ  R9, R11
-	QUAD  $0xfffffc67056f7ec5 // vmovdqu      $-921(%rip), %ymm8  /* LCPI7_0(%rip) */
-	QUAD  $0xfffffc7f0d6f7ec5 // vmovdqu      $-897(%rip), %ymm9  /* LCPI7_1(%rip) */
-	QUAD  $0xfffffc97156f7ec5 // vmovdqu      $-873(%rip), %ymm10  /* LCPI7_2(%rip) */
-	QUAD  $0xfffffcaf356ffec5 // vmovdqu      $-849(%rip), %ymm6  /* LCPI7_3(%rip) */
-	QUAD  $0xfffffcc73d6ffac5 // vmovdqu      $-825(%rip), %xmm7  /* LCPI7_4(%rip) */
-	QUAD  $0xfffffccf1d6ffac5 // vmovdqu      $-817(%rip), %xmm3  /* LCPI7_5(%rip) */
-	QUAD  $0xfffffcd7256ffac5 // vmovdqu      $-809(%rip), %xmm4  /* LCPI7_6(%rip) */
-	QUAD  $0xfffffcdf2d6ffac5 // vmovdqu      $-801(%rip), %xmm5  /* LCPI7_7(%rip) */
-	TESTB CX, CX
-	JNE   LBB7_51
-
-LBB7_44:
-	TESTQ R11, R11
-	JLE   LBB7_50
-	TESTQ SI, SI
-	JLE   LBB7_50
-
-LBB7_46:
-	MOVBLZX 0(R13), CX
-	CMPQ    CX, $62
-	JA      LBB7_47
-	MOVQ    $5764607797912141824, DX
-	BTQ     CX, DX
-	JB      LBB7_73
+	JAE  LBB7_44
+	JMP  LBB7_45
 
-LBB7_47:
-	CMPB CX, $-30
-	JE   LBB7_73
-	INCQ R13
-	MOVB CX, 0(R8)
-	CMPQ SI, $2
-	LEAQ -1(SI), SI
-	JL   LBB7_50
-	INCQ R8
-	CMPQ R11, $1
-	LEAQ -1(R11), R11
-	JG   LBB7_46
-
-LBB7_50:
-	SUBQ  AX, R13
-	NEGQ  SI
-	SBBQ  R9, R9
-	XORQ  R13, R9
-	LONG  $0x781d8d4c; WORD $0x00b5; BYTE $0x00 // leaq         $46456(%rip), %r11  /* __HtmlQuoteTab(%rip) */
-	TESTQ R9, R9
-	JNS   LBB7_78
-	JMP   LBB7_77
+LBB7_22:
+	MOVWLZX CX, AX
+	SUBQ    R12, R13
+	BSFL    AX, AX
+	ADDQ    R13, AX
+	MOVQ    DX, R14
+	TESTQ   AX, AX
+	JNS     LBB7_72
+	JMP     LBB7_92
 
-LBB7_24:
+LBB7_23:
 	MOVQ R13, R11
-	MOVQ R9, SI
+	MOVQ AX, SI
 	CMPQ SI, $8
-	JB   LBB7_28
+	JB   LBB7_25
 
-LBB7_27:
+LBB7_24:
 	MOVQ 0(R11), CX
 	MOVQ CX, 0(R8)
 	ADDQ $8, R11
 	ADDQ $8, R8
 	ADDQ $-8, SI
 
-LBB7_28:
+LBB7_25:
 	CMPQ SI, $4
-	JAE  LBB7_29
+	JB   LBB7_26
+	MOVL 0(R11), CX
+	MOVL CX, 0(R8)
+	ADDQ $4, R11
+	ADDQ $4, R8
+	ADDQ $-4, SI
 	CMPQ SI, $2
-	JAE  LBB7_31
+	JAE  LBB7_52
 
-LBB7_32:
+LBB7_27:
 	TESTQ SI, SI
-	JE    LBB7_34
+	JE    LBB7_29
 
-LBB7_33:
+LBB7_28:
 	MOVB 0(R11), CX
 	MOVB CX, 0(R8)
 
-LBB7_34:
-	SUBQ  AX, R9
-	ADDQ  R13, R9
-	NOTQ  R9
-	LONG  $0x1d1d8d4c; WORD $0x00b5; BYTE $0x00 // leaq         $46365(%rip), %r11  /* __HtmlQuoteTab(%rip) */
-	TESTQ R9, R9
-	JNS   LBB7_78
-	JMP   LBB7_77
+LBB7_29:
+	SUBQ  R12, AX
+	ADDQ  R13, AX
+	NOTQ  AX
+	TESTQ AX, AX
+	JNS   LBB7_72
+	JMP   LBB7_92
+
+LBB7_26:
+	CMPQ SI, $2
+	JB   LBB7_27
+
+LBB7_52:
+	MOVWLZX 0(R11), CX
+	MOVW    CX, 0(R8)
+	ADDQ    $2, R11
+	ADDQ    $2, R8
+	ADDQ    $-2, SI
+	TESTQ   SI, SI
+	JNE     LBB7_28
+	JMP     LBB7_29
+
+LBB7_30:
+	MOVQ  AX, R11
+	QUAD  $0xfffffbbb1d6ffec5 // vmovdqu      $-1093(%rip), %ymm3  /* LCPI7_0(%rip) */
+	QUAD  $0xfffffbd3256ffec5 // vmovdqu      $-1069(%rip), %ymm4  /* LCPI7_1(%rip) */
+	QUAD  $0xfffffbeb2d6ffec5 // vmovdqu      $-1045(%rip), %ymm5  /* LCPI7_2(%rip) */
+	QUAD  $0xfffffc03356ffec5 // vmovdqu      $-1021(%rip), %ymm6  /* LCPI7_3(%rip) */
+	QUAD  $0xfffffc1b3d6ffac5 // vmovdqu      $-997(%rip), %xmm7  /* LCPI7_4(%rip) */
+	QUAD  $0xfffffc23056f7ac5 // vmovdqu      $-989(%rip), %xmm8  /* LCPI7_5(%rip) */
+	QUAD  $0xfffffc2b0d6f7ac5 // vmovdqu      $-981(%rip), %xmm9  /* LCPI7_6(%rip) */
+	QUAD  $0xfffffc33156f7ac5 // vmovdqu      $-973(%rip), %xmm10  /* LCPI7_7(%rip) */
+	TESTB R14, R14
+	JE    LBB7_36
+	JMP   LBB7_32
+
+LBB7_35:
+	MOVQ  AX, R11
+	QUAD  $0xfffffb6e1d6ffec5 // vmovdqu      $-1170(%rip), %ymm3  /* LCPI7_0(%rip) */
+	QUAD  $0xfffffb86256ffec5 // vmovdqu      $-1146(%rip), %ymm4  /* LCPI7_1(%rip) */
+	QUAD  $0xfffffb9e2d6ffec5 // vmovdqu      $-1122(%rip), %ymm5  /* LCPI7_2(%rip) */
+	QUAD  $0xfffffbb6356ffec5 // vmovdqu      $-1098(%rip), %ymm6  /* LCPI7_3(%rip) */
+	TESTB R14, R14
+	JNE   LBB7_32
+
+LBB7_36:
+	TESTQ R11, R11
+	JLE   LBB7_64
+	TESTQ SI, SI
+	MOVQ  DX, R14
+	JLE   LBB7_65
+
+LBB7_38:
+	MOVBLZX 0(R13), AX
+	CMPQ    AX, $62
+	JA      LBB7_40
+	MOVQ    $5764607797912141824, CX
+	BTQ     AX, CX
+	JB      LBB7_57
 
 LBB7_40:
-	MOVWLZX CX, CX
-	SUBQ    AX, R13
-	BSFL    CX, R9
-	ADDQ    R13, R9
-	LONG    $0xfb1d8d4c; WORD $0x00b4; BYTE $0x00 // leaq         $46331(%rip), %r11  /* __HtmlQuoteTab(%rip) */
-	TESTQ   R9, R9
-	JNS     LBB7_78
-	JMP     LBB7_77
+	CMPB AX, $-30
+	JE   LBB7_57
+	INCQ R13
+	MOVB AX, 0(R8)
+	CMPQ SI, $2
+	LEAQ -1(SI), SI
+	JL   LBB7_65
+	INCQ R8
+	CMPQ R11, $1
+	LEAQ -1(R11), R11
+	JG   LBB7_38
+	JMP  LBB7_65
 
-LBB7_12:
-	MOVQ R13, R9
+LBB7_43:
+	MOVQ R13, AX
 	MOVQ R11, SI
 	CMPQ SI, $8
-	JB   LBB7_16
+	JB   LBB7_45
 
-LBB7_15:
-	MOVQ 0(R9), CX
+LBB7_44:
+	MOVQ 0(AX), CX
 	MOVQ CX, 0(R8)
-	ADDQ $8, R9
+	ADDQ $8, AX
 	ADDQ $8, R8
 	ADDQ $-8, SI
 
-LBB7_16:
+LBB7_45:
 	CMPQ SI, $4
-	JAE  LBB7_17
+	JB   LBB7_46
+	MOVL 0(AX), CX
+	MOVL CX, 0(R8)
+	ADDQ $4, AX
+	ADDQ $4, R8
+	ADDQ $-4, SI
 	CMPQ SI, $2
-	JAE  LBB7_19
+	JAE  LBB7_54
 
-LBB7_20:
+LBB7_47:
 	TESTQ SI, SI
-	JE    LBB7_22
-
-LBB7_21:
-	MOVB 0(R9), CX
-	MOVB CX, 0(R8)
+	JE    LBB7_49
 
-LBB7_22:
-	SUBQ AX, R13
-	ADDQ R11, R13
+LBB7_48:
+	MOVB 0(AX), AX
+	MOVB AX, 0(R8)
 
-LBB7_74:
-	MOVQ  R13, R9
-	LONG  $0xa81d8d4c; WORD $0x00b4; BYTE $0x00 // leaq         $46248(%rip), %r11  /* __HtmlQuoteTab(%rip) */
-	TESTQ R9, R9
-	JNS   LBB7_78
-	JMP   LBB7_77
+LBB7_49:
+	SUBQ  R12, R13
+	ADDQ  R11, R13
+	MOVQ  R13, AX
+	TESTQ AX, AX
+	JNS   LBB7_72
+	JMP   LBB7_92
 
-LBB7_29:
-	MOVL 0(R11), CX
-	MOVL CX, 0(R8)
-	ADDQ $4, R11
-	ADDQ $4, R8
-	ADDQ $-4, SI
+LBB7_46:
 	CMPQ SI, $2
-	JB   LBB7_32
+	JB   LBB7_47
 
-LBB7_31:
-	MOVWLZX 0(R11), CX
+LBB7_54:
+	MOVWLZX 0(AX), CX
 	MOVW    CX, 0(R8)
-	ADDQ    $2, R11
+	ADDQ    $2, AX
 	ADDQ    $2, R8
 	ADDQ    $-2, SI
 	TESTQ   SI, SI
-	JNE     LBB7_33
-	JMP     LBB7_34
+	JNE     LBB7_48
+	JMP     LBB7_49
 
-LBB7_17:
-	MOVL 0(R9), CX
+LBB7_55:
+	CMPL R14, $8
+	JB   LBB7_66
+	MOVQ AX, 0(R8)
+	LEAQ 8(R13), SI
+	ADDQ $8, R8
+	LEAQ -8(R14), AX
+	CMPQ AX, $4
+	JAE  LBB7_67
+	JMP  LBB7_68
+
+LBB7_57:
+	SUBQ  R12, R13
+	MOVQ  R13, AX
+	TESTQ AX, AX
+	JNS   LBB7_72
+	JMP   LBB7_92
+
+LBB7_58:
+	MOVQ R13, AX
+	MOVQ R11, SI
+	MOVQ DX, R14
+	CMPQ SI, $4
+	JB   LBB7_60
+
+LBB7_59:
+	MOVL 0(AX), CX
 	MOVL CX, 0(R8)
-	ADDQ $4, R9
+	ADDQ $4, AX
 	ADDQ $4, R8
 	ADDQ $-4, SI
-	CMPQ SI, $2
-	JB   LBB7_20
 
-LBB7_19:
-	MOVWLZX 0(R9), CX
+LBB7_60:
+	CMPQ    SI, $2
+	JB      LBB7_61
+	MOVWLZX 0(AX), CX
 	MOVW    CX, 0(R8)
-	ADDQ    $2, R9
+	ADDQ    $2, AX
 	ADDQ    $2, R8
 	ADDQ    $-2, SI
 	TESTQ   SI, SI
-	JNE     LBB7_21
-	JMP     LBB7_22
+	JNE     LBB7_62
+	JMP     LBB7_63
 
-LBB7_52:
-	CMPL R15, $8
-	JB   LBB7_53
-	MOVQ CX, 0(R8)
-	LEAQ 8(R13), R9
-	ADDQ $8, R8
-	LEAQ -8(R15), SI
-	LONG $0x061d8d4c; WORD $0x00b4; BYTE $0x00 // leaq         $46086(%rip), %r11  /* __HtmlQuoteTab(%rip) */
-	CMPQ SI, $4
-	JAE  LBB7_56
-	JMP  LBB7_57
+LBB7_61:
+	TESTQ SI, SI
+	JE    LBB7_63
+
+LBB7_62:
+	MOVB 0(AX), AX
+	MOVB AX, 0(R8)
 
 LBB7_63:
-	MOVQ R13, SI
-	MOVQ R11, CX
-	MOVQ DX, R15
-	CMPQ CX, $4
-	JB   LBB7_67
+	SUBQ  R12, R11
+	ADDQ  R13, R11
+	NOTQ  R11
+	MOVQ  R11, AX
+	TESTQ AX, AX
+	JNS   LBB7_72
+	JMP   LBB7_92
+
+LBB7_64:
+	MOVQ DX, R14
+
+LBB7_65:
+	SUBQ  R12, R13
+	NEGQ  SI
+	SBBQ  AX, AX
+	XORQ  R13, AX
+	TESTQ AX, AX
+	JNS   LBB7_72
+	JMP   LBB7_92
 
 LBB7_66:
-	MOVL 0(SI), DX
-	MOVL DX, 0(R8)
+	MOVQ R13, SI
+	MOVQ R14, AX
+	CMPQ AX, $4
+	JB   LBB7_68
+
+LBB7_67:
+	MOVL 0(SI), CX
+	MOVL CX, 0(R8)
 	ADDQ $4, SI
 	ADDQ $4, R8
-	ADDQ $-4, CX
+	ADDQ $-4, AX
 
-LBB7_67:
-	CMPQ  CX, $2
-	JAE   LBB7_68
-	TESTQ CX, CX
+LBB7_68:
+	CMPQ    AX, $2
+	JB      LBB7_69
+	MOVWLZX 0(SI), CX
+	MOVW    CX, 0(R8)
+	ADDQ    $2, SI
+	ADDQ    $2, R8
+	ADDQ    $-2, AX
+	TESTQ   AX, AX
+	JNE     LBB7_70
+	JMP     LBB7_71
+
+LBB7_69:
+	TESTQ AX, AX
 	JE    LBB7_71
 
 LBB7_70:
-	MOVB 0(SI), CX
-	MOVB CX, 0(R8)
+	MOVB 0(SI), AX
+	MOVB AX, 0(R8)
 
 LBB7_71:
-	SUBQ  AX, R11
-	ADDQ  R13, R11
-	NOTQ  R11
-	MOVQ  R11, R9
-	LONG  $0xb71d8d4c; WORD $0x00b3; BYTE $0x00 // leaq         $46007(%rip), %r11  /* __HtmlQuoteTab(%rip) */
-	TESTQ R9, R9
-	JNS   LBB7_78
-	JMP   LBB7_77
-
-LBB7_73:
-	SUBQ AX, R13
-	JMP  LBB7_74
-
-LBB7_53:
-	MOVQ R13, R9
-	MOVQ R15, SI
-	LONG $0x981d8d4c; WORD $0x00b3; BYTE $0x00 // leaq         $45976(%rip), %r11  /* __HtmlQuoteTab(%rip) */
-	CMPQ SI, $4
-	JB   LBB7_57
-
-LBB7_56:
-	MOVL 0(R9), CX
-	MOVL CX, 0(R8)
-	ADDQ $4, R9
-	ADDQ $4, R8
-	ADDQ $-4, SI
-
-LBB7_57:
-	CMPQ  SI, $2
-	JAE   LBB7_58
-	TESTQ SI, SI
-	JE    LBB7_61
+	SUBQ  R12, R13
+	ADDQ  R14, R13
+	MOVQ  R13, AX
+	MOVQ  DX, R14
+	TESTQ AX, AX
+	JS    LBB7_92
 
-LBB7_60:
-	MOVB 0(R9), CX
-	MOVB CX, 0(R8)
+LBB7_72:
+	ADDQ AX, R12
+	ADDQ AX, R15
+	SUBQ AX, R10
+	JLE  LBB7_93
+	SUBQ AX, R9
+	MOVB 0(R12), CX
+	CMPB CX, $-30
+	JE   LBB7_86
+	MOVQ R12, AX
 
-LBB7_61:
-	SUBQ  AX, R13
-	ADDQ  R15, R13
-	MOVQ  R13, R9
-	MOVQ  DX, R15
-	TESTQ R9, R9
-	JS    LBB7_77
+LBB7_75:
+	MOVBLZX CX, CX
+	SHLQ    $4, CX
+	MOVQ    0(CX)(R14*1), DX
+	MOVLQSX DX, SI
+	SUBQ    SI, R9
+	JL      LBB7_95
+	SHLQ    $32, DX
+	LEAQ    8(CX)(R14*1), BX
+	CMPQ    DX, DI
+	JL      LBB7_78
+	MOVL    0(BX), DX
+	MOVL    DX, 0(R15)
+	LEAQ    12(CX)(R14*1), BX
+	LEAQ    4(R15), DX
+	LEAQ    -4(SI), CX
+	CMPQ    CX, $2
+	JGE     LBB7_79
+	JMP     LBB7_80
 
 LBB7_78:
-	ADDQ R9, AX
-	ADDQ R9, R12
-	SUBQ R9, R14
-	JLE  LBB7_92
-	SUBQ R9, R10
-	CMPQ R14, $3
-	JL   LBB7_82
-	MOVL 0(AX), CX
-	MOVL $16711679, DX
-	ANDL DX, CX
-	CMPL CX, $11043042
-	JNE  LBB7_82
-	ADDQ $2, AX
-	ADDQ $-2, R14
+	MOVQ R15, DX
+	MOVQ SI, CX
+	CMPQ CX, $2
+	JL   LBB7_80
 
-LBB7_82:
-	MOVBLZX 0(AX), DX
-	SHLQ    $4, DX
-	MOVQ    0(DX)(R11*1), BX
-	MOVLQSX BX, SI
-	SUBQ    SI, R10
-	JL      LBB7_83
-	SHLQ    $32, BX
-	LEAQ    8(DX)(R11*1), R9
-	MOVQ    $12884901889, CX
-	CMPQ    BX, CX
-	JL      LBB7_85
-	MOVL    0(R9), CX
-	MOVL    CX, 0(R12)
-	LEAQ    12(DX)(R11*1), R9
-	LEAQ    4(R12), R8
-	LEAQ    -4(SI), DX
-	CMPQ    DX, $2
-	JGE     LBB7_88
-	JMP     LBB7_89
-
-LBB7_85:
-	MOVQ R12, R8
-	MOVQ SI, DX
-	CMPQ DX, $2
-	JL   LBB7_89
+LBB7_79:
+	MOVQ    DI, R8
+	MOVWLZX 0(BX), DI
+	MOVW    DI, 0(DX)
+	MOVQ    R8, DI
+	ADDQ    $2, BX
+	ADDQ    $2, DX
+	ADDQ    $-2, CX
 
-LBB7_88:
-	MOVWLZX 0(R9), BX
-	MOVW    BX, 0(R8)
-	ADDQ    $2, R9
-	ADDQ    $2, R8
-	ADDQ    $-2, DX
+LBB7_80:
+	TESTQ CX, CX
+	JLE   LBB7_82
+	MOVB  0(BX), CX
+	MOVB  CX, 0(DX)
 
-LBB7_89:
-	TESTQ DX, DX
-	JLE   LBB7_91
-	MOVB  0(R9), CX
-	MOVB  CX, 0(R8)
-	JMP   LBB7_91
+LBB7_82:
+	ADDQ SI, R15
 
-LBB7_68:
-	MOVWLZX 0(SI), DX
-	MOVW    DX, 0(R8)
-	ADDQ    $2, SI
-	ADDQ    $2, R8
-	ADDQ    $-2, CX
-	TESTQ   CX, CX
-	JNE     LBB7_70
-	JMP     LBB7_71
+LBB7_83:
+	INCQ AX
+	MOVQ AX, R12
+	CMPQ R10, $1
+	LEAQ -1(R10), R10
+	JG   LBB7_2
+	JMP  LBB7_94
+
+LBB7_86:
+	CMPQ R10, $3
+	JL   LBB7_90
+	CMPB 1(R12), $-128
+	JNE  LBB7_90
+	MOVB 2(R12), CX
+	MOVL CX, AX
+	ANDB $-2, AX
+	CMPB AX, $-88
+	JNE  LBB7_90
+	LEAQ 2(R12), AX
+	ADDQ $-2, R10
+	JMP  LBB7_75
 
-LBB7_58:
-	MOVWLZX 0(R9), CX
-	MOVW    CX, 0(R8)
-	ADDQ    $2, R9
-	ADDQ    $2, R8
-	ADDQ    $-2, SI
-	TESTQ   SI, SI
-	JNE     LBB7_60
-	JMP     LBB7_61
+LBB7_90:
+	TESTQ R9, R9
+	JLE   LBB7_96
+	MOVB  $-30, 0(R15)
+	INCQ  R15
+	DECQ  R9
+	MOVQ  R12, AX
+	JMP   LBB7_83
 
 LBB7_92:
+	SUBQ -56(BP), R15
+	NOTQ AX
+	ADDQ AX, R15
+	MOVQ -64(BP), CX
+	MOVQ R15, 0(CX)
 	SUBQ -48(BP), R12
-	MOVQ R12, 0(R15)
-	SUBQ DI, AX
+	ADDQ AX, R12
+	NOTQ R12
+	JMP  LBB7_97
 
 LBB7_93:
-	ADDQ $8, SP
+	MOVQ R12, AX
+
+LBB7_94:
+	SUBQ -56(BP), R15
+	MOVQ -64(BP), CX
+	MOVQ R15, 0(CX)
+	SUBQ -48(BP), AX
+	JMP  LBB7_98
+
+LBB7_95:
+	SUBQ -56(BP), R15
+	MOVQ -64(BP), AX
+	MOVQ R15, 0(AX)
+
+LBB7_96:
+	NOTQ R12
+	ADDQ -48(BP), R12
+
+LBB7_97:
+	MOVQ R12, AX
+
+LBB7_98:
+	ADDQ $24, SP
 	BYTE $0x5b               // popq         %rbx
 	WORD $0x5c41             // popq         %r12
 	WORD $0x5d41             // popq         %r13
@@ -3396,23 +3461,6 @@ LBB7_93:
 	WORD $0xf8c5; BYTE $0x77 // vzeroupper
 	RET
 
-LBB7_77:
-	SUBQ -48(BP), R12
-	NOTQ R9
-	ADDQ R9, R12
-	MOVQ R12, 0(R15)
-	SUBQ DI, AX
-	ADDQ R9, AX
-	NOTQ AX
-	JMP  LBB7_93
-
-LBB7_83:
-	SUBQ -48(BP), R12
-	MOVQ R12, 0(R15)
-	NOTQ AX
-	ADDQ DI, AX
-	JMP  LBB7_93
-
 _atof_eisel_lemire64:
 	BYTE  $0x55               // pushq        %rbp
 	WORD  $0x8948; BYTE $0xe5 // movq         %rsp, %rbp
@@ -12550,7 +12598,7 @@ TEXT ·__html_escape(SB), NOSPLIT | NOFRAME, $0 - 40
 
 _entry:
 	MOVQ (TLS), R14
-	LEAQ -56(SP), R12
+	LEAQ -72(SP), R12
 	CMPQ R12, 16(R14)
 	JBE  _stack_grow
 
@@ -12664,7 +12712,7 @@ _skip_array:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ m+16(FP), DX
-	CALL ·__native_entry__+21301(SB) // _skip_array
+	CALL ·__native_entry__+21375(SB) // _skip_array
 	MOVQ AX, ret+24(FP)
 	RET
 
@@ -12685,7 +12733,7 @@ _skip_object:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ m+16(FP), DX
-	CALL ·__native_entry__+21338(SB) // _skip_object
+	CALL ·__native_entry__+21412(SB) // _skip_object
 	MOVQ AX, ret+24(FP)
 	RET
 
@@ -12706,7 +12754,7 @@ _skip_one:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ m+16(FP), DX
-	CALL ·__native_entry__+18201(SB) // _skip_one
+	CALL ·__native_entry__+18275(SB) // _skip_one
 	MOVQ AX, ret+24(FP)
 	RET
 
@@ -12770,7 +12818,7 @@ _validate_one:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ m+16(FP), DX
-	CALL ·__native_entry__+24949(SB) // _validate_one
+	CALL ·__native_entry__+25023(SB) // _validate_one
 	MOVQ AX, ret+24(FP)
 	RET
 
@@ -12793,7 +12841,7 @@ _value:
 	MOVQ p+16(FP), DX
 	MOVQ v+24(FP), CX
 	MOVQ allow_control+32(FP), R8
-	CALL ·__native_entry__+13707(SB) // _value
+	CALL ·__native_entry__+13781(SB) // _value
 	MOVQ AX, ret+40(FP)
 	RET
 
@@ -12814,7 +12862,7 @@ _vnumber:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ v+16(FP), DX
-	LEAQ ·__native_entry__+16359(SB), AX // _vnumber
+	LEAQ ·__native_entry__+16433(SB), AX // _vnumber
 	JMP  AX
 
 _stack_grow:
@@ -12834,7 +12882,7 @@ _vsigned:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ v+16(FP), DX
-	LEAQ ·__native_entry__+17673(SB), AX // _vsigned
+	LEAQ ·__native_entry__+17747(SB), AX // _vsigned
 	JMP  AX
 
 _stack_grow:
@@ -12854,7 +12902,7 @@ _vstring:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ v+16(FP), DX
-	LEAQ ·__native_entry__+15482(SB), AX // _vstring
+	LEAQ ·__native_entry__+15556(SB), AX // _vstring
 	JMP  AX
 
 _stack_grow:
@@ -12874,7 +12922,7 @@ _vunsigned:
 	MOVQ s+0(FP), DI
 	MOVQ p+8(FP), SI
 	MOVQ v+16(FP), DX
-	LEAQ ·__native_entry__+17932(SB), AX // _vunsigned
+	LEAQ ·__native_entry__+18006(SB), AX // _vunsigned
 	JMP  AX
 
 _stack_grow:
diff --git a/internal/native/avx2/native_subr_amd64.go b/internal/native/avx2/native_subr_amd64.go
index 97f7a56..6a8a181 100644
--- a/internal/native/avx2/native_subr_amd64.go
+++ b/internal/native/avx2/native_subr_amd64.go
@@ -15,22 +15,22 @@ var (
     _subr__lspace       = __native_entry__() + 429
     _subr__lzero        = __native_entry__() + 13
     _subr__quote        = __native_entry__() + 5328
-    _subr__skip_array   = __native_entry__() + 21301
-    _subr__skip_object  = __native_entry__() + 21338
-    _subr__skip_one     = __native_entry__() + 18201
+    _subr__skip_array   = __native_entry__() + 21375
+    _subr__skip_object  = __native_entry__() + 21412
+    _subr__skip_one     = __native_entry__() + 18275
     _subr__u64toa       = __native_entry__() + 4008
     _subr__unquote      = __native_entry__() + 7080
-    _subr__validate_one = __native_entry__() + 24949
-    _subr__value        = __native_entry__() + 13707
-    _subr__vnumber      = __native_entry__() + 16359
-    _subr__vsigned      = __native_entry__() + 17673
-    _subr__vstring      = __native_entry__() + 15482
-    _subr__vunsigned    = __native_entry__() + 17932
+    _subr__validate_one = __native_entry__() + 25023
+    _subr__value        = __native_entry__() + 13781
+    _subr__vnumber      = __native_entry__() + 16433
+    _subr__vsigned      = __native_entry__() + 17747
+    _subr__vstring      = __native_entry__() + 15556
+    _subr__vunsigned    = __native_entry__() + 18006
 )
 
 const (
     _stack__f64toa = 120
-    _stack__html_escape = 56
+    _stack__html_escape = 72
     _stack__i64toa = 24
     _stack__lspace = 8
     _stack__lzero = 8
diff --git a/native/parsing.c b/native/parsing.c
index a63c972..2682154 100644
--- a/native/parsing.c
+++ b/native/parsing.c
@@ -15,6 +15,7 @@
  */
 
 #include "native.h"
+#include <stdint.h>
 
 /** String Quoting **/
 
@@ -760,13 +761,19 @@ ssize_t html_escape(const char *sp, ssize_t nb, char *dp, ssize_t *dn) {
     const quoted_t * tab = _HtmlQuoteTab;
 
     /* find the special characters, copy on the fly */
-    while (nb != 0) {
+    while (nb > 0) {
         int     nc = 0;
         uint8_t ch = 0;
-        ssize_t rb = memcchr_html_quote(sp, nb, dp, nd);
+        ssize_t rb = 0;
+        const char * cur = 0;
 
         /* not enough buffer space */
-        if (rb < 0) {
+        if (nd <= 0) {
+            return -(sp - ss) - 1;
+        }
+
+        /* find and copy */
+        if ((rb = memcchr_html_quote(sp, nb, dp, nd)) < 0) {
             *dn = dp - ds - rb - 1;
             return -(sp - ss - rb - 1) - 1;
         }
@@ -782,10 +789,20 @@ ssize_t html_escape(const char *sp, ssize_t nb, char *dp, ssize_t *dn) {
             break;
         }
 
-        /* check for \u2028 and \u2029, [e2 80 a8] and [e2 80 a9] */
-        if (nb >= 3 && 0xa880e2 == (*(uint32_t *)sp & 0xfeffff)) {
-            sp += 2;
-            nb -= 2;
+        /* mark cur postion */
+        cur = sp;
+
+        /* check for \u2028 and \u2029, binary is \xe2\x80\xa8 and \xe2\x80\xa9 */
+        if (unlikely(*sp == '\xe2')) {
+            if (nb >= 3 && *(sp+1) == '\x80' && (*(sp+2) == '\xa8' || *(sp+2) == '\xa9')) {
+                sp += 2, nb -= 2;
+            } else if (nd > 0) {
+                *dp++ = *sp++;
+                nb--, nd--;
+                continue;
+            } else {
+                return -(sp - ss) - 1;
+            }
         }
 
         /* get the escape entry, handle consecutive quotes */
@@ -796,7 +813,7 @@ ssize_t html_escape(const char *sp, ssize_t nb, char *dp, ssize_t *dn) {
         /* check for buffer space */
         if (nd < nc) {
             *dn = dp - ds;
-            return -(sp - ss) - 1;
+            return -(cur - ss) - 1;
         }
 
         /* copy the quoted value */


Test patch:
diff --git a/encoder/encoder_test.go b/encoder/encoder_test.go
index da5bccf..a8447ff 100644
--- a/encoder/encoder_test.go
+++ b/encoder/encoder_test.go
@@ -197,7 +197,7 @@ func TestEncoder_TextMarshaler(t *testing.T) {
     require.Equal(t, `{"V":{"X":"{\"a\"}"}}`, string(ret3))
 }
 
-func TestEncoder_EscapeHTML(t *testing.T) {
+func TestEncoder_Marshal_EscapeHTML(t *testing.T) {
     v := map[string]TextMarshalerImpl{"&&":{"<>"}}
     ret, err := Encode(v, EscapeHTML)
     require.NoError(t, err)
@@ -205,9 +205,36 @@ func TestEncoder_EscapeHTML(t *testing.T) {
     ret, err = Encode(v, 0)
     require.NoError(t, err)
     require.Equal(t, `{"&&":{"X":"<>"}}`, string(ret))
+
+    // “ is \xe2\x80\x9c, and ” is \xe2\x80\x9d,
+    // similar as HTML escaped chars \u2028(\xe2\x80\xa8) and \u2029(\xe2\x80\xa9)
+    m := map[string]string{"test": "“123”"}
+    ret, err = Encode(m, EscapeHTML)
+    require.Equal(t, string(ret), `{"test":"“123”"}`)
+    require.NoError(t, err)
+
+    m = map[string]string{"K": "\u2028\u2028\xe2"}
+    ret, err = Encode(m, EscapeHTML)
+    require.Equal(t, string(ret), "{\"K\":\"\\u2028\\u2028\xe2\"}")
+    require.NoError(t, err)
+}
+
+func TestEncoder_EscapeHTML(t *testing.T) {
+    // test data from libfuzzer
+    test := []string{
+        "&&&&&&&&&&&&&&&&&&&&&&&\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2\xe2&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&",
+        "{\"\"\u2028\x94\xe2\x00\x00\x00\x00\x00\x00\x00\x00\u2028\x80\u2028\x80\u2028\xe2\u2028\x8a\u2028⑀\xa8\x8a\xa8\xe2\u2028\xe2\u2028\xe2\u2028\xe2\u2000\x8d\xe2\u2028\xe2\u2028\xe2\xe2\xa8\"}",
+    }
+    for _, s := range(test) {
+        data := []byte(s)
+        sdst := HTMLEscape(nil, data)
+        var dst bytes.Buffer
+        json.HTMLEscape(&dst, data)
+        require.Equal(t, string(sdst), dst.String())
+    }
 }
 
-func TestEncoder_EscapeHTML_LargeJson(t *testing.T) {
+func TestEncoder_Marshal_EscapeHTML_LargeJson(t *testing.T) {
     buf1, err1 := Encode(&_BindingValue, SortMapKeys | EscapeHTML)
     require.NoError(t, err1)
     buf2, err2 :=json.Marshal(&_BindingValue)
diff --git a/internal/native/avx/native_amd64_test.go b/internal/native/avx/native_amd64_test.go
index 3099711..f2cdfdf 100644
--- a/internal/native/avx/native_amd64_test.go
+++ b/internal/native/avx/native_amd64_test.go
@@ -228,7 +228,7 @@ func TestNative_HTMLEscapeNoMem(t *testing.T) {
     dp := (*rt.GoSlice)(unsafe.Pointer(&d))
     sp := (*rt.GoString)(unsafe.Pointer(&s))
     rv := __html_escape(sp.Ptr, sp.Len, dp.Ptr, &dp.Len)
-    assert.Equal(t, -8, rv)
+    assert.Equal(t, -6, rv)
     assert.Equal(t, 5, len(d))
     assert.Equal(t, `hello`, string(d))
 }
diff --git a/internal/native/avx2/native_amd64_test.go b/internal/native/avx2/native_amd64_test.go
index 1564dc9..c971041 100644
--- a/internal/native/avx2/native_amd64_test.go
+++ b/internal/native/avx2/native_amd64_test.go
@@ -228,7 +228,7 @@ func TestNative_HTMLEscapeNoMem(t *testing.T) {
     dp := (*rt.GoSlice)(unsafe.Pointer(&d))
     sp := (*rt.GoString)(unsafe.Pointer(&s))
     rv := __html_escape(sp.Ptr, sp.Len, dp.Ptr, &dp.Len)
-    assert.Equal(t, -8, rv)
+    assert.Equal(t, -6, rv)
     assert.Equal(t, 5, len(d))
     assert.Equal(t, `hello`, string(d))
 }
diff --git a/internal/native/native_amd64_test.tmpl b/internal/native/native_amd64_test.tmpl
index e36ba8e..3d9f840 100644
--- a/internal/native/native_amd64_test.tmpl
+++ b/internal/native/native_amd64_test.tmpl
@@ -226,7 +226,7 @@ func TestNative_HTMLEscapeNoMem(t *testing.T) {
     dp := (*rt.GoSlice)(unsafe.Pointer(&d))
     sp := (*rt.GoString)(unsafe.Pointer(&s))
     rv := __html_escape(sp.Ptr, sp.Len, dp.Ptr, &dp.Len)
-    assert.Equal(t, -8, rv)
+    assert.Equal(t, -6, rv)
     assert.Equal(t, 5, len(d))
     assert.Equal(t, `hello`, string(d))
 }